Commit Graph

40 Commits

Author SHA1 Message Date
Ashley Davis
d7e57c9918
use order-only prerequisites where possible for tools
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-07-19 16:16:18 +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
Ashley Davis
e18908fb56
Use variable for curl, add retries
This adds multiple retries on every attempt we make to use curl, which
should help to reduce flakes. Uses a $(CURL) variable where possible so
that we have the same invocation everywhere.

Also switches to using the more verbose curl arguments, in an attempt to
make it easier to reason about how curl is configured.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-07-06 12:38:14 +01:00
Ashley Davis
cdfcc63951
check gatewayapi SHA256SUM
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-07-04 15:02:36 +01:00
Ashley Davis
80bbe953bb
fix name of command in example comment
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-06-28 16:24:28 +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
jetstack-bot
bbf2b58a5e
Merge pull request #5187 from irbekrm/cleanup_kind_config
Clean up kind config
2022-06-21 16:22:48 +01:00
irbekrm
ce55ddde2a Code review feedback
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-06-21 12:37:13 +01:00
jetstack-bot
448a0832bf
Merge pull request #5190 from irbekrm/kind_1_24
Bump kind, use upstream 1.24 image
2022-06-09 19:34:33 +01:00
irbekrm
accb40b4f9 Default kube version for test kind cluster to 1.24
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-06-09 16:54:14 +01: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
a76d85eab3 Allows kind to choose API version for kubeadm Cluster config
To be able to use single kind config for different Kubernetes versions

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-06-08 18:29:40 +01:00
irbekrm
a0d3d8eb0a Predefine what service IP range kind should use
Instead of trying to retrieve it after creating the cluster

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-06-08 17:40:08 +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
irbekrm
134398e939 Ensure that kube version can be modified
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-05-10 12:06:54 +01:00
irbekrm
324ce22482 Fix kube 1.24 image
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-05-10 12:06:31 +01:00
irbekrm
689ddcafa2 Cleanup + a couple TODOs
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-05-10 12:05:02 +01:00
irbekrm
6cb826833e Ensures Envoy ClusterIP is parameterized consistently
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-05-10 12:02:16 +01:00
irbekrm
9cda740b52 Allows creation of 1.24 kind cluster
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-05-04 16:51:34 +01:00
irbekrm
5bfdd3c0c6 Always save e2e test logs
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-27 18:32:51 +01:00
irbekrm
b1e12841d1 Don't use --force option to install addons with helm
As that makes it impossible to re-run the installation commands

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-22 12:03:54 +01:00
irbekrm
d720d8e02b Fix kind cluster creation with kube 1.19 and 1.18
By specifying a different kind config that does not use an etcd flag that was only add in later etcd versions

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-21 12:36:33 +01:00
Maël Valais
555544d23b make: avoid the message "warning: undefined variable 'CI'"
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-30 11:04:10 +02:00
jetstack-bot
65d3a1c89e
Merge pull request #4968 from maelvls/make-and-appversion
make: the AppVersion and AppGitCommit weren't set
2022-03-29 13:53:52 +01:00
Maël Valais
a9c225d573 make: e2e-setup-kind now properly prepulls image before "kind create"
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:45:08 +02:00
Maël Valais
10c4aa808f make: preload-kind-image now caches the kind image in "bin/downloaded"
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:45:08 +02:00
Maël Valais
f8187d17f2 make: e2e-setup-certmanager: fix the acmesolver image
The default value for --acme-http01-solver-image was off.

 quay.io/jetstack/cert-manager-acmesolver:v1.7.0-beta.0-260-gd0abb71ef0a78d
 <-------------------------------------->
           incorrect

 cert-manager-acmesolver-amd64:v1.7.0-beta.0-260-gd0abb71ef0a78d
 <--------------------------->
           correct

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:45:08 +02:00
Maël Valais
37628bf0ed make: e2e-setup-sampleexternalissuer: bump from v0.0.0-30 to v0.1.1
Not sure how the end-to-end tests were ever able to run previously. My
guess: the sample-external-issuer end-to-end suite is disabled.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-29 10:45:08 +02:00
Maël Valais
5be97dd755 make: re-add GOFLAGS to samplewebhook and pebble
I had removed GOFLAGS because I had added -X directives (for filling in
AppVersion and AppGitCommit) to GOFLAGS. It seems like go tool link does
not care whether the symbol exists or not, so it seems OK to use the
same GOFLAGS to build the samplewebhook and pebble even though the -X
directives don't make sense for them.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-25 20:44:04 +01:00
Maël Valais
de5c0bf381 make: the AppVersion and AppGitCommit weren't set
When checking how User-Agent headers would differ from v1.7.1 to
v1.8.0, The User-Agent looked off:

    cert-manager-issuers/v1.8.0 (linux/amd64) cert-manager/

The ending "/" should be followed by the git commit hash. It seems like
we forgot to port what Bazel does to fill AppVersion, AppGitCommit, and
AppGitState. This commit adds this feature to the Makefile. The
User-Agent should now look like this:

    cert-manager-issuers/v1.8.0 (linux/amd64) cert-manager/9dd5f6c85fde2c3ed58cd6c9e465bb5a4c1ca2b2
                 <----->
                This part depends
                on the component.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-25 20:44:04 +01:00
Maël Valais
d30f47293d make: warn people about e2e-setup-traefik and e2e-setup-haproxyingress
These two targets are not used by our end-to-end tests meaning that they
may either be broken or removed in the future.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-16 17:51:44 +01:00
Joakim Ahrlin
ff2d82f381 make: e2e-setup-haproxyingress: add haproxyingress arm64 image
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
2022-03-16 17:51:27 +01:00
Maël Valais
82190e7656 make: e2e-setup: pebble can now be built on M1 macs
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-16 13:30:21 +01:00
Maël Valais
0df0a2cf21 make: e2e-ci: export ARTIFACTS so that it goes to make/e2e.sh
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-15 17:04:25 +01:00
Maël Valais
9e56f63b0f make: e2e-setup: use eafxx/bind instead of sameersbn/bind
eafxx's container images are multi-arch which means M1 macs can run
bind on Colima.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-14 21:25:19 +01:00
Maël Valais
bbf5ab3c77 make: e2e-setup now skips bind and sampleexternalissuer on arm64
Otherwise, the target 'e2e-setup' fails. At least, that gives people a
chance to have some of the end-to-end tests pass. I added a warning to
let people know that they can still force using CRI_ARCH=amd64, which is
possible on Docker Desktop thanks to the QEMU emulation that kicks in
when a container with the arch amd64 tries to execute.

Note that this work around does not work on Colima at the moment.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-14 15:34:48 +01:00
Maël Valais
06d5f86e52 make: e2e-setup: projectcontour actually has an arm64 image
Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-14 15:33:19 +01:00
Joakim Ahrlin
63405375b8 fix kyverno_arm64 image format
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
2022-03-14 11:00:52 +01: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