-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Frode Sundby <frode.sundby@nav.no> Co-authored-by: Trong Huu Nguyen <trong.huu.nguyen@nav.no> Co-authored-by: Thomas Siegfried Krampl <thomas.siegfried.krampl@nav.no>
- Loading branch information
1 parent
cc67f39
commit 8513efe
Showing
9 changed files
with
256 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{ if .Values.azure.forwardAuth }} | ||
--- | ||
apiVersion: nais.io/v1 | ||
kind: AzureAdApplication | ||
metadata: | ||
name: {{ include "wonderwall.fullname" . }}-fa | ||
labels: | ||
{{- include "wonderwall.labelsForwardAuth" . | nindent 4 }} | ||
spec: | ||
secretName: {{ .Values.azure.clientSecretName }} | ||
allowAllUsers: true | ||
logoutUrl: "{{ include "wonderwall.azure.ssoServerURL" . }}/oauth2/logout/frontchannel" | ||
replyUrls: | ||
- url: "{{- include "wonderwall.azure.ssoServerURL" . }}/oauth2/callback" | ||
tenant: nav.no | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{{- if .Values.azure.forwardAuth -}} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
reloader.stakater.com/search: "true" | ||
labels: | ||
aiven: enabled | ||
azure: enabled | ||
name: {{ include "wonderwall.fullname" . }}-fa | ||
spec: | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
{{- include "wonderwall.selectorLabelsForwardAuth" . | nindent 6 }} | ||
template: | ||
metadata: | ||
annotations: | ||
kubectl.kubernetes.io/default-container: wonderwall-fa | ||
prometheus.io/path: / | ||
prometheus.io/port: "8081" | ||
prometheus.io/scrape: "true" | ||
labels: | ||
aiven: enabled | ||
azure: enabled | ||
{{- include "wonderwall.labelsForwardAuth" . | nindent 8 }} | ||
name: wonderwall-fa | ||
spec: | ||
affinity: | ||
podAntiAffinity: | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
- podAffinityTerm: | ||
labelSelector: | ||
matchExpressions: | ||
- key: "app.kubernetes.io/name" | ||
operator: In | ||
values: | ||
- "{{ include "wonderwall.name" . }}" | ||
topologyKey: kubernetes.io/hostname | ||
weight: 10 | ||
containers: | ||
- env: | ||
- name: WONDERWALL_REDIS_URI | ||
valueFrom: | ||
secretKeyRef: | ||
key: REDIS_URI_WONDERWALL_AZURE | ||
name: {{ .Values.azure.redisSecretName }} | ||
- name: OTEL_SERVICE_NAME | ||
value: {{ .Values.otel.serviceName }} | ||
- name: OTEL_EXPORTER_OTLP_ENDPOINT | ||
value: {{ .Values.otel.endpoint }} | ||
- name: OTEL_RESOURCE_ATTRIBUTES | ||
value: {{ .Values.otel.resourceAttributes }} | ||
- name: WONDERWALL_REDIS_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
key: REDIS_USERNAME_WONDERWALL_AZURE | ||
name: {{ .Values.azure.redisSecretName }} | ||
- name: WONDERWALL_REDIS_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: REDIS_PASSWORD_WONDERWALL_AZURE | ||
name: {{ .Values.azure.redisSecretName }} | ||
envFrom: | ||
- secretRef: | ||
name: "{{ .Values.azure.clientSecretName }}" | ||
- secretRef: | ||
name: "{{ .Values.azure.ssoServerSecretName }}" | ||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }} | ||
imagePullPolicy: IfNotPresent | ||
livenessProbe: | ||
httpGet: | ||
path: /oauth2/ping | ||
port: http | ||
name: wonderwall-fa | ||
ports: | ||
- containerPort: 8080 | ||
name: http | ||
protocol: TCP | ||
readinessProbe: | ||
httpGet: | ||
path: /oauth2/ping | ||
port: http | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
privileged: false | ||
readOnlyRootFilesystem: true | ||
runAsGroup: 1069 | ||
runAsNonRoot: true | ||
runAsUser: 1069 | ||
seccompProfile: | ||
type: RuntimeDefault | ||
terminationMessagePath: /dev/termination-log | ||
terminationMessagePolicy: File | ||
volumeMounts: | ||
- mountPath: /tmp | ||
name: writable-tmp | ||
dnsPolicy: ClusterFirst | ||
imagePullSecrets: {{ toYaml .Values.imagePullSecrets }} | ||
restartPolicy: Always | ||
schedulerName: default-scheduler | ||
securityContext: | ||
seccompProfile: | ||
type: RuntimeDefault | ||
serviceAccountName: {{ include "wonderwall.fullname" . }} | ||
terminationGracePeriodSeconds: 30 | ||
volumes: | ||
- emptyDir: {} | ||
name: writable-tmp | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{{ if .Values.azure.forwardAuth }} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
annotations: | ||
nginx.ingress.kubernetes.io/proxy-buffer-size: 16k | ||
prometheus.io/path: /oauth2/ping | ||
prometheus.io/scrape: "true" | ||
labels: | ||
{{- include "wonderwall.labelsForwardAuth" . | nindent 4 }} | ||
name: {{ include "wonderwall.fullname" . }}-fa | ||
spec: | ||
ingressClassName: {{ .Values.azure.ingressClassName }} | ||
rules: | ||
- host: {{ .Values.azure.ssoDomain }} | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: {{ include "wonderwall.fullname" . }}-fa | ||
port: | ||
number: 80 | ||
path: / | ||
pathType: ImplementationSpecific | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{{ if .Values.azure.forwardAuth }} | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
type: kubernetes.io/Opaque | ||
metadata: | ||
name: "{{ .Values.azure.ssoServerSecretName }}" | ||
annotations: | ||
reloader.stakater.com/match: "true" | ||
labels: | ||
{{- include "wonderwall.labels" . | nindent 4 }} | ||
stringData: | ||
WONDERWALL_BIND_ADDRESS: "0.0.0.0:8080" | ||
WONDERWALL_METRICS_BIND_ADDRESS: "0.0.0.0:8081" | ||
WONDERWALL_INGRESS: "{{- include "wonderwall.azure.ssoServerURL" . }}" | ||
WONDERWALL_SHUTDOWN_WAIT_BEFORE_PERIOD: "5s" | ||
WONDERWALL_OPENID_PROVIDER: "azure" | ||
WONDERWALL_REDIS_CONNECTION_IDLE_TIMEOUT: "{{ .Values.redis.connectionIdleTimeout }}" | ||
WONDERWALL_ENCRYPTION_KEY: "{{ .Values.azure.sessionCookieEncryptionKey | required ".Values.azure.sessionCookieEncryptionKey is required." }}" | ||
WONDERWALL_SESSION_MAX_LIFETIME: "{{ .Values.azure.sessionMaxLifetime | required ".Values.azure.sessionMaxLifetime is required." }}" | ||
WONDERWALL_SESSION_REFRESH: "false" | ||
WONDERWALL_SESSION_REFRESH_AUTO: "false" | ||
WONDERWALL_SSO_DOMAIN: "{{ .Values.azure.ssoDomain | required ".Values.azure.ssoDomain is required." }}" | ||
WONDERWALL_SSO_ENABLED: "true" | ||
WONDERWALL_SSO_MODE: "server" | ||
WONDERWALL_SSO_SESSION_COOKIE_NAME: "{{ .Values.azure.sessionCookieName | required ".Values.azure.sessionCookieName is required." }}" | ||
WONDERWALL_SSO_SERVER_DEFAULT_REDIRECT_URL: "{{ .Values.azure.ssoDefaultRedirectURL | required ".Values.azure.ssoDefaultRedirectURL is required." }}" | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{ if .Values.azure.forwardAuth }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
{{- include "wonderwall.labelsForwardAuth" . | nindent 4 }} | ||
name: {{ include "wonderwall.fullname" . }}-fa | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- name: http | ||
port: 80 | ||
protocol: TCP | ||
targetPort: http | ||
selector: | ||
{{- include "wonderwall.selectorLabelsForwardAuth" . | nindent 4 }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters