diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 352bb7e..cf30f10 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,20 +63,13 @@ jobs: - name: Start minikube uses: medyagh/setup-minikube@d8c0eb871f6f455542491d86a574477bd3894533 # 0.0.18 - - name: Deploy cert-manager to minikube - run: | - helm repo add jetstack https://charts.jetstack.io --force-update - helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.14.5 --set installCRDs=true - sleep 5 - kubectl wait --for=condition=Ready -n cert-manager --all pods - - name: Deploy New Relic k8s-agents-operator to minikube run: | + helm uninstall k8s-agents-operator --ignore-not-found helm repo add k8s-agents-operator https://newrelic.github.io/k8s-agents-operator helm upgrade --install k8s-agents-operator k8s-agents-operator/k8s-agents-operator \ --namespace=default \ --set=licenseKey=${{ secrets.NEW_RELIC_LICENSE_KEY }} \ - --set=newRelicHost=${{ vars.NEW_RELIC_HOST }} \ --set=controllerManager.manager.image.tag=${{ inputs.K8S_OPERATOR_IMAGE_TAG }} sleep 5 kubectl wait --for=condition=Ready -n default --all pods diff --git a/tests/Makefile b/tests/Makefile index eaca216..c8aee18 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -31,41 +31,41 @@ cert-manager: # Install official k8s-agents-operator repo .PHONY: operator -operator: cert-manager license_key_secret +operator: helm uninstall k8s-agents-operator --ignore-not-found helm repo add k8s-agents-operator https://newrelic.github.io/k8s-agents-operator helm upgrade --install k8s-agents-operator k8s-agents-operator/k8s-agents-operator \ --create-namespace \ - --namespace=k8s-agents-operator \ + --namespace=newrelic \ --set=licenseKey=${NEW_RELIC_LICENSE_KEY} \ --set=controllerManager.manager.image.tag=edge sleep 1 - kubectl wait --for=condition=Ready -n k8s-agents-operator --all pods + kubectl wait --for=condition=Ready -n newrelic --all pods # Build and install local copy of k8s-agents-operator .PHONY: operator-local -operator-local: license_key_secret +operator-local: eval $$(minikube docker-env --shell=bash) && \ docker build ${LOCAL_OPERATOR_REPO_PATH}/ -t e2e/k8s-agents-operator:e2e helm uninstall k8s-agents-operator --ignore-not-found sleep 1 helm upgrade --install k8s-agents-operator ${LOCAL_OPERATOR_REPO_PATH}/charts/k8s-agents-operator/ \ --create-namespace \ - --namespace=k8s-agents-operator \ + --namespace=newrelic \ --set=licenseKey=${NEW_RELIC_LICENSE_KEY} \ --set=controllerManager.manager.image.pullPolicy=Never \ --set=controllerManager.manager.image.repository=e2e/k8s-agents-operator \ --set=controllerManager.manager.image.tag=e2e sleep 1 - kubectl wait --for=condition=Ready -n k8s-agents-operator --all pods + kubectl wait --for=condition=Ready -n newrelic --all pods # Set license key in default namespace .PHONY: license_key_secret license_key_secret: - kubectl delete secret newrelic-key-secret --ignore-not-found + kubectl delete secret newrelic-key-secret --namespace=newrelic newrelic --ignore-not-found kubectl create secret generic newrelic-key-secret \ --from-literal="new_relic_license_key=${NEW_RELIC_LICENSE_KEY}" \ - -n default + --namespace=newrelic # Build local initcontainer image .PHONY: build-initcontainer