Skip to content

Commit

Permalink
chore: Force bump Helm chart version
Browse files Browse the repository at this point in the history
  • Loading branch information
achetronic committed Aug 26, 2024
1 parent 0f12f18 commit 1a41d6f
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion charts/doorkeeper/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions charts/doorkeeper/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
40 changes: 20 additions & 20 deletions charts/doorkeeper/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,100 +5,100 @@ 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 }}
protocol: {{ . }}
{{- 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 }}

Expand Down
18 changes: 9 additions & 9 deletions charts/doorkeeper/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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}}
Expand Down
4 changes: 2 additions & 2 deletions charts/doorkeeper/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down

0 comments on commit 1a41d6f

Please sign in to comment.