Commit Graph

1089 Commits

Author SHA1 Message Date
joshvanl
328ea2b632 Change all scripts #!/bin/bash -> #!/usr/bin/env bash. Also changes same
for Makefile SHELL

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-07-04 14:49:34 +01:00
jetstack-bot
5a4e7654d4
Merge pull request #5097 from lucacome/bump-k8s-deps
Bump k8s.io dependencies
2022-07-04 14:44:45 +01:00
Luca Comellini
aaa513de00
Bump k8s.io dependencies
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-06-30 15:16:14 -07:00
Ashley Davis
ca35696244
add make-based upgrade test
This uses cmctl instead of kubectl_cert-manager, uses make instead of
bazel and fixes an incorrect container name in
test/fixtures/upgrade/overlay/cainjector-ops.yaml

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-06-30 22:35:39 +01: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
jetstack-bot
bbf2b58a5e
Merge pull request #5187 from irbekrm/cleanup_kind_config
Clean up kind config
2022-06-21 16:22:48 +01: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
bd842caabe Removes unused kind config
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-06-08 17:40:09 +01: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
Richard Wall
557d14a0cd Refactor the update and updateStatus to a single deferred function
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2022-05-12 16:51:30 +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
jetstack-bot
4ec33298a2
Merge pull request #5081 from wallrj/3640-cleanup
Challenge cleanup improvements
2022-05-05 11:19:28 +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
Richard Wall
6a4fffbedc Test that the cleanup is performed
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2022-04-29 17:51:34 +01:00
irbekrm
58b633aa04 Code review feedback
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-29 12:42:41 +01:00
irbekrm
030ee91f5e Integration tests use SSA instead of Update to update test resources
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-28 14:51:19 +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
lonelyCZ
53d8a07397 Add a unit test for challenges reScheduler
Signed-off-by: lonelyCZ <531187475@qq.com>
2022-04-08 14:35:41 +08: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
fa411f187d Fix golang linting
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-03-29 13:59:10 +01:00
joshvanl
c54451092e Adds integration tests for owner reference post issuance checks
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-03-29 13:54:27 +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
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
jetstack-bot
ca32961253
Merge pull request #4772 from irbekrm/exp_backoff
Exponential backoff for retrying failed certificate issuances
2022-03-21 20:31:23 +00: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
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
8e81e01932 Adds an integration test for exponential backoff
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-21 07:33:51 +00:00
irbekrm
9824ab0949 certificates-issuing controller sets status.issuanceAttempts when certificate issuance has failed
This field tracks the number of continuous failures and is used to implement exponential backoff

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-21 07:33:51 +00: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
jetstack-bot
8ebd63c7e9
Merge pull request #4913 from jahrlin/validate-privatekey-rotationpolicy
add validation for certificate.spec.privateKey.rotationPolicy
2022-03-11 13:28:35 +00:00
Joakim Ahrlin
ead4ab54ea add regression tests for certificate validation
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
2022-03-10 15:41:42 +01: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