feat(argo-workflows): Add ability to set .Values.namespaceOverride (#2564)
This commit is contained in:
parent
de462b7e80
commit
1af4bf5f48
27 changed files with 43 additions and 30 deletions
|
@ -3,7 +3,7 @@ appVersion: v3.5.5
|
|||
name: argo-workflows
|
||||
description: A Helm chart for Argo Workflows
|
||||
type: application
|
||||
version: 0.40.13
|
||||
version: 0.40.14
|
||||
icon: https://argo-workflows.readthedocs.io/en/stable/assets/logo.png
|
||||
home: https://github.com/argoproj/argo-helm
|
||||
sources:
|
||||
|
@ -17,4 +17,4 @@ annotations:
|
|||
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
|
||||
artifacthub.io/changes: |
|
||||
- kind: added
|
||||
description: Disable leader election if only 1 repl of the Workflow Controller
|
||||
description: Support namespaceOverride
|
||||
|
|
|
@ -124,6 +124,7 @@ Fields to note:
|
|||
| images.tag | string | `""` | Common tag for Argo Workflows images. Defaults to `.Chart.AppVersion`. |
|
||||
| kubeVersionOverride | string | `""` | Override the Kubernetes version, which is used to evaluate certain manifests |
|
||||
| nameOverride | string | `nil` | String to partially override "argo-workflows.fullname" template |
|
||||
| namespaceOverride | string | `.Release.Namespace` | Override the namespace |
|
||||
| singleNamespace | bool | `false` | Restrict Argo to operate only in a single namespace (the namespace of the Helm release) by apply Roles and RoleBindings instead of the Cluster equivalents, and start workflow-controller with the --namespaced flag. Use it in clusters with strict access policy. |
|
||||
|
||||
### Workflow
|
||||
|
|
|
@ -189,3 +189,11 @@ Return the appropriate apiVersion for GKE resources
|
|||
{{- print "cloud.google.com/v1beta1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Expand the namespace of the release.
|
||||
Allows overriding it for multi-namespace deployments in combined charts.
|
||||
*/}}
|
||||
{{- define "argo-workflows.namespace" -}}
|
||||
{{- default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end }}
|
||||
|
|
|
@ -4,7 +4,7 @@ apiVersion: v1
|
|||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ $cm_name }}
|
||||
namespace: {{ $.Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" $ | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" $ "component" $.Values.controller.name "name" $cm_name) | nindent 4 }}
|
||||
{{- with $cm_val.annotations }}
|
||||
|
|
|
@ -8,7 +8,7 @@ kind: ClusterRole
|
|||
metadata:
|
||||
name: {{ template "argo-workflows.controller.fullname" . }}
|
||||
{{- if .Values.singleNamespace }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: v1
|
|||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.controller.config-map.name" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" "cm") | nindent 4 }}
|
||||
data:
|
||||
|
|
|
@ -8,7 +8,7 @@ kind: ClusterRoleBinding
|
|||
metadata:
|
||||
name: {{ template "argo-workflows.controller.fullname" . }}
|
||||
{{- if .Values.singleNamespace }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
|
@ -23,7 +23,7 @@ roleRef:
|
|||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "argo-workflows.controllerServiceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
|
||||
{{- if .Values.controller.clusterWorkflowTemplates.enabled }}
|
||||
---
|
||||
|
@ -40,6 +40,6 @@ roleRef:
|
|||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "argo-workflows.controllerServiceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: policy/v1
|
|||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.controller.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
spec:
|
||||
|
|
|
@ -2,7 +2,7 @@ apiVersion: apps/v1
|
|||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.controller.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
app.kubernetes.io/version: {{ include "argo-workflows.controller_chart_version_label" . }}
|
||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: v1
|
|||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.controllerServiceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
{{- with .Values.controller.serviceAccount.labels }}
|
||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: v1
|
|||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.controller.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
app.kubernetes.io/version: {{ include "argo-workflows.controller_chart_version_label" . }}
|
||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1
|
|||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.controller.fullname" . }}
|
||||
namespace: {{ default .Release.Namespace .Values.controller.serviceMonitor.namespace | quote }}
|
||||
namespace: {{ default (include "argo-workflows.namespace" .) .Values.controller.serviceMonitor.namespace | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
{{- with .Values.controller.serviceMonitor.additionalLabels }}
|
||||
|
@ -43,7 +43,7 @@ spec:
|
|||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace | quote }}
|
||||
- {{ include "argo-workflows.namespace" . | quote }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "argo-workflows.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 6 }}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{- if .Values.workflow.rbac.create -}}
|
||||
{{- range $namespace := or .Values.singleNamespace false | ternary (list "") (append .Values.controller.workflowNamespaces (coalesce .Values.workflow.namespace .Release.Namespace) | uniq) }}
|
||||
{{- range $namespace := or .Values.singleNamespace false | ternary (list "") (append .Values.controller.workflowNamespaces (coalesce .Values.workflow.namespace (include "argo-workflows.namespace" .)) | uniq) }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{- if .Values.workflow.rbac.create -}}
|
||||
{{- range $namespace := or .Values.singleNamespace false | ternary (list "") (append .Values.controller.workflowNamespaces (coalesce .Values.workflow.namespace .Release.Namespace) | uniq) }}
|
||||
{{- range $namespace := or .Values.singleNamespace false | ternary (list "") (append .Values.controller.workflowNamespaces (coalesce .Values.workflow.namespace (include "argo-workflows.namespace" .)) | uniq) }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{- if .Values.workflow.serviceAccount.create -}}
|
||||
{{- range $namespace := or .Values.singleNamespace false | ternary (list "") (append .Values.controller.workflowNamespaces (coalesce .Values.workflow.namespace .Release.Namespace) | uniq) }}
|
||||
{{- range $namespace := or .Values.singleNamespace false | ternary (list "") (append .Values.controller.workflowNamespaces (coalesce .Values.workflow.namespace (include "argo-workflows.namespace" .)) | uniq) }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: {{ include "argo-workflows.apiVersions.cloudgoogle" . }}
|
|||
kind: BackendConfig
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.server.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
||||
spec:
|
||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: networking.gke.io/v1beta1
|
|||
kind: FrontendConfig
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.server.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
||||
spec:
|
||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: networking.gke.io/v1
|
|||
kind: ManagedCertificate
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.server.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
spec:
|
||||
domains:
|
||||
{{- with .Values.server.GKEmanagedCertificate.domains }}
|
||||
|
|
|
@ -8,7 +8,7 @@ kind: ClusterRole
|
|||
metadata:
|
||||
name: {{ template "argo-workflows.server.fullname" . }}
|
||||
{{- if .Values.singleNamespace }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
||||
|
|
|
@ -8,7 +8,7 @@ kind: ClusterRoleBinding
|
|||
metadata:
|
||||
name: {{ template "argo-workflows.server.fullname" . }}
|
||||
{{- if .Values.singleNamespace }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
||||
|
@ -23,7 +23,7 @@ roleRef:
|
|||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "argo-workflows.serverServiceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
|
||||
{{- if .Values.server.clusterWorkflowTemplates.enabled }}
|
||||
---
|
||||
|
@ -40,6 +40,6 @@ roleRef:
|
|||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "argo-workflows.serverServiceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: {{ include "argo-workflows.apiVersion.autoscaling" . }}
|
|||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.server.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
||||
spec:
|
||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: policy/v1
|
|||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.server.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
||||
spec:
|
||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: apps/v1
|
|||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.server.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
||||
app.kubernetes.io/version: {{ include "argo-workflows.server_chart_version_label" . }}
|
||||
|
|
|
@ -14,7 +14,7 @@ metadata:
|
|||
{{- end }}
|
||||
{{- end }}
|
||||
name: {{ template "argo-workflows.server.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
||||
{{- if .Values.server.ingress.labels }}
|
||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: v1
|
|||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.serverServiceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
||||
{{- with .Values.server.serviceAccount.labels }}
|
||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: v1
|
|||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.server.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
namespace: {{ include "argo-workflows.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
||||
app.kubernetes.io/version: {{ include "argo-workflows.server_chart_version_label" . }}
|
||||
|
|
|
@ -26,6 +26,10 @@ nameOverride:
|
|||
# -- String to fully override "argo-workflows.fullname" template
|
||||
fullnameOverride:
|
||||
|
||||
# -- Override the namespace
|
||||
# @default -- `.Release.Namespace`
|
||||
namespaceOverride: ""
|
||||
|
||||
# -- Labels to set on all resources
|
||||
commonLabels: {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue