Skip to content

Commit 6a35d4b

Browse files
Merge pull request #51 from IBM/ashima
Add `pod-security.kubernetes.io` labels in namespace
2 parents c470d3e + 479730e commit 6a35d4b

File tree

22 files changed

+167
-191
lines changed

22 files changed

+167
-191
lines changed

.secrets.baseline

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2024-07-04T13:24:14Z",
6+
"generated_at": "2024-10-28T04:49:57Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.22 as builder
2+
FROM golang:1.23 as builder
33
ARG TARGETOS
44
ARG TARGETARCH
55

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
196196
ENVTEST ?= $(LOCALBIN)/setup-envtest
197197

198198
## Tool Versions
199-
KUSTOMIZE_VERSION ?= v3.8.7
200-
CONTROLLER_TOOLS_VERSION ?= v0.15.0
199+
KUSTOMIZE_VERSION ?= v5.5.0
200+
CONTROLLER_TOOLS_VERSION ?= v0.16.4
201201

202202
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
203203
.PHONY: kustomize

config/crd/bases/objectdriver.csi.ibm.com_ibmobjectcsis.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.16.4
77
name: ibmobjectcsis.objectdriver.csi.ibm.com
88
spec:
99
group: objectdriver.csi.ibm.com
@@ -329,7 +329,7 @@ spec:
329329
pod labels will be ignored. The default value is empty.
330330
The same key is forbidden to exist in both matchLabelKeys and labelSelector.
331331
Also, matchLabelKeys cannot be set when labelSelector isn't set.
332-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
332+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
333333
items:
334334
type: string
335335
type: array
@@ -344,7 +344,7 @@ spec:
344344
pod labels will be ignored. The default value is empty.
345345
The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
346346
Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
347-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
347+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
348348
items:
349349
type: string
350350
type: array
@@ -511,7 +511,7 @@ spec:
511511
pod labels will be ignored. The default value is empty.
512512
The same key is forbidden to exist in both matchLabelKeys and labelSelector.
513513
Also, matchLabelKeys cannot be set when labelSelector isn't set.
514-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
514+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
515515
items:
516516
type: string
517517
type: array
@@ -526,7 +526,7 @@ spec:
526526
pod labels will be ignored. The default value is empty.
527527
The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
528528
Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
529-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
529+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
530530
items:
531531
type: string
532532
type: array
@@ -691,7 +691,7 @@ spec:
691691
pod labels will be ignored. The default value is empty.
692692
The same key is forbidden to exist in both matchLabelKeys and labelSelector.
693693
Also, matchLabelKeys cannot be set when labelSelector isn't set.
694-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
694+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
695695
items:
696696
type: string
697697
type: array
@@ -706,7 +706,7 @@ spec:
706706
pod labels will be ignored. The default value is empty.
707707
The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
708708
Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
709-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
709+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
710710
items:
711711
type: string
712712
type: array
@@ -873,7 +873,7 @@ spec:
873873
pod labels will be ignored. The default value is empty.
874874
The same key is forbidden to exist in both matchLabelKeys and labelSelector.
875875
Also, matchLabelKeys cannot be set when labelSelector isn't set.
876-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
876+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
877877
items:
878878
type: string
879879
type: array
@@ -888,7 +888,7 @@ spec:
888888
pod labels will be ignored. The default value is empty.
889889
The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
890890
Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
891-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
891+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
892892
items:
893893
type: string
894894
type: array
@@ -1344,7 +1344,7 @@ spec:
13441344
pod labels will be ignored. The default value is empty.
13451345
The same key is forbidden to exist in both matchLabelKeys and labelSelector.
13461346
Also, matchLabelKeys cannot be set when labelSelector isn't set.
1347-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
1347+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
13481348
items:
13491349
type: string
13501350
type: array
@@ -1359,7 +1359,7 @@ spec:
13591359
pod labels will be ignored. The default value is empty.
13601360
The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
13611361
Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
1362-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
1362+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
13631363
items:
13641364
type: string
13651365
type: array
@@ -1526,7 +1526,7 @@ spec:
15261526
pod labels will be ignored. The default value is empty.
15271527
The same key is forbidden to exist in both matchLabelKeys and labelSelector.
15281528
Also, matchLabelKeys cannot be set when labelSelector isn't set.
1529-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
1529+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
15301530
items:
15311531
type: string
15321532
type: array
@@ -1541,7 +1541,7 @@ spec:
15411541
pod labels will be ignored. The default value is empty.
15421542
The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
15431543
Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
1544-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
1544+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
15451545
items:
15461546
type: string
15471547
type: array
@@ -1706,7 +1706,7 @@ spec:
17061706
pod labels will be ignored. The default value is empty.
17071707
The same key is forbidden to exist in both matchLabelKeys and labelSelector.
17081708
Also, matchLabelKeys cannot be set when labelSelector isn't set.
1709-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
1709+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
17101710
items:
17111711
type: string
17121712
type: array
@@ -1721,7 +1721,7 @@ spec:
17211721
pod labels will be ignored. The default value is empty.
17221722
The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
17231723
Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
1724-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
1724+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
17251725
items:
17261726
type: string
17271727
type: array
@@ -1888,7 +1888,7 @@ spec:
18881888
pod labels will be ignored. The default value is empty.
18891889
The same key is forbidden to exist in both matchLabelKeys and labelSelector.
18901890
Also, matchLabelKeys cannot be set when labelSelector isn't set.
1891-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
1891+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
18921892
items:
18931893
type: string
18941894
type: array
@@ -1903,7 +1903,7 @@ spec:
19031903
pod labels will be ignored. The default value is empty.
19041904
The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
19051905
Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
1906-
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
1906+
This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
19071907
items:
19081908
type: string
19091909
type: array

