Skip to content

Commit f132753

Browse files
committed
Merge branch 'AbhiK_resolve_certs_warning' into 'master'
AbhiK_Bugfix_34265574 See merge request rac-docker-dev/oracle-database-operator!208
2 parents 82d2273 + d722737 commit f132753

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ IMG ?= controller:latest
2323
CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false"
2424
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
2525
ENVTEST_K8S_VERSION = 1.21
26+
# Operator YAML file
27+
OPERATOR_YAML=$$(basename $$(pwd)).yaml
2628

2729
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
2830
ifeq (,$(shell go env GOBIN))
@@ -90,9 +92,14 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in
9092
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
9193
$(KUSTOMIZE) build config/default | kubectl apply -f -
9294

95+
# Bug:34265574
96+
# Used sed to reposition the controller-manager Deployment after the certificate creation in the OPERATOR_YAML
9397
operator-yaml: manifests kustomize
9498
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
95-
$(KUSTOMIZE) build config/default > $$(basename $$(pwd)).yaml
99+
$(KUSTOMIZE) build config/default > "${OPERATOR_YAML}"
100+
sed -i.bak -e '/^apiVersion: apps\/v1/,/---/d' "${OPERATOR_YAML}"
101+
(echo --- && sed '/^apiVersion: apps\/v1/,/---/!d' "${OPERATOR_YAML}.bak") >> "${OPERATOR_YAML}"
102+
rm "${OPERATOR_YAML}.bak"
96103

97104
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config.
98105
$(KUSTOMIZE) build config/default | kubectl delete -f -

0 commit comments

Comments
 (0)