diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 8cf84ba6..3ef2c0d4 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -42,8 +42,10 @@ jobs: - name: Run smoke tests run: | kubectl apply -f ./config/samples + kubectl -n sourcer-system rollout status deploy/sourcer-controller --timeout=1m kubectl wait gitrepository/podinfo --for=condition=ready --timeout=1m kubectl wait helmrepository/podinfo --for=condition=ready --timeout=1m + kubectl -n sourcer-system logs deploy/sourcer-controller - name: Debug failure if: failure() run: | diff --git a/.gitignore b/.gitignore index 6590b56f..57c413ff 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,3 @@ # Dependency directories (remove the comment below to include it) # vendor/ bin/ -tmp/ \ No newline at end of file diff --git a/Makefile b/Makefile index fd97714e..efd4ac40 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,10 @@ deploy: manifests # Deploy controller dev image in the configured Kubernetes cluster in ~/.kube/config dev-deploy: manifests - ./hack/dev-deploy.sh $(IMG) + mkdir -p config/dev && cp config/default/* config/dev + cd config/dev && kustomize edit set image fluxcd/sourcer=${IMG} + kustomize build config/dev | kubectl apply -f - + rm -rf config/dev # Generate manifests e.g. CRD, RBAC etc. manifests: controller-gen @@ -66,8 +69,7 @@ docker-build: test docker-push: docker push ${IMG} -# find or download controller-gen -# download controller-gen if necessary +# Find or download controller-gen controller-gen: ifeq (, $(shell which controller-gen)) @{ \ @@ -82,5 +84,3 @@ CONTROLLER_GEN=$(GOBIN)/controller-gen else CONTROLLER_GEN=$(shell which controller-gen) endif - - diff --git a/hack/dev-deploy.sh b/hack/dev-deploy.sh deleted file mode 100755 index c9360a15..00000000 --- a/hack/dev-deploy.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit - -IMG=$1 -TMP_DIR="$(git rev-parse --show-toplevel)/tmp" - -mkdir -p ${TMP_DIR} - -cat << EOF | tee ${TMP_DIR}/kustomization.yaml -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -namespace: sourcer-system -namePrefix: sourcer- -bases: -- ../config/crd -- ../config/rbac -- ../config/manager -EOF - -cd ${TMP_DIR} && kustomize edit set image fluxcd/sourcer=${IMG} -kustomize build ${TMP_DIR} | kubectl apply -f - -rm -rf ${TMP_DIR} -kubectl -n sourcer-system rollout status deploy/sourcer-controller --timeout=1m