Skip to content

Commit

Permalink
CSPL-1997
Browse files Browse the repository at this point in the history
  • Loading branch information
jambrosiano committed Sep 6, 2022
1 parent 3d81d21 commit a74cc67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ IMG ?= controller:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.23

ignore-not-found ?= True

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
Expand Down Expand Up @@ -139,12 +141,12 @@ docker-push: ## Push docker image with the manager.
##@ Deployment

install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build config/crd | kubectl apply -f -
$(KUSTOMIZE) build config/crd | kubectl replace -f -

uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
$(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f -

deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
deploy: manifests kustomize uninstall ## Deploy controller to the K8s cluster specified in ~/.kube/config.
$(SED) "s/namespace: splunk-operator/namespace: ${NAMESPACE}/g" config/default/kustomization.yaml
$(SED) "s/value: WATCH_NAMESPACE_VALUE/value: \"${WATCH_NAMESPACE}\"/g" config/default/kustomization.yaml
$(SED) "s|SPLUNK_ENTERPRISE_IMAGE|${SPLUNK_ENTERPRISE_IMAGE}|g" config/default/kustomization.yaml
Expand Down
5 changes: 3 additions & 2 deletions test/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ if [ "${DEPLOYMENT_TYPE}" == "helm" ]; then
elif [ "${CLUSTER_WIDE}" != "true" ]; then
# Install the CRDs
echo "Installing enterprise CRDs..."
make kustomize
bin/kustomize build config/crd | kubectl apply -f -
make kustomize
make uninstall
bin/kustomize build config/crd | kubectl create -f -
else
echo "Installing enterprise operator from ${PRIVATE_SPLUNK_OPERATOR_IMAGE}..."
make deploy IMG=${PRIVATE_SPLUNK_OPERATOR_IMAGE} SPLUNK_ENTERPRISE_IMAGE=${PRIVATE_SPLUNK_ENTERPRISE_IMAGE} WATCH_NAMESPACE=""
Expand Down

0 comments on commit a74cc67

Please sign in to comment.