Remove kyverno patch for pvcs
This commit is contained in:
parent
fdc827ee69
commit
19241a77b2
40
kustomizations/kyverno/pvc-patch.yaml
Normal file
40
kustomizations/kyverno/pvc-patch.yaml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
apiVersion: kyverno.io/v1
|
||||||
|
kind: ClusterPolicy
|
||||||
|
metadata:
|
||||||
|
name: replace-storage-class-by-openebs
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- name: replace-storage-class
|
||||||
|
match:
|
||||||
|
any:
|
||||||
|
- resources:
|
||||||
|
kinds:
|
||||||
|
- PersistentVolumeClaim
|
||||||
|
mutate:
|
||||||
|
patchStrategicMerge:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
volume.beta.kubernetes.io/storage-class: openebs-hostpath
|
||||||
|
spec:
|
||||||
|
storageClassName: openebs-hostpath
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
- name: remove-unwanted-annotations
|
||||||
|
match:
|
||||||
|
any:
|
||||||
|
- resources:
|
||||||
|
kinds:
|
||||||
|
- PersistentVolumeClaim
|
||||||
|
namespaces:
|
||||||
|
- games
|
||||||
|
mutate:
|
||||||
|
patchesJson6902: |-
|
||||||
|
- path: "/metadata/annotations/volume.beta.kubernetes.io~1storage-class"
|
||||||
|
op: replace
|
||||||
|
value: openebs-hostpath
|
||||||
|
- path: "/metadata/annotations/volume.beta.kubernetes.io~1storage-provisioner"
|
||||||
|
op: replace
|
||||||
|
value: openebs.io/local
|
||||||
|
- path: "/metadata/annotations/volume.kubernetes.io~1storage-provisioner"
|
||||||
|
op: replace
|
||||||
|
value: openebs.io/local
|
Loading…
Reference in New Issue
Block a user