Skip to content

Commit 1fa7471

Browse files
committed
update values.yaml to adhere to kyverno pod-security-standards rules, also fixes bug in schema and docs
Signed-off-by: Tim Ramlot <[email protected]>
1 parent c77ff2d commit 1fa7471

File tree

4 files changed

+43
-118
lines changed

4 files changed

+43
-118
lines changed

deploy/charts/venafi-kubernetes-agent/README.md

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -198,36 +198,35 @@ Configures the HTTPS_PROXY environment variable where a HTTP proxy is required.
198198
199199
Configures the NO_PROXY environment variable where a HTTP proxy is required, but certain domains should be excluded.
200200
201-
#### **securityContext.capabilities.drop[0]** ~ `string`
201+
#### **securityContext** ~ `object`
202202
> Default value:
203203
> ```yaml
204-
> ALL
204+
> allowPrivilegeEscalation: false
205+
> capabilities:
206+
> drop:
207+
> - ALL
208+
> readOnlyRootFilesystem: true
209+
> runAsNonRoot: true
210+
> seccompProfile:
211+
> type: RuntimeDefault
205212
> ```
206-
#### **securityContext.readOnlyRootFilesystem** ~ `bool`
207-
> Default value:
208-
> ```yaml
209-
> true
210-
> ```
211-
#### **securityContext.runAsNonRoot** ~ `bool`
212-
> Default value:
213-
> ```yaml
214-
> true
215-
> ```
216-
#### **resources.requests.memory** ~ `string`
217-
> Default value:
218-
> ```yaml
219-
> 200Mi
220-
> ```
221-
#### **resources.requests.cpu** ~ `string`
222-
> Default value:
223-
> ```yaml
224-
> 200m
225-
> ```
226-
#### **resources.limits.memory** ~ `string`
213+
214+
Add Container specific SecurityContext settings to the container. Takes precedence over `podSecurityContext` when set. See https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-capabilities-for-a-container
215+
216+
#### **resources** ~ `object`
227217
> Default value:
228218
> ```yaml
229-
> 500Mi
219+
> limits:
220+
> memory: 500Mi
221+
> requests:
222+
> cpu: 200m
223+
> memory: 200Mi
230224
> ```
225+
226+
Set resource requests and limits for the pod.
227+
228+
Read [Venafi Kubernetes components deployment best practices](https://docs.venafi.cloud/vaas/k8s-components/c-k8s-components-best-practice/#scaling) to learn how to choose suitable CPU and memory resource requests and limits.
229+
231230
#### **nodeSelector** ~ `object`
232231
> Default value:
233232
> ```yaml

deploy/charts/venafi-kubernetes-agent/values.schema.json

Lines changed: 16 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -516,92 +516,35 @@
516516
"type": "number"
517517
},
518518
"helm-values.resources": {
519-
"additionalProperties": false,
520-
"properties": {
519+
"default": {
521520
"limits": {
522-
"$ref": "#/$defs/helm-values.resources.limits"
521+
"memory": "500Mi"
523522
},
524523
"requests": {
525-
"$ref": "#/$defs/helm-values.resources.requests"
526-
}
527-
},
528-
"type": "object"
529-
},
530-
"helm-values.resources.limits": {
531-
"additionalProperties": false,
532-
"properties": {
533-
"memory": {
534-
"$ref": "#/$defs/helm-values.resources.limits.memory"
535-
}
536-
},
537-
"type": "object"
538-
},
539-
"helm-values.resources.limits.memory": {
540-
"default": "500Mi",
541-
"type": "string"
542-
},
543-
"helm-values.resources.requests": {
544-
"additionalProperties": false,
545-
"properties": {
546-
"cpu": {
547-
"$ref": "#/$defs/helm-values.resources.requests.cpu"
548-
},
549-
"memory": {
550-
"$ref": "#/$defs/helm-values.resources.requests.memory"
524+
"cpu": "200m",
525+
"memory": "200Mi"
551526
}
552527
},
528+
"description": "Set resource requests and limits for the pod.\n\nRead [Venafi Kubernetes components deployment best practices](https://docs.venafi.cloud/vaas/k8s-components/c-k8s-components-best-practice/#scaling) to learn how to choose suitable CPU and memory resource requests and limits.",
553529
"type": "object"
554530
},
555-
"helm-values.resources.requests.cpu": {
556-
"default": "200m",
557-
"type": "string"
558-
},
559-
"helm-values.resources.requests.memory": {
560-
"default": "200Mi",
561-
"type": "string"
562-
},
563531
"helm-values.securityContext": {
564-
"additionalProperties": false,
565-
"properties": {
532+
"default": {
533+
"allowPrivilegeEscalation": false,
566534
"capabilities": {
567-
"$ref": "#/$defs/helm-values.securityContext.capabilities"
568-
},
569-
"readOnlyRootFilesystem": {
570-
"$ref": "#/$defs/helm-values.securityContext.readOnlyRootFilesystem"
571-
},
572-
"runAsNonRoot": {
573-
"$ref": "#/$defs/helm-values.securityContext.runAsNonRoot"
535+
"drop": [
536+
"ALL"
537+
]
538+
},
539+
"readOnlyRootFilesystem": true,
540+
"runAsNonRoot": true,
541+
"seccompProfile": {
542+
"type": "RuntimeDefault"
574543
}
575544
},
545+
"description": "Add Container specific SecurityContext settings to the container. Takes precedence over `podSecurityContext` when set. See https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-capabilities-for-a-container",
576546
"type": "object"
577547
},
578-
"helm-values.securityContext.capabilities": {
579-
"additionalProperties": false,
580-
"properties": {
581-
"drop": {
582-
"$ref": "#/$defs/helm-values.securityContext.capabilities.drop"
583-
}
584-
},
585-
"type": "object"
586-
},
587-
"helm-values.securityContext.capabilities.drop": {
588-
"items": {
589-
"$ref": "#/$defs/helm-values.securityContext.capabilities.drop[0]"
590-
},
591-
"type": "array"
592-
},
593-
"helm-values.securityContext.capabilities.drop[0]": {
594-
"default": "ALL",
595-
"type": "string"
596-
},
597-
"helm-values.securityContext.readOnlyRootFilesystem": {
598-
"default": true,
599-
"type": "boolean"
600-
},
601-
"helm-values.securityContext.runAsNonRoot": {
602-
"default": true,
603-
"type": "boolean"
604-
},
605548
"helm-values.serviceAccount": {
606549
"additionalProperties": false,
607550
"properties": {

deploy/charts/venafi-kubernetes-agent/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,22 @@ podSecurityContext: {}
111111
# Add Container specific SecurityContext settings to the container. Takes
112112
# precedence over `podSecurityContext` when set. See
113113
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-capabilities-for-a-container
114+
# +docs:property
114115
securityContext:
115116
capabilities:
116117
drop:
117118
- ALL
118119
readOnlyRootFilesystem: true
119120
runAsNonRoot: true
121+
allowPrivilegeEscalation: false
122+
seccompProfile: { type: RuntimeDefault }
120123

121124
# Set resource requests and limits for the pod.
122125
#
123126
# Read [Venafi Kubernetes components deployment best
124127
# practices](https://docs.venafi.cloud/vaas/k8s-components/c-k8s-components-best-practice/#scaling)
125128
# to learn how to choose suitable CPU and memory resource requests and limits.
129+
# +docs:property
126130
resources:
127131
requests:
128132
memory: 200Mi

make/verify-pod-security-standards-exceptions.yaml

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

0 commit comments

Comments
 (0)