diff --git a/Makefile b/Makefile index 6c8333398..296b3a64b 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ VERSION ?= 0.0.1 OUTPUT_FILE ?= manifest.yaml DEPLOYMENT_NAMESPACE ?= unstructured-controller-namespace SUFFIX ?= "-test" +PVC_SIZE ?= 10Gi # CHANNELS define the bundle channels used in the bundle. # Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable") @@ -217,13 +218,17 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified .PHONY: deploy deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. + PVC_SIZE=${PVC_SIZE} envsubst < config/manager/pvc.yaml | sponge config/manager/pvc.yaml cd config/deploy && $(KUSTOMIZE) edit set image controller=${IMG} && $(KUSTOMIZE) edit set namespace "${DEPLOYMENT_NAMESPACE}" && $(KUSTOMIZE) edit set namesuffix -- "${SUFFIX}" $(KUSTOMIZE) build config/deploy | $(KUBECTL) apply -f - + git restore config/manager/pvc.yaml .PHONY: generate-deploy-manifests generate-deploy-manifests: manifests kustomize + PVC_SIZE=${PVC_SIZE} envsubst < config/manager/pvc.yaml | sponge config/manager/pvc.yaml cd config/deploy && $(KUSTOMIZE) edit set image controller=${IMG} && $(KUSTOMIZE) edit set namespace "${DEPLOYMENT_NAMESPACE}" && $(KUSTOMIZE) edit set namesuffix -- "${SUFFIX}" $(KUSTOMIZE) build config/deploy -o ${OUTPUT_FILE} + git restore config/manager/pvc.yaml .PHONY: undeploy undeploy: kustomize ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. diff --git a/config/manager/pvc.yaml b/config/manager/pvc.yaml index cc0142bd2..86709b15f 100644 --- a/config/manager/pvc.yaml +++ b/config/manager/pvc.yaml @@ -8,4 +8,4 @@ spec: storageClassName: standard resources: requests: - storage: 10Gi + storage: ${PVC_SIZE}