Skip to content

Commit

Permalink
Armada-scheduler helm tweaks + make kube native auth work
Browse files Browse the repository at this point in the history
 - Set POD_NAMESPACE + SERVICE_ACCOUNT so kube native auth works properly from api and scheduler pods
 - Set the service account name properly in additionalClusterRoleBindings
 - Add to the armada-scheduler tls cert to sign for each replica of the scheduler
  - This is so the scheduler pods can talk to each other directly
  - Alternatively we could use a * record here
  • Loading branch information
JamesMurkin committed Jul 11, 2023
1 parent c56b215 commit f1314c2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ roleRef:
name: {{ .clusterRoleName }}
subjects:
- kind: ServiceAccount
name: {{ $root.Values.customServiceAccount | default (include "armada-scheduler.name" $root) }}
name: {{ $root.Values.scheduler.customServiceAccount | default (include "armada-scheduler.name" $root) }}
namespace: {{ $root.Release.Namespace }}
{{ end }}
6 changes: 5 additions & 1 deletion deployment/scheduler/templates/scheduler-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@ spec:
{{ end }}
tls:
- hosts:
{{- toYaml .Values.scheduler.hostnames | nindent 8 }}
{{- toYaml .Values.scheduler.hostnames | nindent 6 }}
{{- $root := . -}}
{{- range $i := until (int .Values.scheduler.replicas) }}
- {{ include "armada-scheduler.name" $root }}-{{ $i }}.{{ include "armada-scheduler.name" $root }}.{{ $root.Release.Namespace }}.svc
{{- end }}
secretName: armada-scheduler-service-tls
8 changes: 8 additions & 0 deletions deployment/scheduler/templates/scheduler-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SERVICE_ACCOUNT
valueFrom:
fieldRef:
fieldPath: spec.serviceAccountName
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if not (((.Values.scheduler.applicationConfig).leader).leaderConnection).armadaUrl }}
- name: ARMADA_LEADER_LEADERCONNECTION_ARMADAURL
value: "<name>.{{ include "armada-scheduler.name" . }}.{{ .Release.Namespace }}.svc:{{ .Values.scheduler.applicationConfig.grpc.port }}"
Expand Down

0 comments on commit f1314c2

Please sign in to comment.