Skip to content

Commit

Permalink
Migrate auth/auth logic to daq-deployments repository,, change deploy…
Browse files Browse the repository at this point in the history
…ment to accept extra definitions from values
  • Loading branch information
Rose Yemelyanova committed Aug 2, 2023
1 parent b800996 commit da6b1a1
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 47 deletions.
11 changes: 11 additions & 0 deletions helm/blueapi/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ app.kubernetes.io/name: {{ include "blueapi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Metadata labels
*/}}
{{- define "blueapi.metadataLabels" -}}
{{ include "blueapi.selectorLabels" . }}
sidecar.istio.io/inject: "true"
{{- range $key, $value := .Values.extraLabels }}
{{- $key }}: {{ $value | quote }} # N.B. ensures your labels are correctly String->String
{{- end }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
Expand Down
8 changes: 0 additions & 8 deletions helm/blueapi/templates/authz_configmap.yaml

This file was deleted.

15 changes: 4 additions & 11 deletions helm/blueapi/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "blueapi.selectorLabels" . | nindent 8 }}
{{- range $key, $value := .Values.authn.labels }}
{{- $key | nindent 8 }}: {{ $value | quote }} # N.B. ensures your labels are correctly String->String
{{- end }}
{{- range $key, $value := .Values.authz.labels }}
{{- $key | nindent 8 }}: {{ $value | quote }} # N.B. ensures your labels are correctly String->String
{{- end }}
sidecar.istio.io/inject: "true"
{{- include "blueapi.metadataLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand All @@ -42,9 +35,9 @@ spec:
- secret:
name: {{ . }}
{{- end }}
- name: opa-policy
configMap:
name: policy
{{- with .Values.extraVolumes -}}
{{ toYaml . | nindent 6 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down
5 changes: 0 additions & 5 deletions helm/blueapi/templates/envoyfilter.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions helm/blueapi/templates/sealed-secret.yaml

This file was deleted.

16 changes: 9 additions & 7 deletions helm/blueapi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@ worker:
port: 61613
# Config for the worker goes here, will be mounted into a config file

authn:
labels:
enable-authn: "true"

authz:
labels:
enable-authz: "true"
extraLabels:
sidecar.istio.io/inject: "true"
enable-authn: "true"
enable-authz: "true"

extraVolumes:
- name: opa-policy
configMap:
name: policy

rabbitmq:
persistence:
Expand Down

0 comments on commit da6b1a1

Please sign in to comment.