1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-15 17:51:01 +00:00
external-secrets/e2e/Makefile

75 lines
2.5 KiB
Makefile
Raw Normal View History

2021-04-24 23:39:06 +00:00
MAKEFLAGS += --warn-undefined-variables
SHELL := /bin/bash
.SHELLFLAGS := -euo pipefail -c
:sparkles: Kubernetes v1.24 upgrade (#1345) * build(deps): bump sigs.k8s.io/controller-runtime from 0.11.2 to 0.12.3 Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.11.2 to 0.12.3. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.11.2...v0.12.3) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * feat: bump kubernetes 1.24 Signed-off-by: Moritz Johner <beller.moritz@googlemail.com> * fix: backwards-compatible vault implementation Signed-off-by: Moritz Johner <beller.moritz@googlemail.com> * feat: add audiences field to serviceAccountRef This will be used by aws, azure, gcp, kubernetes & vault providers in combination with TokenRequest API: it will _append_ audience claims to provider-specific audiences. Signed-off-by: Moritz Johner <beller.moritz@googlemail.com> * feat: refactor kubernetes client to match provider/client interfaces the kubernetes provider mixed up provider and client interfaces which made it really hard to reason about. This commit separates into two structs, each implements one interface. The client struct fields have been renamed and annotated so their use and scope is clear. Signed-off-by: Moritz Johner <beller.moritz@googlemail.com> * fix: deprecate expirationSeconds expirationSeconds is not needed because we generate a service account token on the fly for a single use. There will be no replacement for this. Signed-off-by: Moritz Johner <beller.moritz@googlemail.com> * fix: rename token fetch audiences field Signed-off-by: Moritz Johner <beller.moritz@googlemail.com> * fix: generate CRDs Signed-off-by: Moritz Johner <beller.moritz@googlemail.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Moritz Johner <beller.moritz@googlemail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Moritz Johner <beller.moritz@googlemail.com>
2022-08-19 15:32:06 +00:00
KIND_IMG = "kindest/node:v1.24.2@sha256:1f0cee2282f43150b52dc7933183ed96abdcfc8d293f30ec07082495874876f1"
DOCKER_BUILD_ARGS ?=
2021-04-24 23:39:06 +00:00
export E2E_IMAGE_NAME ?= ghcr.io/external-secrets/external-secrets-e2e
export GINKGO_LABELS ?= !managed
export TEST_SUITES ?= provider generator flux argocd
2021-12-29 12:02:56 +00:00
export OCI_IMAGE_NAME = oci.external-secrets.io/external-secrets/external-secrets
2021-04-24 23:39:06 +00:00
start-kind: ## Start kind cluster
kind create cluster \
--name external-secrets \
--config kind.yaml \
--retain \
2021-08-04 13:18:56 +00:00
--image "$(KIND_IMG)"
2021-04-24 23:39:06 +00:00
test: e2e-image ## Run e2e tests against current kube context
$(MAKE) -C ../ docker.build \
IMAGE_NAME=$(IMAGE_NAME) \
VERSION=$(VERSION) \
ARCH=amd64 \
DOCKER_BUILD_ARGS="${DOCKER_BUILD_ARGS} --build-arg TARGETARCH=amd64 --build-arg TARGETOS=linux"
$(MAKE) -C ../ docker.build \
IMAGE_NAME=$(OCI_IMAGE_NAME) \
VERSION=$(VERSION) \
ARCH=amd64 \
DOCKER_BUILD_ARGS="${DOCKER_BUILD_ARGS} --build-arg TARGETARCH=amd64 --build-arg TARGETOS=linux"
kind load docker-image --name="external-secrets" $(IMAGE_NAME):$(VERSION)
kind load docker-image --name="external-secrets" $(OCI_IMAGE_NAME):$(VERSION)
kind load docker-image --name="external-secrets" $(E2E_IMAGE_NAME):$(VERSION)
2021-04-24 23:39:06 +00:00
./run.sh
test.managed: e2e-image ## Run e2e tests against current kube context
2021-12-29 12:02:56 +00:00
$(MAKE) -C ../ docker.build \
VERSION=$(VERSION) \
2021-12-29 12:02:56 +00:00
ARCH=amd64 \
DOCKER_BUILD_ARGS="${DOCKER_BUILD_ARGS} --build-arg TARGETARCH=amd64 --build-arg TARGETOS=linux"
$(MAKE) -C ../ docker.build \
IMAGE_NAME=$(OCI_IMAGE_NAME) \
VERSION=$(VERSION) \
ARCH=amd64 \
DOCKER_BUILD_ARGS="${DOCKER_BUILD_ARGS} --build-arg TARGETARCH=amd64 --build-arg TARGETOS=linux"
$(MAKE) -C ../ docker.push \
VERSION=$(VERSION)
2021-12-29 12:02:56 +00:00
$(MAKE) -C ../ docker.push \
IMAGE_NAME=$(OCI_IMAGE_NAME) \
VERSION=$(VERSION)
2021-12-29 12:02:56 +00:00
$(MAKE) -C ../ docker.push \
IMAGE_NAME=$(E2E_IMAGE_NAME) \
VERSION=$(VERSION)
2021-12-29 12:02:56 +00:00
./run.sh
2021-04-24 23:39:06 +00:00
e2e-bin:
CGO_ENABLED=0 go run github.com/onsi/ginkgo/v2/ginkgo build ./suites/...
2021-04-24 23:39:06 +00:00
e2e-image:
2021-04-24 23:39:06 +00:00
-rm -rf ./k8s/deploy
mkdir -p k8s
$(MAKE) -C ../ helm.generate
cp -r ../deploy ./k8s
docker build $(DOCKER_BUILD_ARGS) -t $(E2E_IMAGE_NAME):$(VERSION) -f Dockerfile ..
2021-12-29 12:02:56 +00:00
2021-04-24 23:39:06 +00:00
stop-kind: ## Stop kind cluster
kind delete cluster \
--name external-secrets \
help: ## displays this help message
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_\/-]+:.*?## / {printf "\033[34m%-18s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \
sort | \
grep -v '#'