Skip to content

Commit a37e1f3

Browse files
authored
Keep basic permissions and remove wildcard* in NSS operator CSV (#285)
* Remove wildcard permission in NSS operator CSV Signed-off-by: YuChen <[email protected]> * upgrade operator-sdk Signed-off-by: YuChen <[email protected]> * add product name label Signed-off-by: YuChen <[email protected]> --------- Signed-off-by: YuChen <[email protected]>
1 parent 35064b7 commit a37e1f3

File tree

7 files changed

+86
-16
lines changed

7 files changed

+86
-16
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ CONTROLLER_GEN ?= $(shell which controller-gen)
2121
KUSTOMIZE ?= $(shell which kustomize)
2222
YQ_VERSION=3.4.0
2323
KUSTOMIZE_VERSION=v3.8.7
24-
OPERATOR_SDK_VERSION=v1.20.0
24+
OPERATOR_SDK_VERSION=v1.32.0
2525

2626
GOPATH=$(HOME)/go/bin/
2727

bundle.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
77
LABEL operators.operatorframework.io.bundle.package.v1=ibm-namespace-scope-operator
88
LABEL operators.operatorframework.io.bundle.channels.v1=v4.0
99
LABEL operators.operatorframework.io.bundle.channel.default.v1=v4.0
10-
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.28.0+git
10+
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.32.0
1111
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
1212
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2
1313

bundle/manifests/ibm-namespace-scope-operator.clusterserviceversion.yaml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ metadata:
2323
]
2424
capabilities: Seamless Upgrades
2525
containerImage: icr.io/cpopen/ibm-namespace-scope-operator:latest
26-
createdAt: "2023-02-26T12:14:20Z"
26+
createdAt: "2020-11-2T15:38:33Z"
2727
olm.skipRange: '<4.2.1'
28-
operators.operatorframework.io/builder: operator-sdk-v1.24.0
29-
operators.operatorframework.io/project_layout: go.kubebuilder.io/v2
3028
operators.openshift.io/infrastructure-features: '["disconnected"]'
29+
operators.operatorframework.io/builder: operator-sdk-v1.32.0
30+
operators.operatorframework.io/project_layout: go.kubebuilder.io/v2
3131
repository: https://github.com/IBM/ibm-namespace-scope-operator
3232
support: IBM
3333
labels:
@@ -93,8 +93,8 @@ spec:
9393
app.kubernetes.io/instance: ibm-namespace-scope-operator
9494
app.kubernetes.io/managed-by: ibm-namespace-scope-operator
9595
app.kubernetes.io/name: ibm-namespace-scope-operator
96-
productName: IBM_Cloud_Platform_Common_Services
9796
name: ibm-namespace-scope-operator
97+
productName: IBM_Cloud_Platform_Common_Services
9898
spec:
9999
affinity:
100100
nodeAffinity:
@@ -142,9 +142,10 @@ spec:
142142
permissions:
143143
- rules:
144144
- apiGroups:
145-
- '*'
145+
- rbac.authorization.k8s.io
146146
resources:
147-
- '*'
147+
- rolebindings
148+
- roles
148149
verbs:
149150
- create
150151
- delete
@@ -153,7 +154,40 @@ spec:
153154
- patch
154155
- update
155156
- watch
156-
- deletecollection
157+
- apiGroups:
158+
- ""
159+
resources:
160+
- configmaps
161+
- pods
162+
verbs:
163+
- create
164+
- delete
165+
- get
166+
- list
167+
- patch
168+
- update
169+
- watch
170+
- apiGroups:
171+
- operators.coreos.com
172+
resources:
173+
- clusterserviceversions
174+
verbs:
175+
- get
176+
- list
177+
- patch
178+
- update
179+
- watch
180+
- apiGroups:
181+
- operator.ibm.com
182+
resources:
183+
- namespacescopes
184+
- namespacescopes/status
185+
verbs:
186+
- get
187+
- list
188+
- patch
189+
- update
190+
- watch
157191
serviceAccountName: ibm-namespace-scope-operator
158192
strategy: deployment
159193
installModes:

bundle/metadata/annotations.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ annotations:
66
operators.operatorframework.io.bundle.package.v1: ibm-namespace-scope-operator
77
operators.operatorframework.io.bundle.channels.v1: v4.0
88
operators.operatorframework.io.bundle.channel.default.v1: v4.0
9-
operators.operatorframework.io.metrics.builder: operator-sdk-v1.28.0+git
9+
operators.operatorframework.io.metrics.builder: operator-sdk-v1.32.0
1010
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
1111
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2
1212

config/manager/manager.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ metadata:
1212
app.kubernetes.io/instance: "ibm-namespace-scope-operator"
1313
app.kubernetes.io/managed-by: "ibm-namespace-scope-operator"
1414
app.kubernetes.io/name: "ibm-namespace-scope-operator"
15+
productName: IBM_Cloud_Platform_Common_Services
1516
spec:
1617
selector:
1718
matchLabels:
@@ -24,6 +25,7 @@ spec:
2425
app.kubernetes.io/instance: ibm-namespace-scope-operator
2526
app.kubernetes.io/managed-by: "ibm-namespace-scope-operator"
2627
app.kubernetes.io/name: "ibm-namespace-scope-operator"
28+
productName: IBM_Cloud_Platform_Common_Services
2729
annotations:
2830
productName: "IBM Cloud Platform Common Services"
2931
productID: "068a62892a1e4db39641342e592daa25"

config/manifests/bases/ibm-namespace-scope-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ metadata:
66
capabilities: Seamless Upgrades
77
containerImage: icr.io/cpopen/ibm-namespace-scope-operator:latest
88
createdAt: "2020-11-2T15:38:33Z"
9+
operators.openshift.io/infrastructure-features: '["disconnected"]'
910
operators.operatorframework.io/builder: operator-sdk-v1.1.0
1011
operators.operatorframework.io/project_layout: go.kubebuilder.io/v2
11-
operators.openshift.io/infrastructure-features: '["disconnected"]'
1212
repository: https://github.com/IBM/ibm-namespace-scope-operator
1313
support: IBM
1414
labels:

config/rbac/role.yaml

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,53 @@ kind: Role
33
metadata:
44
name: ibm-namespace-scope-operator
55
rules:
6-
- apiGroups:
7-
- "*"
6+
- verbs:
7+
- create
8+
- delete
9+
- get
10+
- list
11+
- patch
12+
- update
13+
- watch
14+
apiGroups:
15+
- rbac.authorization.k8s.io
816
resources:
9-
- "*"
10-
verbs:
17+
- rolebindings
18+
- roles
19+
- verbs:
1120
- create
1221
- delete
1322
- get
1423
- list
1524
- patch
1625
- update
1726
- watch
18-
- deletecollection
27+
apiGroups:
28+
- ''
29+
resources:
30+
- configmaps
31+
- pods
32+
- verbs:
33+
- get
34+
- list
35+
- patch
36+
- update
37+
- watch
38+
apiGroups:
39+
- operators.coreos.com
40+
resources:
41+
- clusterserviceversions
42+
- verbs:
43+
- get
44+
- list
45+
- patch
46+
- update
47+
- watch
48+
apiGroups:
49+
- operator.ibm.com
50+
resources:
51+
- namespacescopes
52+
- namespacescopes/status
1953
---
2054
apiVersion: rbac.authorization.k8s.io/v1
2155
kind: ClusterRole

0 commit comments

Comments
 (0)