Skip to content

Commit

Permalink
chore: add external ca certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
cwrau committed Aug 9, 2024
1 parent e8c384f commit 65aa8c0
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/anynines-klutch/ci/basic-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ backupManager:

oidc:
ingress:
host: dex.a9s.cwrau.wtf
host: oidc.a9s.cwrau.wtf

ingress:
host: klutch.a9s.cwrau.wtf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
spec:
serviceAccountName: {{ include "common.names.fullname" . }}
automountServiceAccountToken: true
enableServiceLinks: false
containers:
- name: anynines-backend
image: {{ include "common.images.image" (dict "imageRoot" .Values.global.kubebind.image "global" .Values.global) }}
Expand All @@ -33,7 +34,9 @@ spec:
- --listen-address=0.0.0.0:9443
- --cookie-signing-key=$(COOKIE-SIGNING-KEY)
- --cookie-encryption-key=$(COOKIE-ENCRYPTION-KEY)
# TODO: a9s will look into just talking to klutch instead of the k8s API
- --external-address={{ .Values.kubernetes.externalAddress }}
- --external-ca-file=/cert/ca.crt
ports:
- containerPort: 9443
name: https
Expand All @@ -46,7 +49,7 @@ spec:
name: {{ printf "%s-oidc" (include "common.names.fullname" .) }}
key: kube-bind-client-secret
- name: OIDC-ISSUER-URL
value: {{ printf "https://%s" .Values.oidc.ingress.host }}
value: {{ printf "https://%s/realms/%s" .Values.oidc.ingress.host (include "anynines-klutch.oidc.realm" (dict)) }}
- name: OIDC-CALLBACK-URL
value: {{ printf "https://%s/callback" .Values.ingress.host }}
- name: COOKIE-SIGNING-KEY
Expand All @@ -66,3 +69,10 @@ spec:
requests:
cpu: "100m"
memory: 256Mi
volumeMounts:
- mountPath: /cert
name: certificate
volumes:
- name: certificate
secret:
secretName: {{ printf "%s-kubernetes-ca-certificate" (include "common.names.fullname" .) }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-kubernetes-ca-certificate" (include "common.names.fullname" .) }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
type: Generic
stringData:
ca.crt: {{ .Values.kubernetes.caCertificate | quote }}
3 changes: 3 additions & 0 deletions charts/anynines-klutch/templates/oidc/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- define "anynines-klutch.oidc.realm" -}}
a9s
{{- end -}}
2 changes: 1 addition & 1 deletion charts/anynines-klutch/templates/oidc/keycloak.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ spec:
a9s.yaml: |
enabled: true
registrationAllowed: false
realm: a9s
realm: {{ include "anynines-klutch.oidc.realm" (dict) }}
displayName: a9s platform
clients:
- clientId: kube-bind
Expand Down
3 changes: 3 additions & 0 deletions charts/anynines-klutch/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
"properties": {
"externalAddress": {
"type": "string"
},
"caCertificate": {
"type": "string"
}
},
"required": [
Expand Down

0 comments on commit 65aa8c0

Please sign in to comment.