forked from gatekeeper/gatekeeper-operator
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dale Haiducek <[email protected]>
- Loading branch information
1 parent
4593faf
commit 3fbc130
Showing
1 changed file
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -233,17 +233,28 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified | |
$(KUSTOMIZE) build config/crd | kubectl delete -f - | ||
|
||
.PHONY: deploy | ||
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. | ||
deploy: manifests kustomize patch-deployment apply-manifests unpatch-deployment ## Deploy controller to the K8s cluster specified in ~/.kube/config. | ||
|
||
.PHONY: apply-manifests | ||
apply-manifests: | ||
$(KUSTOMIZE) build config/default | kubectl apply -f - | ||
|
||
.PHONY: patch-deployment | ||
patch-deployment: | ||
cd config/default && $(KUSTOMIZE) edit set namespace $(NAMESPACE) | ||
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} | ||
$(KUSTOMIZE) build config/default | kubectl apply -f - | ||
|
||
.PHONY: unpatch-deployment | ||
unpatch-deployment: | ||
cd config/default && $(KUSTOMIZE) edit set namespace gatekeeper-system | ||
cd config/manager && $(KUSTOMIZE) edit set image controller=quay.io/gatekeeper/gatekeeper-operator:v$(VERSION) | ||
|
||
.PHONY: undeploy | ||
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. | ||
$(KUSTOMIZE) build config/default | kubectl delete -f - | ||
|
||
.PHONY: deploy-ci | ||
deploy-ci: install patch-image deploy ## Deploys the controller with a patched pull policy. | ||
deploy-ci: install patch-image deploy unpatch-image ## Deploys the controller with a patched pull policy. | ||
|
||
.PHONY: deploy-olm | ||
deploy-olm: | ||
|
@@ -260,6 +271,10 @@ deploy-using-olm: | |
patch-image: ## Patches the manager's image pull policy to be IfNotPresent. | ||
$(SED) -i 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' config/manager/manager.yaml | ||
|
||
.PHONY: unpatch-image | ||
unpatch-image: ## Patches the manager's image pull policy to be Always. | ||
$(SED) -i 's/imagePullPolicy: IfNotPresent/imagePullPolicy: Always/g' config/manager/manager.yaml | ||
|
||
.PHONY: controller-gen | ||
controller-gen: ## Download controller-gen locally if necessary. | ||
$(call go-get-tool,sigs.k8s.io/controller-tools/cmd/[email protected]) | ||
|