Commit Graph

681 Commits

Author SHA1 Message Date
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
joshvanl
1f2ba6d7f7 Update the approval e2e tests so that transient client request errors
are retried, and correctly check the error returned is expected when
appropriate.

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-07-20 16:31:11 +01:00
jetstack-bot
519d4dd803
Merge pull request #5318 from JoshVanL/test-e2e-flake-secret-template
E2E test flakes: SecretTemplate
2022-07-20 13:37:13 +01:00
joshvanl
9118c112e3 Adds on conflict retries to certificate state change in the
SecretTemplate e2e test setups

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-07-20 12:21:29 +01:00
joshvanl
43223a1863 Adds on conflict retries to certificate state change in the
additionaloutputformat e2e test setups

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-07-20 11:42:43 +01:00
James Munnelly
09e42e10db Retry update on conflicts during SecretTemplate tests to avoid test flakes
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-07-11 14:13:21 +01:00
Joe Bowbeer
1dc252e27e update kyverno version and policy
Signed-off-by: Joe Bowbeer <joe.bowbeer@gmail.com>
2022-07-06 10:11:37 -07:00
oGi4i
cb2cabb06f
Add private key Ingress annotations to set private key properties for Certificate
Signed-off-by: oGi4i <das.ogi4i@gmail.com>
2022-06-28 17:45:08 +03:00
oGi4i
3148b17fa5
Add revision history limit Ingress annotation to set field on the Certificate
Signed-off-by: oGi4i <das.ogi4i@gmail.com>
2022-06-21 15:12:09 +03:00
Joakim Ahrlin
9f43ca2cce update boilerplate headers
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
2022-06-14 12:55:33 +02:00
Joakim Ahrlin
de08109be0 add VerifyCredentials to Venafi issuers setup
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
2022-06-14 12:26:38 +02: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
irbekrm
3ff5dc26ef Removes installation of pre-kubernetes 1.19 compat ingress
As we no longer need to support Kubernetes 1.19

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-06-08 13:25:42 +01:00
irbekrm
289d082fbd Removes the unused traefik and haproxy addons config
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-06-08 13:08:08 +01:00
irbekrm
ac956abb0c Fix CR approve/deny e2e test for kube 1.24
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-05-10 12:07:29 +01: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
d6e684bc8a e2e tests use SSA to update test resources
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-28 14:49:30 +01:00
Maël Valais
2205bafef5 e2e: WaitForAllPodsRunningInNamespaceTimeout: %s missing value in logs
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:54:26 +02:00
Maël Valais
be093559cb e2e: raise slightly the timeouts so that ginkgo -nodes 20 works
Moving from -nodes 10 to -nodes 20 has lowered the e2e time from 35 to
30 minutes on n1-standard-8 with a request (for the prow job pod) of
3500m (the memory limit of 12Gi is never reached).

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:45:08 +02:00
Maël Valais
d6ebdda49c make/e2e.sh: add a backoff to the log.Logf when waiting for something
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:45:08 +02:00
Monis Khan
2a33c7a5c2
Use Kubernetes CSR spec.expirationSeconds to express cert duration
This change adds the ability to express certificate duration using
the Kubernetes CSR spec.expirationSeconds field alongside the existing
approach of using the experimental.cert-manager.io/request-duration
annotation.  Both approaches are supported as the expirationSeconds
field requires Kubernetes v1.22+.

Signed-off-by: Monis Khan <mok@vmware.com>
2022-03-21 09:40:32 -04:00
jetstack-bot
af47ae4e5b
Merge pull request #4914 from maelvls/install.mk
Make: move the end-to-end tests from Bazel to Make with the new commands "make e2e-setup" and "make e2e"
2022-03-17 09:00:35 +00:00
jetstack-bot
be9f2aeafa
Merge pull request #4925 from maelvls/fix-another-flakiness
Retry on conflict for the end-to-end test "CA Injector for api services should update data when the certificate changes"
2022-03-16 14:12:35 +00:00
jetstack-bot
d60a5cf7d6
Merge pull request #4924 from maelvls/fix-flakiness
Retry on conflict for the end-to-end test "added an additional dnsName"
2022-03-16 13:36:35 +00:00
Maël Valais
3405edf821 make: add the targets 'e2e-setup-kind', 'e2e-setup-kind', and 'e2e'
The commands can be run concurrently, with the exception of e2e that
has to be run after e2e-setup is done. The e2e target does not check
whether cert-manager and the addons are installed.

The two only scripts that were kept are:

- make/e2e.sh      (previously called ./devel/run-e2e.sh)
- make/cluster.sh  (previsouly called ./devel/cluster/create.sh)

The reason for the removal of the other scripts is that they didn't
have that much logic and could easily ported to Make, improving greatly
the execution speed thanks to make's concurrency.

make/e2e.sh now behaves "as expected" when using -ginkgo.focus or
GINKGO_FOCUS; previously, the logs would not be shown before the end
of the test.

make/cluster.sh has lost the ability to create an OpenShift 3.11 cluster.
for running the end-to-end tests. The two reasons are that OpenShift 4
wasn't supported by the script devel/cluster/create.sh, and OpenShift
3.11 is not supported by cert-manager anymore.

The Makefile targets that were used in the Prow jobs (verify, verify_deps,
verify_chart, verify_upgrade, and cluster) have been kept around. They
now show a warning to encourage people to use the new Make-based targets.
When running one of the deprecated targets the Makefile won't check the
presence of the system tools such as Go and jq, since Bazel takes care of
these dependencies.

