Commit Graph

141 Commits

Author SHA1 Message Date
jetstack-bot
e58b47f345
Merge pull request #5340 from SgtCoDFish/byebazel
Remove bazel 🎉
2022-07-27 09:13:05 +01:00
joshvanl
4138aa8986 Add code comment which states that it is valid to use neither an
AccessKeyID or AccessKeySecretRef

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-07-26 11:56:13 +01:00
joshvanl
0c60503cc3 In PR https://github.com/cert-manager/cert-manager/pull/5194, we
introduced a validation whereby an issuer would be rejected if it did
not contain AccessKeyID or SecretAccessKeyID when using the route53 DNS
solver. This is incorrect, since neither should need to be defined when
using AWS ambient credentials.

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-07-26 11:51:16 +01:00
Daniel Quackenbush
54e1da255c remove issue error if role is specified
Signed-off-by: Dan Quackenbush<25692880+danquack@users.noreply.github.com>
2022-07-26 11:49:57 +01:00
Ashley Davis
fb231ab641
Remove bazel 🎉
This removes all .bazel and .bzl files, and a bunch of scripts relating
to bazel, now that it's been entirely replaced.

There are still a few places where traces could be removed, but this
removes the brunt of the bazel stuff that remains.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-07-26 11:38:50 +01:00
jetstack-bot
b84ea96d73
Merge pull request #5194 from Compy/master
Support secrets for Route53 Access Key IDs
2022-07-05 12:33:21 +01:00
joshvanl
cc0a4bc488 Adds unit tests for route53 access key ID secret validation
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-07-04 17:06:49 +01:00
joshvanl
f1d7c43276 Updates wording for aws rout53 dns CRD field comments
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-07-04 17:06:40 +01:00
irbekrm
1d326af871 Runs ./hack/update-bazel.sh
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-06-30 10:20:40 +01:00
irbekrm
05a3133b34 Removes support for networking/v1beta1 Ingress
As the lowest version of Kubernetes that we support now is v1.20 that serves v1 networking

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-06-30 09:24:59 +01:00
Ashley Davis
35f2206404
change name of bin dir to _bin by default and make it a variable
This is needed because go and other tools will ignore directories
starting with "_" or "." but would treat a dir called "bin" as a regular
directory.

This in turn meant that when we vendored Go in bin, these tools would by
default scan the whole stdlib included with the bundled vendored go.

See https://pkg.go.dev/cmd/go#hdr-Package_lists_and_patterns for details

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-06-21 16:34:26 +01:00
Compy
9c47be0964 Changed SecretAccessKeyID member to pointer as it is optional and tagged omitempty. Added issuer tests for access key ID secret validation. Added issuer API validations for AccessKeyID/SecretAccessKeyID.
Signed-off-by: Compy <hello@86pixels.com>
2022-06-17 22:52:17 -05:00
Compy
561103934d Updating and regenerating CRDs to make SecretAccessKeyID field usage more clear
Signed-off-by: Compy <hello@86pixels.com>
2022-06-11 10:48:10 -05:00
Compy
153e5420cf Add support for pulling Route53/AWS access key IDs out of secrets
Signed-off-by: Compy <hello@86pixels.com>
2022-06-08 16:33:00 -05:00
Alessandro Vermeulen
1da01211ee Feature gated support for using literal subjects in Certificates
Signed-off-by: Alessandro Vermeulen <alessandro.vermeulen@ing.com>
2022-06-08 20:50:00 +02:00
Irbe Krumina
1d917ef311 Revert "Use Apply instead of Update to modify resources in tests"
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-05-03 11:31:47 +01:00
irbekrm
58b633aa04 Code review feedback
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-29 12:42:41 +01:00
irbekrm
54a487f1fb certificates.Apply returns the patched certificate
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-28 14:41:22 +01:00
irbekrm
e458b6c813 Sets Challenge managed fields to nil when applying a spec patch
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-01 11:53:44 +01:00
joshvanl
aa456b9c3f Adds roundtrip tests to challenge apply serializer
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-04-01 11:53:44 +01:00
joshvanl
8ebedac654 Fix challenge serialization, and add integration tests for apply helpers
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-04-01 11:53:44 +01:00
joshvanl
82c068f0fd Updates ACME challenge controllers to use apply
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-04-01 11:53:44 +01:00
joshvanl
ebcad79cf9 Adds controller challenges apply helpers
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-04-01 11:53:44 +01:00
jetstack-bot
86ad9962a3
Merge pull request #4967 from maelvls/gwapi-v1alpha2-optional-labels
Gateway API: with v1alpha2, the labels have become optional
2022-03-30 15:11:33 +01:00
Jake Sanders
6dfd6d5800
update bazel BUILD
Signed-off-by: Jake Sanders <i@am.so-aweso.me>
2022-03-30 12:58:41 +01:00
Jake Sanders
d8b88f056b
tidy imports
Signed-off-by: Jake Sanders <i@am.so-aweso.me>
2022-03-30 12:54:20 +01:00
Jake Sanders
b72db63761
Change label description for HTTP-01 Gateway API solver and fix tests
Signed-off-by: Jake Sanders <i@am.so-aweso.me>
2022-03-30 12:52:34 +01:00
joshvanl
a8bfc2fd36 Adds certificates policy checks for owner references
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-03-29 13:54:27 +01:00
jetstack-bot
bfcc204c2b
Merge pull request #4811 from JoshVanL/controllers-server-side-apply-certificates-shim
Server Side Apply: Adds support for certificate-shim controllers to use SSA with Feature Gate
2022-03-28 14:33:31 +01:00
jetstack-bot
e116d416f3
Merge pull request #4799 from JoshVanL/controllers-server-side-apply-orders
Server Side Apply: Adds support for Order controllers to use SSA with Feature Gate
2022-03-28 13:11:31 +01:00
joshvanl
c1c2d2d081 Add roundtrip test to Certificate serializing. Add field manager to
certificates-shim Create API call

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-03-28 12:40:29 +01:00
joshvanl
82e3b6aa43 Adds apply helper function for Certificates
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-03-28 12:39:09 +01:00
Maël Valais
4b3af946db gateway-api: with v1alpha2, the labels have become optional
Previously, in v1alpha1, an HTTPRoute was matched to a Gateway using
the label selectors present on the Gateways. For example, with the
following Gateway:

  apiVersion: networking.x-k8s.io/v1alpha1
  kind: Gateway
  metadata:
    name: acmesolver
  spec:
    listeners:
      - protocol: HTTP
        port: 80
        routes:
          kind: HTTPRoute
          selector:
            matchLabels:
              app: foo

you would have to use the following labels on the HTTPRoute in order to
get the above Gateway to be used:

  apiVersion: networking.x-k8s.io/v1alpha1
  kind: HTTPRoute
  metadata:
    labels:
      app: foo

With v1alpha2, the label selectors have been dropped. Instead, the
HTTPRoute has to give a direct reference to the Gateway:

    apiVersion: gateway.networking.k8s.io/v1alpha2
    kind: HTTPRoute
    spec:
      parentRefs:
        - kind: Gateway
          name: acmesolver
          namespace: traefik

This means that the "labels" field on the gatewayHTTPRoute solver is now
optional:

    apiVersion: cert-manager.io/v1
    kind: Issuer
    spec:
      acme:
        solvers:
          - http01:
              gatewayHTTPRoute:
                labels:              | This field is
                  app: test          | now optional.
                parentRefs:
                  - kind: Gateway
                    name: acmesolver

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-21 17:39:10 +01:00
irbekrm
dbad3d98f3 Rename issuanceAttempts -> failedIssuanceAttempts
In an attempt to convey the meaning of the field better

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-21 07:33:51 +00:00
irbekrm
4c901aefab Code review comments
Adds test conditions to certs via patch API call instead of update to avoid conflicts

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-21 07:33:51 +00:00
irbekrm
affb5e86ef Adds IssuanceAttempts field to Certificate's status
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-21 07:33:51 +00:00
Maël Valais
05f3cf51f1 e2e: try to load the Make-built crds before the Bazel-built crds
Since bazel-bin systematically exists, the Make-based CRDs were never
picked up, since the bazel-bin folder gets recreated on every invocation
of Bazel.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-13 12:32:08 +01:00
Joakim Ahrlin
eb64e6494c
update deps and BUILD files
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
2022-03-01 15:05:18 +00:00
jetstack-bot
d998e37a44
Merge pull request #4873 from SgtCoDFish/importsfixes
Fix imports in a few files
2022-02-21 11:41:48 +00:00
Ashley Davis
6420aa4bfa
fix imports in a few files
this is according to our policy on organizing imports, see:
https://cert-manager.io/docs/contributing/coding-conventions/#organizing-imports

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-18 17:42:45 +00:00
Ashley Davis
a57110c6bb
Add targets for unit and integration tests in make
These lean heavily on `go test` for everything possible.

Also adds setup for versionchecker test in make, and a script for
extracting CRDs from templated rendered YAML files

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-17 14:48:57 +00:00
Ashley Davis
eb6c29756d
Refactor CRD provisioning for integration tests
Falls back to looking in bin/crds if nothing has been provisioned in
bazel.

Removes "bazel.go" and consolidates in "paths.go", since the bazel name
will become obsolete and the functionality has changed

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-17 14:48:56 +00:00
jetstack-bot
10c5d72279
Merge pull request #4792 from JoshVanL/controllers-server-side-apply-certificaterequests
Server Side Apply: Adds support for CertificateRequests controller to use SSA with Feature Gate
2022-02-16 10:57:37 +00:00
joshvanl
3e81f9c5f1 Adds correct copyright year, and fix owner string match
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-16 10:33:48 +00:00
joshvanl
1aa5b0e5f5 Adds roundtrip test to order status serializer
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-16 10:33:48 +00:00
joshvanl
0802489f4e Updates Order controller to support apply call when feature gate it
enabled

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-16 10:33:48 +00:00
joshvanl
4e73b60a32 Adds orders apply helper function
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-16 10:33:47 +00:00
jetstack-bot
12a2148df3
Merge pull request #4794 from JoshVanL/controllers-server-side-apply-issuers
Server Side Apply: Adds support for [Cluster]Issuer controller to use SSA with Feature Gate
2022-02-11 19:37:01 +00:00
joshvanl
f73d6584fb Fix copyright year. Remove carrot from OWNERS string match
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:26:56 +00:00
joshvanl
d1ffb0ad0d Adds roundtrip tests for issuer and cluster issuer serialize
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:26:56 +00:00