Skip to content

Commit 9986874

Browse files
Merge pull request #272 from mrogers950/drb_fix
Bug 2109153: Restore CSV ownership of ServiceAccounts
2 parents 20c92f9 + 45389d5 commit 9986874

19 files changed

+59
-243
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ IMAGE_TAG_BASE=$(IMAGE_REPO)/$(APP_NAME)
107107
# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=<some-registry>/<project-name-bundle>:<tag>)
108108
BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:$(TAG)
109109

110+
# Includes additional service accounts into the bundle CSV.
111+
BUNDLE_SA_OPTS ?= --extra-service-accounts file-integrity-daemon
112+
110113
# Image URL to use all building/pushing image targets
111114
IMG ?= $(IMAGE_TAG_BASE):$(TAG)
112115

@@ -302,7 +305,7 @@ bundle: check-operator-version operator-sdk manifests update-skip-range kustomiz
302305
$(SDK_BIN) generate kustomize manifests --apis-dir=./pkg/apis -q
303306
@echo "kustomize using deployment image $(IMG)"
304307
cd config/manager && $(KUSTOMIZE) edit set image $(APP_NAME)=$(IMG)
305-
$(KUSTOMIZE) build config/manifests | $(SDK_BIN) generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
308+
$(KUSTOMIZE) build config/manifests | $(SDK_BIN) generate bundle -q $(BUNDLE_SA_OPTS) --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
306309
$(SDK_BIN) bundle validate ./bundle
307310

308311
.PHONY: bundle-image
@@ -427,7 +430,6 @@ prep-e2e: kustomize
427430
mkdir -p $(TEST_SETUP_DIR)
428431
$(KUSTOMIZE) build config/e2e > $(TEST_DEPLOY)
429432
$(KUSTOMIZE) build config/crd > $(TEST_CRD)
430-
cat config/rbac-daemon/daemon_rolebinding.yaml >> $(TEST_DEPLOY)
431433

432434
ifdef IMAGE_FROM_CI
433435
e2e-set-image: kustomize

bundle/manifests/file-integrity-daemon_rbac.authorization.k8s.io_v1_role.yaml

Lines changed: 0 additions & 35 deletions
This file was deleted.

bundle/manifests/file-integrity-daemon_v1_serviceaccount.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

bundle/manifests/file-integrity-operator-metrics_rbac.authorization.k8s.io_v1_clusterrolebinding.yaml renamed to bundle/manifests/file-integrity-operator-metrics_rbac.authorization.k8s.io_v1_rolebinding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: rbac.authorization.k8s.io/v1
2-
kind: ClusterRoleBinding
2+
kind: RoleBinding
33
metadata:
44
creationTimestamp: null
55
name: file-integrity-operator-metrics

bundle/manifests/file-integrity-operator.clusterserviceversion.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,37 @@ spec:
131131
optional: true
132132
secretName: file-integrity-operator-serving-cert
133133
permissions:
134+
- rules:
135+
- apiGroups:
136+
- ""
137+
resources:
138+
- events
139+
- configmaps
140+
verbs:
141+
- create
142+
- apiGroups:
143+
- fileintegrity.openshift.io
144+
resources:
145+
- fileintegrities
146+
verbs:
147+
- get
148+
- watch
149+
- apiGroups:
150+
- security.openshift.io
151+
resourceNames:
152+
- privileged
153+
resources:
154+
- securitycontextconstraints
155+
verbs:
156+
- use
157+
- apiGroups:
158+
- events.k8s.io
159+
resources:
160+
- events
161+
verbs:
162+
- create
163+
- update
164+
serviceAccountName: file-integrity-daemon
134165
- rules:
135166
- apiGroups:
136167
- ""

bundle/manifests/prometheus-k8s_rbac.authorization.k8s.io_v1_rolebinding.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

config/default-bundle/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Bundle variant - no rbac-daemon inclusion
1+
# Bundle variant
22

33
namespace: openshift-file-integrity
44

config/default/kustomization.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# Deploy variant - includes rbac-daemon
1+
# Deploy variant
22

33
namespace: openshift-file-integrity
44

55
bases:
66
- ../rbac
7-
- ../rbac-daemon
87
- ../manager
98
- ../ns

config/rbac-daemon/daemon_rolebinding.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

config/rbac-daemon/kustomization.yaml

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)