|
| 1 | +{{- if .Values.mockOidcServer.enabled }} |
| 2 | +apiVersion: apps/v1 |
| 3 | +kind: Deployment |
| 4 | +metadata: |
| 5 | + name: {{ include "eoapi.fullname" . }}-mock-oidc-server |
| 6 | + namespace: {{ .Release.Namespace }} |
| 7 | + labels: |
| 8 | + {{- include "eoapi.labels" . | nindent 4 }} |
| 9 | + app.kubernetes.io/component: mock-oidc-server |
| 10 | +spec: |
| 11 | + replicas: {{ .Values.mockOidcServer.replicaCount | default 1 }} |
| 12 | + selector: |
| 13 | + matchLabels: |
| 14 | + {{- include "eoapi.selectorLabels" . | nindent 6 }} |
| 15 | + app.kubernetes.io/component: mock-oidc-server |
| 16 | + template: |
| 17 | + metadata: |
| 18 | + labels: |
| 19 | + {{- include "eoapi.selectorLabels" . | nindent 8 }} |
| 20 | + app.kubernetes.io/component: mock-oidc-server |
| 21 | + spec: |
| 22 | + {{- if .Values.mockOidcServer.imagePullSecrets }} |
| 23 | + imagePullSecrets: |
| 24 | + {{- toYaml .Values.mockOidcServer.imagePullSecrets | nindent 8 }} |
| 25 | + {{- end }} |
| 26 | + containers: |
| 27 | + - name: mock-oidc |
| 28 | + image: "{{ if .Values.mockOidcServer.image }}{{ .Values.mockOidcServer.image.repository | default "ghcr.io/alukach/mock-oidc-server" }}:{{ .Values.mockOidcServer.image.tag | default "latest" }}{{ else }}ghcr.io/alukach/mock-oidc-server:latest{{ end }}" |
| 29 | + imagePullPolicy: {{ if .Values.mockOidcServer.image }}{{ .Values.mockOidcServer.image.pullPolicy | default "IfNotPresent" }}{{ else }}IfNotPresent{{ end }} |
| 30 | + env: |
| 31 | + - name: MOCK_OIDC_PORT |
| 32 | + value: "{{ .Values.mockOidcServer.port | default 8888 }}" |
| 33 | + - name: MOCK_OIDC_CLIENT_ID |
| 34 | + value: "{{ .Values.mockOidcServer.clientId | default "test-client" }}" |
| 35 | + - name: MOCK_OIDC_CLIENT_SECRET |
| 36 | + value: "{{ .Values.mockOidcServer.clientSecret | default "test-secret" }}" |
| 37 | + {{- if .Values.mockOidcServer.extraEnv }} |
| 38 | + {{- toYaml .Values.mockOidcServer.extraEnv | nindent 8 }} |
| 39 | + {{- end }} |
| 40 | + ports: |
| 41 | + - name: http |
| 42 | + containerPort: {{ .Values.mockOidcServer.port | default 8888 }} |
| 43 | + protocol: TCP |
| 44 | + startupProbe: |
| 45 | + httpGet: |
| 46 | + path: /.well-known/openid-configuration |
| 47 | + port: http |
| 48 | + initialDelaySeconds: 10 |
| 49 | + periodSeconds: 5 |
| 50 | + failureThreshold: 12 |
| 51 | + timeoutSeconds: 3 |
| 52 | + livenessProbe: |
| 53 | + httpGet: |
| 54 | + path: /.well-known/openid-configuration |
| 55 | + port: http |
| 56 | + initialDelaySeconds: 30 |
| 57 | + periodSeconds: 10 |
| 58 | + failureThreshold: 3 |
| 59 | + timeoutSeconds: 3 |
| 60 | + readinessProbe: |
| 61 | + httpGet: |
| 62 | + path: /.well-known/openid-configuration |
| 63 | + port: http |
| 64 | + initialDelaySeconds: 5 |
| 65 | + periodSeconds: 5 |
| 66 | + failureThreshold: 3 |
| 67 | + timeoutSeconds: 3 |
| 68 | + {{- if .Values.mockOidcServer.resources }} |
| 69 | + resources: |
| 70 | + {{- toYaml .Values.mockOidcServer.resources | nindent 10 }} |
| 71 | + {{- end }} |
| 72 | + {{- if .Values.mockOidcServer.nodeSelector }} |
| 73 | + nodeSelector: |
| 74 | + {{- toYaml .Values.mockOidcServer.nodeSelector | nindent 8 }} |
| 75 | + {{- end }} |
| 76 | + {{- if .Values.mockOidcServer.affinity }} |
| 77 | + affinity: |
| 78 | + {{- toYaml .Values.mockOidcServer.affinity | nindent 8 }} |
| 79 | + {{- end }} |
| 80 | + {{- if .Values.mockOidcServer.tolerations }} |
| 81 | + tolerations: |
| 82 | + {{- toYaml .Values.mockOidcServer.tolerations | nindent 8 }} |
| 83 | + {{- end }} |
| 84 | +{{- end }} |
0 commit comments