Skip to content

Commit 709b187

Browse files
authored
Merge pull request #620 from snyk/feat/openshiftPvc
feat: Add OpenShift configuration for supporting PVC storage
2 parents 736a236 + 710a873 commit 709b187

File tree

4 files changed

+55
-1
lines changed

4 files changed

+55
-1
lines changed

snyk-operator/deploy/olm-catalog/snyk-operator/0.0.0/snyk-operator.v0.0.0.clusterserviceversion.yaml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@ metadata:
2020
"integrationApi": "",
2121
"monitorSecrets": "snyk-monitor",
2222
"scope": "Cluster",
23-
"temporaryStorageSize": "50Gi"
23+
"temporaryStorageSize": "50Gi",
24+
"pvc": {
25+
"enabled": false,
26+
"name": "snyk-monitor-pvc"
27+
},
28+
"initContainerImage": {
29+
"repository": "busybox",
30+
"tag": "latest"
31+
}
2432
}
2533
}
2634
]
@@ -51,6 +59,9 @@ spec:
5159
- kind: Secret
5260
name: snyk-monitor
5361
version: v1
62+
- kind: PersistentVolumeClaim
63+
name: snyk-monitor-pvc
64+
version: v1
5465
specDescriptors:
5566
- description: >-
5667
The name of the secret object that stores the Snyk controller secrets.
@@ -103,6 +114,30 @@ spec:
103114
path: image.tag
104115
x-descriptors:
105116
- 'urn:alm:descriptor:text'
117+
- description: >-
118+
True to use a PVC for temporary storage, false to use emptyDir.
119+
displayName: PVC enabled
120+
path: pvc.enabled
121+
x-descriptors:
122+
- 'urn:alm:descriptor:com.tectonic.ui:booleanSwitch'
123+
- description: >-
124+
The name of the PVC, when enabled.
125+
displayName: PVC name
126+
path: pvc.name
127+
x-descriptors:
128+
- 'urn:alm:descriptor:text'
129+
- description: >-
130+
The repo to use for initContainer, if overriding.
131+
displayName: InitContainer image repo
132+
path: initContainerImage.repository
133+
x-descriptors:
134+
- 'urn:alm:descriptor:text'
135+
- description: >-
136+
The tag for the initContainer's image.
137+
displayName: InitContainer image tag
138+
path: initContainerImage.tag
139+
x-descriptors:
140+
- 'urn:alm:descriptor:text'
106141
description: |-
107142
A Kubernetes Operator for creating and managing Snyk Kubernetes controller instances.
108143
@@ -142,6 +177,7 @@ spec:
142177
- secrets
143178
- services
144179
- pods
180+
- persistentvolumeclaims
145181
verbs:
146182
- '*'
147183
- apiGroups:

snyk-operator/deploy/olm-catalog/snyk-operator/0.0.0/snykmonitors.charts.helm.k8s.io.crd.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@ spec:
4646
type: string
4747
temporaryStorageSize:
4848
type: string
49+
pvc:
50+
properties:
51+
enabled:
52+
type: boolean
53+
name:
54+
type: string
55+
type: object
56+
initContainerImage:
57+
properties:
58+
repository:
59+
type: string
60+
tag:
61+
type: string
62+
type: object
4963
# "version" will be deprecated in apiextensions.k8s.io/v1
5064
version: v1alpha1
5165
versions:

test/fixtures/operator/custom-resource-k8s.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ metadata:
66
spec:
77
integrationApi: https://kubernetes-upstream.dev.snyk.io
88
temporaryStorageSize: 20Gi
9+
pvc:
10+
enabled: true

test/fixtures/operator/custom-resource.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ metadata:
66
spec:
77
integrationApi: https://kubernetes-upstream.dev.snyk.io
88
temporaryStorageSize: 20Gi
9+
pvc:
10+
enabled: true

0 commit comments

Comments
 (0)