Skip to content

Commit 6241a07

Browse files
update helm sample according changes in the k8s api (#5851)
1 parent 3749a14 commit 6241a07

File tree

6 files changed

+10
-3
lines changed

6 files changed

+10
-3
lines changed

hack/generate/samples/internal/helm/memcached.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (mh *Memcached) Run() {
7575
// role and cause sanity testing to fail.
7676
os.Setenv("KUBECONFIG", "broken_so_we_generate_static_default_rules")
7777

78-
helmChartPath := "../../../hack/generate/samples/internal/helm/testdata/memcached-0.0.1.tgz"
78+
helmChartPath := "../../../hack/generate/samples/internal/helm/testdata/memcached-0.0.2.tgz"
7979
log.Infof("creating the project using the helm chart in: (%v)", helmChartPath)
8080
err := mh.ctx.Init(
8181
"--plugins", "helm",
-5.46 KB
Binary file not shown.
5.54 KB
Binary file not shown.

testdata/helm/memcached-operator/helm-charts/memcached/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ maintainers:
1717
name: memcached
1818
sources:
1919
- https://github.com/docker-library/memcached
20-
version: 0.0.1
20+
version: 0.0.2

testdata/helm/memcached-operator/helm-charts/memcached/templates/pdb.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: policy/v1beta1
1+
apiVersion: policy/v1
22
kind: PodDisruptionBudget
33
metadata:
44
name: {{ template "memcached.fullname" . }}

testdata/helm/memcached-operator/helm-charts/memcached/templates/statefulset.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ spec:
3030
{{- if .Values.securityContext.enabled }}
3131
securityContext:
3232
fsGroup: {{ .Values.securityContext.fsGroup }}
33+
runAsNonRoot: true
34+
seccompProfile:
35+
type: RuntimeDefault
3336
{{- end }}
3437
affinity:
3538
podAntiAffinity:
@@ -59,7 +62,11 @@ spec:
5962
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
6063
{{- if .Values.securityContext.enabled }}
6164
securityContext:
65+
allowPrivilegeEscalation: false
6266
runAsUser: {{ .Values.securityContext.runAsUser }}
67+
capabilities:
68+
drop:
69+
- ALL
6370
{{- end }}
6471
command:
6572
- memcached

0 commit comments

Comments
 (0)