config/crd/bases/objectdriver.csi.ibm.com_recoverstalevolumes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.16.4
77
name: recoverstalevolumes.objectdriver.csi.ibm.com
88
spec:
99
group: objectdriver.csi.ibm.com

config/manager/manager.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ metadata:
77
app.kubernetes.io/instance: system
88
app.kubernetes.io/component: manager
99
app.kubernetes.io/created-by: ibm-object-csi-driver-operator
10+
pod-security.kubernetes.io/audit: privileged
11+
pod-security.kubernetes.io/audit-version: latest
12+
pod-security.kubernetes.io/enforce: privileged
13+
pod-security.kubernetes.io/enforce-version: latest
14+
pod-security.kubernetes.io/warn: privileged
15+
pod-security.kubernetes.io/warn-version: latest
1016
name: system
1117
---
1218
apiVersion: apps/v1

config/rbac/role.yaml

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ rules:
2525
- ""
2626
resources:
2727
- nodes
28+
- secrets
2829
verbs:
2930
- get
3031
- list
@@ -80,14 +81,6 @@ rules:
8081
- pods/log
8182
verbs:
8283
- get
83-
- apiGroups:
84-
- ""
85-
resources:
86-
- secrets
87-
verbs:
88-
- get
89-
- list
90-
- watch
9184
- apiGroups:
9285
- ""
9386
resources:
@@ -152,31 +145,6 @@ rules:
152145
- objectdriver.csi.ibm.com
153146
resources:
154147
- ibmobjectcsis
155-
verbs:
156-
- create
157-
- delete
158-
- get
159-
- list
160-
- patch
161-
- update
162-
- watch
163-
- apiGroups:
164-
- objectdriver.csi.ibm.com
165-
resources:
166-
- ibmobjectcsis/finalizers
167-
verbs:
168-
- update
169-
- apiGroups:
170-
- objectdriver.csi.ibm.com
171-
resources:
172-
- ibmobjectcsis/status
173-
verbs:
174-
- get
175-
- patch
176-
- update
177-
- apiGroups:
178-
- objectdriver.csi.ibm.com
179-
resources:
180148
- recoverstalevolumes
181149
verbs:
182150
- create
@@ -189,12 +157,14 @@ rules:
189157
- apiGroups:
190158
- objectdriver.csi.ibm.com
191159
resources:
160+
- ibmobjectcsis/finalizers
192161
- recoverstalevolumes/finalizers
193162
verbs:
194163
- update
195164
- apiGroups:
196165
- objectdriver.csi.ibm.com
197166
resources:
167+
- ibmobjectcsis/status
198168
- recoverstalevolumes/status
199169
verbs:
200170
- get

