Skip to content
Snippets Groups Projects
Verified Commit aa8b994e authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

Update config

parent 9c0613e6
No related branches found
No related tags found
No related merge requests found
Pipeline #38974 passed
dependencies: []
digest: sha256:643d5437104296e21d906ecb15b2c96ad278f20cfc4af53b12bb6069bd853726
generated: "2022-06-15T11:17:58.845438944+02:00"
generated: "2022-08-21T19:46:04.793152788+02:00"
apiVersion: v2
name: Dex Authenticator
name: dex-authenticator
description: Dex Authenticator
version: 1.0.0
......
......@@ -30,6 +30,7 @@ spec:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
spec:
priorityClassName: "infra-addon"
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
......
{{/*
Expand the name of the chart.
*/}}
{{- define "dex-authenticator.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "dex-authenticator.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "dex-authenticator.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "dex-authenticator.labels" -}}
helm.sh/chart: {{ include "dex-authenticator.chart" . }}
{{ include "dex-authenticator.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "dex-authenticator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "dex-authenticator.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "dex-authenticator.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "dex-authenticator.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Generate the .dockerconfigjson file unencoded.
*/}}
{{- define "dockerconfigjson.b64dec" }}
{{- print "{\"auths\":{" }}
{{- range $index, $item := .Values.imageCredentials }}
{{- if $index }}
{{- print "," }}
{{- end }}
{{- printf "\"%s\":{\"auth\":\"%s\"}" (default "https://index.docker.io/v1/" $item.registry) (printf "%s:%s" $item.username $item.accessToken | b64enc) }}
{{- end }}
{{- print "}}" }}
{{- end }}
{{/*
Generate the base64-encoded .dockerconfigjson.
See https://github.com/helm/helm/issues/3691#issuecomment-386113346
*/}}
{{- define "dockerconfigjson.b64enc" }}
{{- include "dockerconfigjson.b64dec" . | b64enc }}
{{- end }}
apiVersion: v1
kind: Secret
metadata:
name: "harbor"
labels:
{{- include "dex-authenticator.labels" . | nindent 4 }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ template "dockerconfigjson.b64enc" . }}
dockerconfigjson: {} # Set in values.yaml.secret
dex-k8s-authenticator:
global:
deployEnv: prod
......@@ -10,7 +12,7 @@ dex-k8s-authenticator:
pullPolicy: Always
imagePullSecrets:
- name: harbor-kszk
- name: harbor
dexK8sAuthenticator:
port: 5555
......@@ -27,7 +29,7 @@ dex-k8s-authenticator:
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: 'true'
kubernetes.io/tls-acme: "true"
hosts:
- host: login.k8s-02.sch.bme.hu
paths:
......@@ -38,5 +40,4 @@ dex-k8s-authenticator:
hosts:
- login.k8s-02.sch.bme.hu
resources: {}
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment