diff --git a/charts/doorkeeper/Chart.yaml b/charts/doorkeeper/Chart.yaml index 03e14b0..83abdc3 100644 --- a/charts/doorkeeper/Chart.yaml +++ b/charts/doorkeeper/Chart.yaml @@ -4,7 +4,7 @@ type: application description: >- A Helm chart for Doorkeeper, a tiny HTTP server to be used as external authentication service for Envoy -version: &chartVersion 0.1.2 +version: &chartVersion 0.1.3 appVersion: *chartVersion kubeVersion: ">=1.22.0-0" home: https://github.com/freepik-company/doorkeeper diff --git a/charts/doorkeeper/templates/_helpers.tpl b/charts/doorkeeper/templates/_helpers.tpl index 9675b77..f50cd76 100644 --- a/charts/doorkeeper/templates/_helpers.tpl +++ b/charts/doorkeeper/templates/_helpers.tpl @@ -54,9 +54,9 @@ app.kubernetes.io/instance: {{ .Release.Name }} Create the name of the service account to use */}} {{- define "doorkeeper.serviceAccountName" -}} -{{- if .Values.agent.serviceAccount.create }} -{{- default (include "doorkeeper.fullname" .) .Values.agent.serviceAccount.name }} +{{- if .Values.server.serviceAccount.create }} +{{- default (include "doorkeeper.fullname" .) .Values.server.serviceAccount.name }} {{- else }} -{{- default "default" .Values.agent.serviceAccount.name }} +{{- default "default" .Values.server.serviceAccount.name }} {{- end }} {{- end }} diff --git a/charts/doorkeeper/templates/deployment.yaml b/charts/doorkeeper/templates/deployment.yaml index 3da017e..e94a892 100644 --- a/charts/doorkeeper/templates/deployment.yaml +++ b/charts/doorkeeper/templates/deployment.yaml @@ -5,74 +5,74 @@ metadata: labels: {{- include "doorkeeper.labels" . | nindent 4 }} spec: - replicas: {{ .Values.agent.replicaCount }} + replicas: {{ .Values.server.replicaCount }} selector: matchLabels: {{- include "doorkeeper.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.agent.podAnnotations }} + {{- with .Values.server.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "doorkeeper.selectorLabels" . | nindent 8 }} spec: - {{- with .Values.agent.imagePullSecrets }} + {{- with .Values.server.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "doorkeeper.serviceAccountName" . }} securityContext: - {{- toYaml .Values.agent.podSecurityContext | nindent 8 }} + {{- toYaml .Values.server.podSecurityContext | nindent 8 }} containers: - name: agent - image: "{{ .Values.agent.image.repository }}:{{ .Values.agent.image.tag | default (printf "v%s" .Chart.AppVersion) }}" - imagePullPolicy: {{ .Values.agent.image.pullPolicy }} + image: "{{ .Values.server.image.repository }}:{{ .Values.server.image.tag | default (printf "v%s" .Chart.AppVersion) }}" + imagePullPolicy: {{ .Values.server.image.pullPolicy }} command: - /bss - run - --config - /etc/agent/doorkeeper.yaml - {{- with .Values.agent.extraArgs }} + {{- with .Values.server.extraArgs }} args: {{ toYaml . | nindent 10 }} {{- end }} - {{- with .Values.agent.env }} + {{- with .Values.server.env }} env: {{ toYaml . | nindent 10 }} {{- end }} - {{- with .Values.agent.envFrom }} + {{- with .Values.server.envFrom }} envFrom: {{ toYaml . | nindent 10 }} {{- end }} # TODO: Good first issue - {{- with .Values.agent.livenessProbe }} + {{- with .Values.server.livenessProbe }} livenessProbe: {{- toYaml . | nindent 12 }} {{- end }} - {{- with .Values.agent.readinessProbe }} + {{- with .Values.server.readinessProbe }} readinessProbe: {{- toYaml . | nindent 12 }} {{- end }} resources: - {{- toYaml .Values.agent.resources | nindent 12 }} + {{- toYaml .Values.server.resources | nindent 12 }} securityContext: - {{- toYaml .Values.agent.securityContext | nindent 12 }} + {{- toYaml .Values.server.securityContext | nindent 12 }} volumeMounts: - {{- with .Values.agent.extraVolumeMounts }} + {{- with .Values.server.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} ports: - {{ range $key, $value := .Values.agent.service.ports }} + {{ range $key, $value := .Values.server.service.ports }} - name: {{ $value.name }} containerPort: {{ $value.targetPort }} {{- with $value.protocol }} @@ -80,25 +80,25 @@ spec: {{- end }} {{- end }} - {{- with .Values.agent.extraPorts }} + {{- with .Values.server.extraPorts }} {{- toYaml . | nindent 12 }} {{- end }} - {{- with .Values.agent.nodeSelector }} + {{- with .Values.server.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.agent.affinity }} + {{- with .Values.server.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.agent.tolerations }} + {{- with .Values.server.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} volumes: - {{- with .Values.agent.extraVolumes }} + {{- with .Values.server.extraVolumes }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/doorkeeper/templates/service.yaml b/charts/doorkeeper/templates/service.yaml index d4bd43f..a53670d 100644 --- a/charts/doorkeeper/templates/service.yaml +++ b/charts/doorkeeper/templates/service.yaml @@ -4,41 +4,41 @@ metadata: name: {{ include "doorkeeper.fullname" . }}-agent labels: {{- include "doorkeeper.labels" . | nindent 4 }} - {{- with .Values.agent.service.annotations }} + {{- with .Values.server.service.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.agent.service.type }} + {{- with .Values.server.service.type }} type: {{ . }} {{- end }} - {{- with .Values.agent.service.clusterIP }} + {{- with .Values.server.service.clusterIP }} clusterIP: {{ . }} {{- end }} {{- if (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) }} - {{- with .Values.agent.service.ipFamilyPolicy }} + {{- with .Values.server.service.ipFamilyPolicy }} ipFamilyPolicy: {{ . }} {{- end }} - {{- with .Values.agent.service.ipFamilies }} + {{- with .Values.server.service.ipFamilies }} ipFamilies: {{ . | toYaml | nindent 2 }} {{- end }} {{- end }} - {{- with .Values.agent.service.externalTrafficPolicy }} + {{- with .Values.server.service.externalTrafficPolicy }} externalTrafficPolicy: {{ . }} {{- end }} # We want the servers to become available even if they're not ready # since this DNS is also used for join operations. - {{- with .Values.agent.service.publishNotReadyAddresses }} + {{- with .Values.server.service.publishNotReadyAddresses }} publishNotReadyAddresses: {{ . }} {{- end}} ports: - {{ range $key, $value := .Values.agent.service.ports }} + {{ range $key, $value := .Values.server.service.ports }} - name: {{ $value.name }} port: {{ $value.port }} targetPort: {{ $value.targetPort }} @@ -47,7 +47,7 @@ spec: protocol: {{ . }} {{- end }} - {{- if and ($value.nodePort) (eq ($.Values.agent.service.type | toString) "NodePort") }} + {{- if and ($value.nodePort) (eq ($.Values.server.service.type | toString) "NodePort") }} nodePort: {{ $value.nodePort }} {{- end }} {{- end}} diff --git a/charts/doorkeeper/templates/serviceaccount.yaml b/charts/doorkeeper/templates/serviceaccount.yaml index 3669e39..a02fdbf 100644 --- a/charts/doorkeeper/templates/serviceaccount.yaml +++ b/charts/doorkeeper/templates/serviceaccount.yaml @@ -1,11 +1,11 @@ -{{- if .Values.agent.serviceAccount.create -}} +{{- if .Values.server.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "doorkeeper.serviceAccountName" . }} labels: {{- include "doorkeeper.labels" . | nindent 4 }} - {{- with .Values.agent.serviceAccount.annotations }} + {{- with .Values.server.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }}