github.com/smartcontractkit/chainlink-testing-framework/libs@v0.0.0-20240227141906-ec710b4eb1a3/charts/mockserver/templates/deployment.yaml (about) 1 apiVersion: apps/v1 2 kind: Deployment 3 metadata: 4 name: {{ template "chart.name" . }} 5 namespace: {{ .Release.Namespace }} 6 labels: 7 app: {{ template "chart.name" . }} 8 chart: {{ template "chart.name_version" . }} 9 release: {{ .Release.Name }} 10 heritage: {{ .Release.Service }} 11 spec: 12 replicas: {{ .Values.replicaCount }} 13 selector: 14 matchLabels: 15 app: {{ template "chart.name" . }} 16 release: {{ .Release.Name }} 17 template: 18 metadata: 19 {{- if .Values.podAnnotations }} 20 # Allows custom annotations to be specified 21 annotations: 22 {{ toYaml .Values.podAnnotations | indent 8 }} 23 {{- end }} 24 name: {{ template "chart.name" . }} 25 labels: 26 app: {{ template "chart.name" . }} 27 release: {{ .Release.Name }} 28 spec: 29 containers: 30 - name: {{ template "chart.name" . }} 31 image: {{ .Values.image.repository }}/mockserver:mockserver-{{- if .Values.image.snapshot }}snapshot{{- else }}{{ .Chart.Version }}{{- end }} 32 {{- if .Values.image.snapshot }} 33 imagePullPolicy: Always 34 {{- else }} 35 imagePullPolicy: {{ .Values.image.pullPolicy }} 36 {{- end }} 37 securityContext: 38 runAsUser: 65534 # nonroot 39 readOnlyRootFilesystem: {{ .Values.app.readOnlyRootFilesystem }} 40 ports: 41 - name: serviceport 42 containerPort: {{ .Values.app.serverPort }} 43 protocol: TCP 44 readinessProbe: 45 httpGet: 46 path: /liveness/probe 47 port: serviceport 48 initialDelaySeconds: 1 49 periodSeconds: 5 50 successThreshold: 1 51 failureThreshold: 10 52 livenessProbe: 53 httpGet: 54 path: /liveness/probe 55 port: serviceport 56 initialDelaySeconds: 1 57 periodSeconds: 30 58 successThreshold: 1 59 failureThreshold: 10 60 startupProbe: 61 httpGet: 62 path: /liveness/probe 63 port: serviceport 64 initialDelaySeconds: 30 65 periodSeconds: 5 66 failureThreshold: 20 67 env: 68 - name: LOG_LEVEL 69 value: {{ .Values.app.logLevel | quote }} 70 - name: SERVER_PORT 71 value: {{ .Values.app.serverPort | quote }} 72 {{- if .Values.app.proxyRemoteHost }} 73 - name: PROXY_REMOTE_HOST 74 value: {{ .Values.app.proxyRemoteHost | quote }} 75 {{- end }} 76 {{- if .Values.app.proxyRemotePort }} 77 - name: PROXY_REMOTE_PORT 78 value: {{ .Values.app.proxyRemotePort | quote }} 79 {{- end }} 80 {{- if .Values.app.jvmOptions }} 81 - name: JVM_OPTIONS 82 value: {{ .Values.app.jvmOptions | quote }} 83 {{- end }} 84 {{- if .Values.app.mountConfigMap }} 85 - name: MOCKSERVER_PROPERTY_FILE 86 value: /config/{{ .Values.app.propertiesFileName }} 87 {{- end }} 88 volumeMounts: 89 - name: config-volume 90 mountPath: /config 91 - name: libs-volume 92 mountPath: /libs 93 {{- if .Values.app.resources }} 94 resources: 95 {{ toYaml .Values.app.resources | indent 12 }} 96 {{- end }} 97 volumes: 98 - name: config-volume 99 configMap: 100 name: {{ .Values.app.mountedConfigMapName }} 101 optional: true 102 - name: libs-volume 103 configMap: 104 name: {{ .Values.app.mountedLibsConfigMapName }} 105 optional: true 106 {{- with .Values.nodeSelector }} 107 nodeSelector: 108 {{ toYaml . | indent 8 }} 109 {{- end }} 110 {{- with .Values.affinity }} 111 affinity: 112 {{ toYaml . | indent 8 }} 113 {{- end }} 114 {{- with .Values.tolerations }} 115 tolerations: 116 {{ toYaml . | indent 8 }} 117 {{- end }}