Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the init container that decides the allowing of reconciliation of manager #301

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ FROM registry.access.redhat.com/ubi9/ubi-minimal
WORKDIR /
COPY --from=builder /workspace/bin/manager .
COPY --from=builder /workspace/bin/status-reporter .
COPY --from=builder /workspace/bin/deployment-guard .
COPY --from=builder /workspace/hack/entrypoint.sh entrypoint
USER 65532:65532

Expand Down
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,9 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
$(KUSTOMIZE) build config/crd | kubectl delete -f -

deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} && \
$(KUSTOMIZE) edit set image deployment-guard=$(IMG)
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
cd config/default && $(KUSTOMIZE) edit set image kube-rbac-proxy=$(RBAC_PROXY_IMG)
cd config/console && $(KUSTOMIZE) edit set image ocs-client-operator-console=$(OCS_CLIENT_CONSOLE_IMG) && \
$(KUSTOMIZE) edit set image deployment-guard=$(IMG)
cd config/console && $(KUSTOMIZE) edit set image ocs-client-operator-console=$(OCS_CLIENT_CONSOLE_IMG)
$(KUSTOMIZE) build config/default | sed "s|STATUS_REPORTER_IMAGE_VALUE|$(IMG)|g" | awk '{print}' | kubectl apply -f -

remove: ## Remove controller from the K8s cluster specified in ~/.kube/config.
Expand All @@ -114,10 +112,8 @@ remove-with-olm: ## Remove controller from the K8s cluster
bundle: manifests kustomize operator-sdk yq ## Generate bundle manifests and metadata, then validate generated files.
rm -rf ./bundle
$(OPERATOR_SDK) generate kustomize manifests -q
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG) && \
$(KUSTOMIZE) edit set image deployment-guard=$(IMG)
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
cd config/console && $(KUSTOMIZE) edit set image ocs-client-operator-console=$(OCS_CLIENT_CONSOLE_IMG) && \
$(KUSTOMIZE) edit set image deployment-guard=$(IMG) && \
$(KUSTOMIZE) edit set nameprefix $(OPERATOR_NAMEPREFIX)
cd config/default && \
$(KUSTOMIZE) edit set image kube-rbac-proxy=$(RBAC_PROXY_IMG) && \
Expand Down
31 changes: 1 addition & 30 deletions bundle/manifests/ocs-client-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
categories: Storage
console.openshift.io/plugins: '["odf-client-console"]'
containerImage: quay.io/ocs-dev/ocs-client-operator:latest
createdAt: "2024-11-27T03:54:42Z"
createdAt: "2025-02-06T12:49:53Z"
description: OpenShift Data Foundation client operator enables consumption of
storage services from a remote centralized OpenShift Data Foundation provider
cluster.
Expand Down Expand Up @@ -308,13 +308,6 @@ spec:
- get
- patch
- update
- apiGroups:
- ocs.openshift.io
resources:
- storageclusters
verbs:
- get
- list
- apiGroups:
- operators.coreos.com
resources:
Expand Down Expand Up @@ -545,17 +538,6 @@ spec:
volumeMounts:
- mountPath: /etc/tls/private
name: webhook-cert-secret
initContainers:
- command:
- /deployment-guard
env:
- name: OPERATOR_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/ocs-dev/ocs-client-operator:latest
name: deployment-guard
resources: {}
securityContext:
runAsNonRoot: true
serviceAccountName: ocs-client-operator-controller-manager
Expand Down Expand Up @@ -618,17 +600,6 @@ spec:
name: ocs-client-operator-console-nginx-log
- mountPath: /var/lib/nginx/tmp
name: ocs-client-operator-console-nginx-tmp
initContainers:
- command:
- /deployment-guard
env:
- name: OPERATOR_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/ocs-dev/ocs-client-operator:latest
name: deployment-guard
resources: {}
securityContext:
runAsNonRoot: true
serviceAccountName: ocs-client-operator-controller-manager
Expand Down
10 changes: 0 additions & 10 deletions config/console/console_init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ spec:
labels:
app.kubernetes.io/name: ocs-client-operator-console
spec:
initContainers:
- name: deployment-guard
image: deployment-guard:latest
command:
- /deployment-guard
env:
- name: OPERATOR_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
containers:
- name: ocs-client-operator-console
image: ocs-client-operator-console:latest
Expand Down
3 changes: 0 additions & 3 deletions config/console/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ resources:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: deployment-guard
newName: quay.io/ocs-dev/ocs-client-operator
newTag: latest
- name: ocs-client-operator-console
newName: quay.io/ocs-dev/ocs-client-console
newTag: latest
Expand Down
3 changes: 0 additions & 3 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@ images:
- name: controller
newName: quay.io/ocs-dev/ocs-client-operator
newTag: latest
- name: deployment-guard
newName: quay.io/ocs-dev/ocs-client-operator
newTag: latest
10 changes: 0 additions & 10 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@ spec:
spec:
securityContext:
runAsNonRoot: true
initContainers:
- name: deployment-guard
image: deployment-guard:latest
command:
- /deployment-guard
env:
- name: OPERATOR_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
containers:
- command:
- /entrypoint
Expand Down
7 changes: 0 additions & 7 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,6 @@ rules:
- get
- patch
- update
- apiGroups:
- ocs.openshift.io
resources:
- storageclusters
verbs:
- get
- list
- apiGroups:
- operators.coreos.com
resources:
Expand Down
1 change: 0 additions & 1 deletion hack/go-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ set -x

go build -a -o ${GOBIN:-bin}/manager cmd/main.go
go build -a -o ${GOBIN:-bin}/status-reporter ./service/status-report/main.go
go build -a -o ${GOBIN:-bin}/deployment-guard ./service/deployment-guard/main.go
1 change: 0 additions & 1 deletion internal/controller/operatorconfigmap_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ func (c *OperatorConfigMapReconciler) SetupWithManager(mgr ctrl.Manager) error {
//+kubebuilder:rbac:groups=console.openshift.io,resources=consoleplugins,verbs=*
//+kubebuilder:rbac:groups=operators.coreos.com,resources=subscriptions,verbs=get;list;watch;update
//+kubebuilder:rbac:groups=admissionregistration.k8s.io,resources=validatingwebhookconfigurations,verbs=get;list;update;create;watch;delete
//+kubebuilder:rbac:groups=ocs.openshift.io,resources=storageclusters,verbs=get;list
//+kubebuilder:rbac:groups=csi.ceph.io,resources=operatorconfigs,verbs=get;list;update;create;watch;delete
//+kubebuilder:rbac:groups=csi.ceph.io,resources=drivers,verbs=get;list;update;create;watch;delete

Expand Down
106 changes: 0 additions & 106 deletions service/deployment-guard/main.go

This file was deleted.

Loading