Skip to content

Commit

Permalink
Fix Kustomization of operator image
Browse files Browse the repository at this point in the history
  • Loading branch information
Miel Donkers committed Nov 16, 2021
1 parent 15e8198 commit d8f894a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ deploy-minikube: manifests kustomize ## Convenience target to push the docker im
# Make sure the Cert-Manager is installed in the Minikube cluster, which is needed for the converting Mutating WebHook
[[ $$(kubectl get pods --namespace cert-manager -o jsonpath='{.items[0].status.containerStatuses[0].ready}' 2> /dev/null) == "true" ]] || (kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.3/cert-manager.yaml && kubectl wait --for=condition=READY pods --all -n cert-manager)
# Update correct Controller Manager image to be used
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
cd config/manager && $(KUSTOMIZE) edit set image instana/instana-agent-operator=${IMG}
# Make certain we don't try to pull images from somewhere else
$(KUSTOMIZE) build config/default | sed -e 's|\(imagePullPolicy:\s*\)Always|\1Never|' | kubectl apply -f -

Expand Down Expand Up @@ -213,7 +213,7 @@ endef
.PHONY: bundle
bundle: operator-sdk manifests kustomize ## Create the OLM bundle
$(OPERATOR_SDK) generate kustomize manifests -q
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
cd config/manager && $(KUSTOMIZE) edit set image "instana/instana-agent-operator=$(IMG)"
$(KUSTOMIZE) build config/manifests | sed -e 's|\(replaces:.*v\)0.0.0|\1$(PREV_VERSION)|' | $(OPERATOR_SDK) generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
./hack/patch-bundle.sh
$(OPERATOR_SDK) bundle validate ./bundle
Expand All @@ -223,5 +223,5 @@ bundle-build: ## Build the bundle image for OLM.
docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) .

controller-yaml: manifests kustomize ## Output the YAML for deployment, so it can be packaged with the release. Use `make --silent` to suppress other output.
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
cd config/manager && $(KUSTOMIZE) edit set image "instana/instana-agent-operator=$(IMG)"
$(KUSTOMIZE) build config/default
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ configMapGenerator:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
- name: instana/instana-agent-operator
newName: instana/instana-agent-operator
newTag: latest

0 comments on commit d8f894a

Please sign in to comment.