On version change, downloaded tools and images are re-downloaded. The
command 'make clean' now keeps the downloaded images and tools.

Note that a lot of attention has been put into having a Make system that works
flawlessly both on Linux and on BSDs (such as macOS).

You will note that some recursive calls to make are made, and $(MAKE)
instead of plain "make" is used in that case. If we didn't use $(MAKE),
we would have concurrency issues, and warnings such as:

  make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-13 12:32:08 +01:00
Maël Valais
ebe3b39c65 e2e: remove annoying "Running with unsupported features: Ed25519"
The messages "Running test suite with unsupported features: <list>" was
initially meant to remind us, in case of failure, why a given test would
be failing (i.e., it could be failing due to a set of supported features
too wide or too restrictive). This message should only show on failures;
as it is, it is not actionabe since it does not mention which issuer is
being tested. Removing this log line improves the user experience of
running the Ginkgo suite: the green dots, signifying a passing test, are
not interleaved with these messages.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-13 12:13:39 +01:00
Maël Valais
5fad0e6de4 e2e: remove annoying "Configuring details for shared cluster addons"
The Ginkgo logs would be constantly printing this message. Since this
message does not contain any actionable information, I figured we could
remove it. As a consequence, the user experience of running the Ginkgo
suite has slightly improved, since the green dots (signifying a passing
test) aren't interleaved with these messages.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-13 12:11:35 +01:00
irbekrm
e1e416aa6f Remvoes the creation of an unused HTTPRoute in tests
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-12 16:22:33 +00:00
irbekrm
cdaeb0599a Removes the creation of the unused test istio GatewayClass
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-12 16:13:06 +00:00
irbekrm
1e4c2e378b Explicitly specify group name in test gateway cert ref
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-12 16:09:29 +00:00
Tathagata Paul
3fb21d156c add more e2e tests for issuer ready state in conformance tests
Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>
2022-03-08 19:14:31 +05:30
Maël Valais
6b7262ba93 e2e: retry on conflict for the test "added an additional dnsName"
The test:

    [Conformance] Certificates with issuer type ACME DNS01 Issuer should allow updating an existing certificate with a new dns name

was flaky due to an update that was not properly retried on conflict.
The error was:

    Operation cannot be fulfilled on certificates.cert-manager.io \"testcert\": the object has been modified

This error appeared in 127 different prow jobs.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-07 18:41:43 +01:00
Maël Valais
6620f4b024 e2e: fix flakiness: "CA Injector should update data when the certificate changes"
The error:

    Operation cannot be fulfilled on certificates.cert-manager.io "serving-certs"

has appeared in 162 different prow builds in the past.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-07 18:41:07 +01:00
Tathagata Paul
6503f4f83c e2e for issuers and cluster issuers ready state
Signed-off-by: Tathagata Paul <tathagatapaul7@gmail.com>
2022-03-03 19:15:36 +05:30
Jake Sanders
74ddda40cb
goimports
Signed-off-by: Jake Sanders <i@am.so-aweso.me>
2022-03-01 15:27:33 +00:00
Jake Sanders
10979e1e27
Tidy imports and copyright preamble
Signed-off-by: Jake Sanders <i@am.so-aweso.me>
2022-03-01 15:05:25 +00:00
Jake Sanders
72efaad2b2
Protocol type must be TCP, Listeners must have a name
Signed-off-by: Jake Sanders <i@am.so-aweso.me>
2022-03-01 15:05:22 +00:00
Jake Sanders
c08f46711a
Add contour, weed out some more references to v1alpha1
Signed-off-by: Jake Sanders <i@am.so-aweso.me>
2022-03-01 15:05:19 +00: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
Jake Sanders
c96d91d586
Update the sig-network Gateway API support to v1alpha2
Co-authored-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
Signed-off-by: Jake Sanders <i@am.so-aweso.me>
2022-03-01 15:05:17 +00:00
joshvanl
566582956a Adds Gateway API feature gate check to certificate suite conformance test
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-14 12:41:09 +00:00
joshvanl
d3052a81e4 Require Gateway API feature gate for Gateway API tests. Add a helper
func

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-14 11:51:15 +00:00
joshvanl
82346f9027 Adds check in additionaloutputformat e2e test suite for ServerSideApply
which is required to be enabled

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 17:07:25 +00:00
joshvanl
19b68c9ba2 Update SecretTemplate comments on policy checks
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-07 15:02:51 +00:00
joshvanl
d5365af662 Adds e2e tests for additional output formats
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-07 14:43:25 +00:00
Ashley Davis
3a055cc2f5
rename all uses of github.com/jetstack/cert-manager
This was done by running the following command twice:

 ```bash
 grep -Ri "github.com/jetstack/cert-manager" . | \
 cut -d":" -f1 | \
 sort | \
 uniq | \
 xargs sed -i
 "s/github.com\/jetstack\/cert-manager/github.com\/cert-manager\/cert-manager/"
 ```

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-02 09:08:31 +00:00
joshvanl
1df5afc028 Update secret template e2e test for new issuing controller field manager
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-01-27 12:51:49 +00:00
joshvanl
c18571a78d Remove json tags from internal API types.
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-01-18 14:04:53 +00:00
jetstack-bot
051a763ee5
Merge pull request #4638 from JoshVanL/controllers-certificates-secret-template
SecretTemplate reconciliation. SecretManager Apply
2022-01-18 13:28:57 +00:00