115 lines
4.9 KiB
YAML
115 lines
4.9 KiB
YAML
---
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: "{{ include "gateway.fullname" . }}-anm-test-connection"
|
|
labels:
|
|
{{- include "gateway.labels" . | nindent 4 }}
|
|
annotations:
|
|
"helm.sh/hook": test
|
|
spec:
|
|
template:
|
|
spec:
|
|
serviceAccountName: {{ include "gateway.tests.serviceAccountName" . }}
|
|
containers:
|
|
- name: curl
|
|
image: {{ default .Values.global.defaultRegistry .Values.global.tests.images.curl.registry }}/{{ default "curlimages/curl" .Values.global.tests.images.curl.repository }}:{{ default "latest" .Values.global.tests.images.curl.tag }}
|
|
command: ["bin/sh"]
|
|
args: ["-c", "curl -k https://{{ include "gateway.fullname" . }}-anm:{{ .Values.anm.service.ports.traffic.port}}/healthcheck"]
|
|
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
|
|
securityContext:
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
readOnlyRootFilesystem: {{ .Values.global.tests.securityContext.readOnlyRootFilesystem }}
|
|
runAsNonRoot: {{ .Values.global.tests.securityContext.runAsNonRoot }}
|
|
allowPrivilegeEscalation: {{ .Values.global.tests.securityContext.allowPrivilegeEscalation }}
|
|
restartPolicy: Never
|
|
backoffLimit: 3
|
|
---
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: "{{ include "gateway.fullname" . }}-apimgr-test-connection"
|
|
labels:
|
|
{{- include "gateway.labels" . | nindent 4 }}
|
|
annotations:
|
|
"helm.sh/hook": test
|
|
spec:
|
|
template:
|
|
spec:
|
|
serviceAccountName: {{ include "gateway.tests.serviceAccountName" . }}
|
|
containers:
|
|
- name: curl
|
|
image: {{ default .Values.global.defaultRegistry .Values.global.tests.images.curl.registry }}/{{ default "curlimages/curl" .Values.global.tests.images.curl.repository }}:{{ default "latest" .Values.global.tests.images.curl.tag }}
|
|
command: ["bin/sh"]
|
|
args: ["-c", "curl -k https://{{ include "gateway.fullname" . }}-apimgr:{{ .Values.apimgr.service.ports.ui.port}}/healthcheck"]
|
|
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
|
|
securityContext:
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
readOnlyRootFilesystem: {{ .Values.global.tests.securityContext.readOnlyRootFilesystem }}
|
|
runAsNonRoot: {{ .Values.global.tests.securityContext.runAsNonRoot }}
|
|
allowPrivilegeEscalation: {{ .Values.global.tests.securityContext.allowPrivilegeEscalation }}
|
|
restartPolicy: Never
|
|
backoffLimit: 3
|
|
---
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: "{{ include "gateway.fullname" . }}-apitraffic-test-connection"
|
|
labels:
|
|
{{- include "gateway.labels" . | nindent 4 }}
|
|
annotations:
|
|
"helm.sh/hook": test
|
|
spec:
|
|
template:
|
|
spec:
|
|
serviceAccountName: {{ include "gateway.tests.serviceAccountName" . }}
|
|
containers:
|
|
- name: curl
|
|
image: {{ default .Values.global.defaultRegistry .Values.global.tests.images.curl.registry }}/{{ default "curlimages/curl" .Values.global.tests.images.curl.repository }}:{{ default "latest" .Values.global.tests.images.curl.tag }}
|
|
command: ["bin/sh"]
|
|
args: ["-c", "curl -k https://{{ include "gateway.fullname" . }}-apitraffic:{{ .Values.apitraffic.service.ports.traffic.port}}/healthcheck"]
|
|
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
|
|
securityContext:
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
readOnlyRootFilesystem: {{ .Values.global.tests.securityContext.readOnlyRootFilesystem }}
|
|
runAsNonRoot: {{ .Values.global.tests.securityContext.runAsNonRoot }}
|
|
allowPrivilegeEscalation: {{ .Values.global.tests.securityContext.allowPrivilegeEscalation }}
|
|
restartPolicy: Never
|
|
backoffLimit: 3
|
|
---
|
|
{{- if .Values.aga.enabled }}
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: "{{ include "gateway.fullname" . }}-aga-test-connection"
|
|
labels:
|
|
{{- include "gateway.labels" . | nindent 4 }}
|
|
annotations:
|
|
"helm.sh/hook": test
|
|
spec:
|
|
template:
|
|
spec:
|
|
serviceAccountName: {{ include "gateway.tests.serviceAccountName" . }}
|
|
containers:
|
|
- name: curl
|
|
image: {{ default .Values.global.defaultRegistry .Values.global.tests.images.curl.registry }}/{{ default "curlimages/curl" .Values.global.tests.images.curl.repository }}:{{ default "latest" .Values.global.tests.images.curl.tag }}
|
|
command: ["bin/sh"]
|
|
args: ["-c", "curl -k https://{{ include "gateway.fullname" . }}-aga:{{ .Values.aga.service.ports.ui.port}}/healthcheck"]
|
|
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
|
|
securityContext:
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
readOnlyRootFilesystem: {{ .Values.global.tests.securityContext.readOnlyRootFilesystem }}
|
|
runAsNonRoot: {{ .Values.global.tests.securityContext.runAsNonRoot }}
|
|
allowPrivilegeEscalation: {{ .Values.global.tests.securityContext.allowPrivilegeEscalation }}
|
|
restartPolicy: Never
|
|
backoffLimit: 3
|
|
{{- end }}
|