diff --git a/charts/spire/charts/spiffe-oidc-discovery-provider/templates/tests/test-connection.yaml b/charts/spire/charts/spiffe-oidc-discovery-provider/templates/tests/test-connection.yaml index c71ad51..7c2389e 100644 --- a/charts/spire/charts/spiffe-oidc-discovery-provider/templates/tests/test-connection.yaml +++ b/charts/spire/charts/spiffe-oidc-discovery-provider/templates/tests/test-connection.yaml @@ -7,17 +7,25 @@ metadata: annotations: "helm.sh/hook": test spec: + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 4 }} containers: - name: wget-service-name image: busybox command: ['wget'] - args: ['{{ include "spiffe-oidc-discovery-provider.fullname" . }}:{{ .Values.service.port }}/.well-known/openid-configuration'] + args: ['-O', '/dev/null', '{{ include "spiffe-oidc-discovery-provider.fullname" . }}:{{ .Values.service.port }}/.well-known/openid-configuration'] + securityContext: + {{- toYaml .Values.securityContext | nindent 8 }} - name: wget-service-name-namespace image: busybox command: ['wget'] - args: ['{{ include "spiffe-oidc-discovery-provider.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.port }}/.well-known/openid-configuration'] + args: ['-O', '/dev/null', '{{ include "spiffe-oidc-discovery-provider.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.port }}/.well-known/openid-configuration'] + securityContext: + {{- toYaml .Values.securityContext | nindent 8 }} - name: wget-service-name-namespace-svc-cluster-local image: busybox command: ['wget'] - args: ['{{ include "spiffe-oidc-discovery-provider.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}/.well-known/openid-configuration'] + args: ['-O', '/dev/null', '{{ include "spiffe-oidc-discovery-provider.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}/.well-known/openid-configuration'] + securityContext: + {{- toYaml .Values.securityContext | nindent 8 }} restartPolicy: Never diff --git a/charts/spire/charts/spire-server/templates/tests/test-connection.yaml b/charts/spire/charts/spire-server/templates/tests/test-connection.yaml index 60f83f3..f277706 100644 --- a/charts/spire/charts/spire-server/templates/tests/test-connection.yaml +++ b/charts/spire/charts/spire-server/templates/tests/test-connection.yaml @@ -7,9 +7,13 @@ metadata: annotations: "helm.sh/hook": test spec: + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 4 }} containers: - name: wget image: busybox command: ['nc'] args: ['-zvw3', '{{ include "spire-server.fullname" . }}', '{{ .Values.service.port }}'] + securityContext: + {{- toYaml .Values.securityContext | nindent 8 }} restartPolicy: Never