controllers/fake/client_create/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ func (t versionedTracker) Add(obj runtime.Object) error {
294294
return nil
295295
}
296296

297-
func (t versionedTracker) Create(gvr schema.GroupVersionResource, obj runtime.Object, ns string) error {
297+
func (t versionedTracker) Create(gvr schema.GroupVersionResource, obj runtime.Object, ns string, opts ...metav1.CreateOptions) error {
298298
accessor, err := meta.Accessor(obj)
299299
if err != nil {
300300
return fmt.Errorf("failed to get accessor for object: %w", err)
@@ -352,7 +352,7 @@ func convertFromUnstructuredIfNecessary(s *runtime.Scheme, o runtime.Object) (ru
352352
return typed, nil
353353
}
354354

355-
func (t versionedTracker) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns string) error {
355+
func (t versionedTracker) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns string, opts ...metav1.UpdateOptions) error {
356356
isStatus := false
357357
// We apply patches using a client-go reaction that ends up calling the trackers Update. As we can't change
358358
// that reaction, we use the callstack to figure out if this originated from the status client.

controllers/fake/client_create/storageclass/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ func (t versionedTracker) Add(obj runtime.Object) error {
302302
return nil
303303
}
304304

305-
func (t versionedTracker) Create(gvr schema.GroupVersionResource, obj runtime.Object, ns string) error {
305+
func (t versionedTracker) Create(gvr schema.GroupVersionResource, obj runtime.Object, ns string, opts ...metav1.CreateOptions) error {
306306
accessor, err := meta.Accessor(obj)
307307
if err != nil {
308308
return fmt.Errorf("failed to get accessor for object: %w", err)
@@ -360,7 +360,7 @@ func convertFromUnstructuredIfNecessary(s *runtime.Scheme, o runtime.Object) (ru
360360
return typed, nil
361361
}
362362

363-
func (t versionedTracker) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns string) error {
363+
func (t versionedTracker) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns string, opts ...metav1.UpdateOptions) error {
364364
isStatus := false
365365
// We apply patches using a client-go reaction that ends up calling the trackers Update. As we can't change
366366
// that reaction, we use the callstack to figure out if this originated from the status client.

controllers/fake/client_delete/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ func (t versionedTracker) Add(obj runtime.Object) error {
301301
return nil
302302
}
303303

304-
func (t versionedTracker) Create(gvr schema.GroupVersionResource, obj runtime.Object, ns string) error {
304+
func (t versionedTracker) Create(gvr schema.GroupVersionResource, obj runtime.Object, ns string, opts ...metav1.CreateOptions) error {
305305
accessor, err := meta.Accessor(obj)
306306
if err != nil {
307307
return fmt.Errorf("failed to get accessor for object: %w", err)
@@ -359,7 +359,7 @@ func convertFromUnstructuredIfNecessary(s *runtime.Scheme, o runtime.Object) (ru
359359
return typed, nil
360360
}
361361

362-
func (t versionedTracker) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns string) error {
362+
func (t versionedTracker) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns string, opts ...metav1.UpdateOptions) error {
363363
isStatus := false
364364
// We apply patches using a client-go reaction that ends up calling the trackers Update. As we can't change
365365
// that reaction, we use the callstack to figure out if this originated from the status client.

0 commit comments

Comments
 (0)