aligned serviceAccount configuration with argo-cd values
Signed-off-by: chgl <chgl@users.noreply.github.com>
This commit is contained in:
parent
676f05aa90
commit
445348f9a2
10 changed files with 40 additions and 38 deletions
|
@ -3,3 +3,5 @@ controller:
|
||||||
enabled: true
|
enabled: true
|
||||||
metricsConfig:
|
metricsConfig:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
telemetryConfig:
|
||||||
|
enabled: true
|
||||||
|
|
|
@ -64,10 +64,10 @@ app.kubernetes.io/component: {{ .component }}
|
||||||
Create the name of the server service account to use
|
Create the name of the server service account to use
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "argo-workflows.serverServiceAccountName" -}}
|
{{- define "argo-workflows.serverServiceAccountName" -}}
|
||||||
{{- if .Values.server.createServiceAccount -}}
|
{{- if .Values.server.serviceAccount.create -}}
|
||||||
{{ default (include "argo-workflows.fullname" .) .Values.server.serviceAccount }}
|
{{ default (include "argo-workflows.fullname" .) .Values.server.serviceAccount.name }}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{ default "default" .Values.server.serviceAccount }}
|
{{ default "default" .Values.server.serviceAccount.name }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
@ -75,10 +75,10 @@ Create the name of the server service account to use
|
||||||
Create the name of the controller service account to use
|
Create the name of the controller service account to use
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "argo-workflows.controllerServiceAccountName" -}}
|
{{- define "argo-workflows.controllerServiceAccountName" -}}
|
||||||
{{- if .Values.controller.createServiceAccount -}}
|
{{- if .Values.controller.serviceAccount.create -}}
|
||||||
{{ default (include "argo-workflows.fullname" .) .Values.controller.serviceAccount }}
|
{{ default (include "argo-workflows.fullname" .) .Values.controller.serviceAccount.name }}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{ default "default" .Values.controller.serviceAccount }}
|
{{ default "default" .Values.controller.serviceAccount.name }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ Return the appropriate service layout for ingress
|
||||||
- backend:
|
- backend:
|
||||||
service:
|
service:
|
||||||
name: {{ .serviceName }}
|
name: {{ .serviceName }}
|
||||||
port:
|
port:
|
||||||
number: {{ .servicePort }}
|
number: {{ .servicePort }}
|
||||||
pathType: ImplementationSpecific
|
pathType: ImplementationSpecific
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -18,10 +18,10 @@ roleRef:
|
||||||
name: {{ template "argo-workflows.controller.fullname" . }}
|
name: {{ template "argo-workflows.controller.fullname" . }}
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: {{ .Values.controller.serviceAccount }}
|
name: {{ template "argo-workflows.controllerServiceAccountName" . }}
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
{{- if .Values.controller.workflowNamespaces }}
|
{{- if .Values.controller.workflowNamespaces }}
|
||||||
{{- $uiServiceAccount := .Values.controller.serviceAccount }}
|
{{- $uiServiceAccount := (include "argo-workflows.controllerServiceAccountName" .) }}
|
||||||
{{- $namespace := .Release.Namespace }}
|
{{- $namespace := .Release.Namespace }}
|
||||||
{{- range $key := .Values.controller.workflowNamespaces }}
|
{{- range $key := .Values.controller.workflowNamespaces }}
|
||||||
{{- if not (eq $key $namespace) }}
|
{{- if not (eq $key $namespace) }}
|
||||||
|
@ -44,5 +44,5 @@ roleRef:
|
||||||
name: {{ template "argo-workflows.controller.fullname" . }}-cluster-template
|
name: {{ template "argo-workflows.controller.fullname" . }}-cluster-template
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: {{ .Values.controller.serviceAccount }}
|
name: {{ template "argo-workflows.controllerServiceAccountName" . }}
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
|
|
|
@ -2,7 +2,7 @@ apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "argo-workflows.controllerServiceAccountName" . }}
|
name: {{ template "argo-workflows.controllerServiceAccountName" . }}
|
||||||
{{ with .Values.controller.serviceAccountAnnotations }}
|
{{ with .Values.controller.serviceAccount.annotations }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- toYaml .| nindent 4 }}
|
{{- toYaml .| nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -16,14 +16,14 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
{{- if .Values.controller.metricsConfig.enabled }}
|
{{- if .Values.controller.metricsConfig.enabled }}
|
||||||
- name: {{ .Values.controller.metricsServicePortName }}
|
- name: {{ .Values.controller.metricsConfig.servicePortName }}
|
||||||
port: {{ .Values.controller.metricsServicePort }}
|
port: {{ .Values.controller.metricsConfig.servicePort }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: {{ .Values.controller.metricsConfig.port }}
|
targetPort: {{ .Values.controller.metricsConfig.port }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.controller.telemetryConfig.enabled }}
|
{{- if .Values.controller.telemetryConfig.enabled }}
|
||||||
- name: {{ .Values.controller.telemetryServicePortName }}
|
- name: {{ .Values.controller.telemetryConfig.servicePortName }}
|
||||||
port: {{ .Values.controller.telemetryServicePort }}
|
port: {{ .Values.controller.telemetryConfig.servicePort }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: {{ .Values.controller.telemetryConfig.port }}
|
targetPort: {{ .Values.controller.telemetryConfig.port }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -10,14 +10,14 @@ metadata:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
endpoints:
|
endpoints:
|
||||||
{{- with .Values.controller.metricsConfig.enabled }}
|
{{- if .Values.controller.metricsConfig.enabled }}
|
||||||
- port: metrics
|
- port: metrics
|
||||||
path: {{ . }}
|
path: {{ .Values.controller.metricsConfig.path }}
|
||||||
interval: 30s
|
interval: 30s
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.controller.telemetryConfig.enabled }}
|
{{- if .Values.controller.telemetryConfig.enabled }}
|
||||||
- port: telemetry
|
- port: telemetry
|
||||||
path: {{ . }}
|
path: {{ .Values.controller.telemetryConfig.path }}
|
||||||
interval: 30s
|
interval: 30s
|
||||||
{{- end }}
|
{{- end }}
|
||||||
namespaceSelector:
|
namespaceSelector:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{- if and .Values.server.enabled .Values.server.createServiceAccount -}}
|
{{- if and .Values.server.enabled .Values.server.serviceAccount.create -}}
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
{{- if .Values.singleNamespace }}
|
{{- if .Values.singleNamespace }}
|
||||||
kind: RoleBinding
|
kind: RoleBinding
|
||||||
|
@ -19,7 +19,7 @@ roleRef:
|
||||||
name: {{ template "argo-workflows.server.fullname" . }}
|
name: {{ template "argo-workflows.server.fullname" . }}
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: {{ .Values.server.serviceAccount }}
|
name: {{ template "argo-workflows.serverServiceAccountName" . }}
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
@ -34,6 +34,6 @@ roleRef:
|
||||||
name: {{ template "argo-workflows.server.fullname" . }}-cluster-template
|
name: {{ template "argo-workflows.server.fullname" . }}-cluster-template
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: {{ .Values.server.serviceAccount }}
|
name: {{ template "argo-workflows.serverServiceAccountName" . }}
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -24,7 +24,7 @@ spec:
|
||||||
{{- toYaml .Values.server.podAnnotations | nindent 8 }}
|
{{- toYaml .Values.server.podAnnotations | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: {{ .Values.server.serviceAccount | quote }}
|
serviceAccountName: {{ template "argo-workflows.serverServiceAccountName" . }}
|
||||||
{{- with .Values.server.podSecurityContext }}
|
{{- with .Values.server.podSecurityContext }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{{- if and .Values.server.enabled .Values.server.createServiceAccount -}}
|
{{- if and .Values.server.enabled .Values.server.serviceAccount.create -}}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "argo-workflows.serverServiceAccountName" . }}
|
name: {{ template "argo-workflows.serverServiceAccountName" . }}
|
||||||
{{- with .Values.server.serviceAccountAnnotations }}
|
{{- with .Values.server.serviceAccount.annotations }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- toYaml . | indent 4 }}
|
{{- toYaml . | indent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -44,6 +44,8 @@ controller:
|
||||||
enabled: false
|
enabled: false
|
||||||
path: /metrics
|
path: /metrics
|
||||||
port: 9090
|
port: 9090
|
||||||
|
servicePort: 8080
|
||||||
|
servicePortName: metrics
|
||||||
# the controller container's securityContext
|
# the controller container's securityContext
|
||||||
securityContext:
|
securityContext:
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
|
@ -84,12 +86,16 @@ controller:
|
||||||
enabled: false
|
enabled: false
|
||||||
path: /telemetry
|
path: /telemetry
|
||||||
port: 8081
|
port: 8081
|
||||||
|
servicePort: 8081
|
||||||
|
servicePortName: telemetry
|
||||||
serviceMonitor:
|
serviceMonitor:
|
||||||
enabled: false
|
enabled: false
|
||||||
additionalLabels: {}
|
additionalLabels: {}
|
||||||
serviceAccount: argo
|
serviceAccount:
|
||||||
# Service account annotations
|
create: true
|
||||||
serviceAccountAnnotations: {}
|
name: argo
|
||||||
|
# Annotations applied to created service account
|
||||||
|
annotations: {}
|
||||||
name: workflow-controller
|
name: workflow-controller
|
||||||
workflowNamespaces:
|
workflowNamespaces:
|
||||||
- default
|
- default
|
||||||
|
@ -106,10 +112,6 @@ controller:
|
||||||
level: info
|
level: info
|
||||||
globallevel: "0"
|
globallevel: "0"
|
||||||
serviceType: ClusterIP
|
serviceType: ClusterIP
|
||||||
metricsServicePort: 8080
|
|
||||||
metricsServicePortName: metrics
|
|
||||||
telemetryServicePort: 8081
|
|
||||||
telemetryServicePortName: telemetry
|
|
||||||
# Annotations to be applied to the controller Service
|
# Annotations to be applied to the controller Service
|
||||||
serviceAnnotations: {}
|
serviceAnnotations: {}
|
||||||
# Optional labels to add to the controller Service
|
# Optional labels to add to the controller Service
|
||||||
|
@ -183,12 +185,10 @@ server:
|
||||||
serviceType: ClusterIP
|
serviceType: ClusterIP
|
||||||
servicePort: 2746
|
servicePort: 2746
|
||||||
# servicePortName: http
|
# servicePortName: http
|
||||||
serviceAccount: argo-server
|
serviceAccount:
|
||||||
# Whether to create the service account with the name specified in
|
create: true
|
||||||
# server.serviceAccount and bind it to the server role.
|
name: argo-server
|
||||||
createServiceAccount: true
|
annotations: {}
|
||||||
# Service account annotations
|
|
||||||
serviceAccountAnnotations: {}
|
|
||||||
# Annotations to be applied to the UI Service
|
# Annotations to be applied to the UI Service
|
||||||
serviceAnnotations: {}
|
serviceAnnotations: {}
|
||||||
# Optional labels to add to the UI Service
|
# Optional labels to add to the UI Service
|
||||||
|
|
Loading…
Reference in a new issue