From d18907de549c24145f6434bea2ae6ccd503e3ed7 Mon Sep 17 00:00:00 2001 From: Arie Peterson <arie@greenhost.nl> Date: Thu, 16 Nov 2023 12:54:59 +0100 Subject: [PATCH] Split up dashboard into separate frontend and backend deployments --- deployment/helmchart/Chart.yaml | 2 +- .../templates/backend-deployment.yaml | 144 ++++++++++++ .../helmchart/templates/backend-service.yaml | 1 + .../helmchart/templates/deployment.yaml | 206 ------------------ .../templates/frontend-deployment.yaml | 125 +++++++++++ .../helmchart/templates/frontend-service.yaml | 1 + 6 files changed, 272 insertions(+), 207 deletions(-) create mode 100644 deployment/helmchart/templates/backend-deployment.yaml delete mode 100644 deployment/helmchart/templates/deployment.yaml create mode 100644 deployment/helmchart/templates/frontend-deployment.yaml diff --git a/deployment/helmchart/Chart.yaml b/deployment/helmchart/Chart.yaml index 0aeb62be..c4b10779 100644 --- a/deployment/helmchart/Chart.yaml +++ b/deployment/helmchart/Chart.yaml @@ -23,4 +23,4 @@ name: stackspin-dashboard sources: - https://open.greenhost.net/stackspin/dashboard/ - https://open.greenhost.net/stackspin/dashboard-backend/ -version: 1.8.4 +version: 1.8.5-tele2 diff --git a/deployment/helmchart/templates/backend-deployment.yaml b/deployment/helmchart/templates/backend-deployment.yaml new file mode 100644 index 00000000..1f76d33b --- /dev/null +++ b/deployment/helmchart/templates/backend-deployment.yaml @@ -0,0 +1,144 @@ +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: {{ template "common.names.fullname" . }}-backend + labels: {{- include "common.labels.standard" . | nindent 4 }} + component: dashboard-backend + {{- if .Values.commonLabels }} + {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- end }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + component: dashboard-backend + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} + template: + metadata: + labels: {{- include "common.labels.standard" . | nindent 8 }} + component: dashboard-backend + {{- if .Values.podLabels }} + {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.podAnnotations }} + annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }} + {{- end }} + spec: + {{- include "dashboard.imagePullSecrets" . | nindent 6 }} + {{- if .Values.hostAliases }} + hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.affinity }} + affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }} + {{- else }} + affinity: + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }} + nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} + {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "dashboard.serviceAccountName" . }} + securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + initContainers: + {{- if .Values.initContainers }} + {{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }} + {{- end }} + containers: + - name: backend + securityContext: {{- toYaml .Values.backend.containerSecurityContext | nindent 12 }} + image: {{ template "backend.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + {{- if .Values.backend.command }} + command: {{- include "common.tplvalues.render" (dict "value" .Values.backend.command "context" $) | nindent 12 }} + {{- end }} + {{- if .Values.backend.args }} + args: {{- include "common.tplvalues.render" (dict "value" .Values.backend.args "context" $) | nindent 12 }} + {{- end }} + env: + - name: DASHBOARD_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "backend.secretName" . }} + key: backend-password + - name: HYDRA_CLIENT_SECRET + valueFrom: + secretKeyRef: + name: {{ include "backend.secretName" . }} + key: oidc-client-secret + - name: KRATOS_URL + value: {{ .Values.backend.kratos.adminUrl }} + {{- if (include "backend.smtp.password.enabled" .) }} + - name: DASHBOARD_SMTP_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "backend.smtp.secretName" . }} + key: smtp-password + {{- end }} + {{- if .Values.backend.extraEnvVars }} + {{- include "common.tplvalues.render" (dict "value" .Values.backend.extraEnvVars "context" $) | nindent 12 }} + {{- end }} + envFrom: + - configMapRef: + name: {{ include "common.names.fullname" . }} + {{- if .Values.backend.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.backend.extraEnvVarsCM }} + {{- end }} + {{- if .Values.backend.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.backend.extraEnvVarsSecret }} + {{- end }} + ports: + - name: backend-http + containerPort: 5000 + protocol: TCP + {{- if .Values.backend.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: / + port: backend-http + initialDelaySeconds: {{ .Values.backend.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.backend.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.backend.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.backend.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.backend.livenessProbe.failureThreshold }} + {{- else if .Values.backend.customLivenessProbe }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backend.customLivenessProbe "context" $) | nindent 12 }} + {{- end }} + {{- if .Values.backend.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: / + port: backend-http + initialDelaySeconds: {{ .Values.backend.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.backend.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.backend.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.backend.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.backend.readinessProbe.failureThreshold }} + {{- else if .Values.backend.customReadinessProbe }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backend.customReadinessProbe "context" $) | nindent 12 }} + {{- end }} + volumeMounts: + {{- if .Values.backend.extraVolumeMounts }} + {{- include "common.tplvalues.render" (dict "value" .Values.backend.extraVolumeMounts "context" $) | nindent 12 }} + {{- end }} + {{- if .Values.backend.resources }} + resources: {{- toYaml .Values.backend.resources | nindent 12 }} + {{- end }} + {{- if .Values.sidecars }} + {{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }} + {{- end }} + volumes: + {{- if .Values.extraVolumes }} + {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }} + {{- end }} diff --git a/deployment/helmchart/templates/backend-service.yaml b/deployment/helmchart/templates/backend-service.yaml index fe6b59f7..7e68348f 100644 --- a/deployment/helmchart/templates/backend-service.yaml +++ b/deployment/helmchart/templates/backend-service.yaml @@ -40,3 +40,4 @@ spec: {{- include "common.tplvalues.render" (dict "value" .Values.backend.service.extraPorts "context" $) | nindent 4 }} {{- end }} selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + component: dashboard-backend diff --git a/deployment/helmchart/templates/deployment.yaml b/deployment/helmchart/templates/deployment.yaml deleted file mode 100644 index 7ddb2656..00000000 --- a/deployment/helmchart/templates/deployment.yaml +++ /dev/null @@ -1,206 +0,0 @@ -apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} -kind: Deployment -metadata: - name: {{ template "common.names.fullname" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - component: dashboard - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - component: dashboard - {{- if .Values.updateStrategy }} - strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} - {{- end }} - template: - metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} - component: dashboard - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.podAnnotations }} - annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }} - {{- end }} - spec: - {{- include "dashboard.imagePullSecrets" . | nindent 6 }} - {{- if .Values.hostAliases }} - hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.affinity }} - affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }} - {{- else }} - affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }} - nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} - {{- end }} - {{- if .Values.nodeSelector }} - nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.tolerations }} - tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "dashboard.serviceAccountName" . }} - securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} - initContainers: - {{- if .Values.initContainers }} - {{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }} - {{- end }} - containers: - - name: dashboard - securityContext: {{- toYaml .Values.dashboard.containerSecurityContext | nindent 12 }} - image: {{ template "dashboard.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - {{- if .Values.dashboard.command }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.command "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.dashboard.args }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.args "context" $) | nindent 12 }} - {{- end }} - env: - {{- if .Values.dashboard.extraEnvVars }} - {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.extraEnvVars "context" $) | nindent 12 }} - {{- end }} - envFrom: - - configMapRef: - name: {{ include "common.names.fullname" . }} - {{- if .Values.dashboard.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.dashboard.extraEnvVarsCM }} - {{- end }} - {{- if .Values.dashboard.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.dashboard.extraEnvVarsSecret }} - {{- end }} - ports: - - name: dashboard-http - containerPort: 80 - protocol: TCP - {{- if .Values.dashboard.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: / - port: dashboard-http - initialDelaySeconds: {{ .Values.dashboard.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.dashboard.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.dashboard.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.dashboard.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.dashboard.livenessProbe.failureThreshold }} - {{- else if .Values.dashboard.customLivenessProbe }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.customLivenessProbe "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.dashboard.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: / - port: dashboard-http - initialDelaySeconds: {{ .Values.dashboard.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.dashboard.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.dashboard.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.dashboard.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.dashboard.readinessProbe.failureThreshold }} - {{- else if .Values.dashboard.customReadinessProbe }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.customReadinessProbe "context" $) | nindent 12 }} - {{- end }} - volumeMounts: - {{- if .Values.dashboard.extraVolumeMounts }} - {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.extraVolumeMounts "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.dashboard.resources }} - resources: {{- toYaml .Values.dashboard.resources | nindent 12 }} - {{- end }} - - name: backend - securityContext: {{- toYaml .Values.backend.containerSecurityContext | nindent 12 }} - image: {{ template "backend.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - {{- if .Values.backend.command }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.backend.command "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.backend.args }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.backend.args "context" $) | nindent 12 }} - {{- end }} - env: - - name: DASHBOARD_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "backend.secretName" . }} - key: backend-password - - name: HYDRA_CLIENT_SECRET - valueFrom: - secretKeyRef: - name: {{ include "backend.secretName" . }} - key: oidc-client-secret - - name: KRATOS_URL - value: {{ .Values.backend.kratos.adminUrl }} - {{- if (include "backend.smtp.password.enabled" .) }} - - name: DASHBOARD_SMTP_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "backend.smtp.secretName" . }} - key: smtp-password - {{- end }} - {{- if .Values.backend.extraEnvVars }} - {{- include "common.tplvalues.render" (dict "value" .Values.backend.extraEnvVars "context" $) | nindent 12 }} - {{- end }} - envFrom: - - configMapRef: - name: {{ include "common.names.fullname" . }} - {{- if .Values.backend.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.backend.extraEnvVarsCM }} - {{- end }} - {{- if .Values.backend.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.backend.extraEnvVarsSecret }} - {{- end }} - ports: - - name: backend-http - containerPort: 5000 - protocol: TCP - {{- if .Values.backend.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: / - port: backend-http - initialDelaySeconds: {{ .Values.backend.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.backend.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.backend.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.backend.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.backend.livenessProbe.failureThreshold }} - {{- else if .Values.backend.customLivenessProbe }} - livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backend.customLivenessProbe "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.backend.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: / - port: backend-http - initialDelaySeconds: {{ .Values.backend.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.backend.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.backend.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.backend.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.backend.readinessProbe.failureThreshold }} - {{- else if .Values.backend.customReadinessProbe }} - readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backend.customReadinessProbe "context" $) | nindent 12 }} - {{- end }} - volumeMounts: - {{- if .Values.backend.extraVolumeMounts }} - {{- include "common.tplvalues.render" (dict "value" .Values.backend.extraVolumeMounts "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.backend.resources }} - resources: {{- toYaml .Values.backend.resources | nindent 12 }} - {{- end }} - {{- if .Values.sidecars }} - {{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }} - {{- end }} - volumes: - {{- if .Values.extraVolumes }} - {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }} - {{- end }} diff --git a/deployment/helmchart/templates/frontend-deployment.yaml b/deployment/helmchart/templates/frontend-deployment.yaml new file mode 100644 index 00000000..41cc3603 --- /dev/null +++ b/deployment/helmchart/templates/frontend-deployment.yaml @@ -0,0 +1,125 @@ +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: {{ template "common.names.fullname" . }}-frontend + labels: {{- include "common.labels.standard" . | nindent 4 }} + component: dashboard-frontend + {{- if .Values.commonLabels }} + {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- end }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + component: dashboard-frontend + {{- if .Values.updateStrategy }} + strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} + template: + metadata: + labels: {{- include "common.labels.standard" . | nindent 8 }} + component: dashboard-frontend + {{- if .Values.podLabels }} + {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.podAnnotations }} + annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }} + {{- end }} + spec: + {{- include "dashboard.imagePullSecrets" . | nindent 6 }} + {{- if .Values.hostAliases }} + hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.affinity }} + affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }} + {{- else }} + affinity: + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }} + nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} + {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "dashboard.serviceAccountName" . }} + securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + initContainers: + {{- if .Values.initContainers }} + {{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }} + {{- end }} + containers: + - name: dashboard-frontend + securityContext: {{- toYaml .Values.dashboard.containerSecurityContext | nindent 12 }} + image: {{ template "dashboard.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + {{- if .Values.dashboard.command }} + command: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.command "context" $) | nindent 12 }} + {{- end }} + {{- if .Values.dashboard.args }} + args: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.args "context" $) | nindent 12 }} + {{- end }} + env: + {{- if .Values.dashboard.extraEnvVars }} + {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.extraEnvVars "context" $) | nindent 12 }} + {{- end }} + envFrom: + - configMapRef: + name: {{ include "common.names.fullname" . }} + {{- if .Values.dashboard.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.dashboard.extraEnvVarsCM }} + {{- end }} + {{- if .Values.dashboard.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.dashboard.extraEnvVarsSecret }} + {{- end }} + ports: + - name: dashboard-http + containerPort: 80 + protocol: TCP + {{- if .Values.dashboard.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: / + port: dashboard-http + initialDelaySeconds: {{ .Values.dashboard.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.dashboard.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.dashboard.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.dashboard.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.dashboard.livenessProbe.failureThreshold }} + {{- else if .Values.dashboard.customLivenessProbe }} + livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.customLivenessProbe "context" $) | nindent 12 }} + {{- end }} + {{- if .Values.dashboard.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: / + port: dashboard-http + initialDelaySeconds: {{ .Values.dashboard.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.dashboard.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.dashboard.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.dashboard.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.dashboard.readinessProbe.failureThreshold }} + {{- else if .Values.dashboard.customReadinessProbe }} + readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.customReadinessProbe "context" $) | nindent 12 }} + {{- end }} + volumeMounts: + {{- if .Values.dashboard.extraVolumeMounts }} + {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.extraVolumeMounts "context" $) | nindent 12 }} + {{- end }} + {{- if .Values.dashboard.resources }} + resources: {{- toYaml .Values.dashboard.resources | nindent 12 }} + {{- end }} + {{- if .Values.sidecars }} + {{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }} + {{- end }} + volumes: + {{- if .Values.extraVolumes }} + {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }} + {{- end }} diff --git a/deployment/helmchart/templates/frontend-service.yaml b/deployment/helmchart/templates/frontend-service.yaml index 33125743..0609271e 100644 --- a/deployment/helmchart/templates/frontend-service.yaml +++ b/deployment/helmchart/templates/frontend-service.yaml @@ -40,3 +40,4 @@ spec: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.service.extraPorts "context" $) | nindent 4 }} {{- end }} selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + component: dashboard-frontend -- GitLab