diff --git a/charts/argo-cd/templates/argocd-application-controller/statefulset.yaml b/charts/argo-cd/templates/argocd-application-controller/statefulset.yaml index cf76d402..cc93702c 100644 --- a/charts/argo-cd/templates/argocd-application-controller/statefulset.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/statefulset.yaml @@ -263,45 +263,18 @@ spec: initContainers: {{- tpl (toYaml .) $ | nindent 6 }} {{- end }} - {{- if or .Values.controller.nodeSelector .Values.global.nodeSelector }} - {{- if .Values.controller.nodeSelector }} - {{- with .Values.controller.nodeSelector }} + {{- with .Values.controller.nodeSelector | default .Values.global.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.controller.tolerations .Values.global.tolerations }} - {{- if .Values.controller.tolerations }} - {{- with .Values.controller.tolerations }} + {{- with .Values.controller.tolerations | default .Values.global.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.controller.affinity .Values.global.affinity }} - {{- if .Values.controller.affinity }} - {{- with .Values.controller.affinity }} + {{- with .Values.controller.affinity | default .Values.global.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} {{- with .Values.controller.topologySpreadConstraints }} topologySpreadConstraints: {{- range $constraint := . }} diff --git a/charts/argo-cd/templates/argocd-applicationset/deployment.yaml b/charts/argo-cd/templates/argocd-applicationset/deployment.yaml index 415eeff3..136d4fc0 100644 --- a/charts/argo-cd/templates/argocd-applicationset/deployment.yaml +++ b/charts/argo-cd/templates/argocd-applicationset/deployment.yaml @@ -131,45 +131,18 @@ spec: initContainers: {{- tpl (toYaml .) $ | nindent 6 }} {{- end }} - {{- if or .Values.applicationSet.nodeSelector .Values.global.nodeSelector }} - {{- if .Values.applicationSet.nodeSelector }} - {{- with .Values.applicationSet.nodeSelector }} + {{- with .Values.applicationSet.nodeSelector | default .Values.global.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.applicationSet.affinity .Values.global.affinity }} - {{- if .Values.applicationSet.affinity }} - {{- with .Values.applicationSet.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- else }} - {{- with .Values.global.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.applicationSet.tolerations .Values.global.tolerations }} - {{- if .Values.applicationSet.tolerations }} - {{- with .Values.applicationSet.tolerations }} + {{- with .Values.applicationSet.tolerations | default .Values.global.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.tolerations }} - tolerations: + {{- with .Values.applicationSet.affinity | default .Values.global.affinity }} + affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- end }} - {{- end }} {{- with .Values.applicationSet.priorityClassName }} priorityClassName: {{ . }} {{- end }} diff --git a/charts/argo-cd/templates/argocd-notifications/bots/slack/deployment.yaml b/charts/argo-cd/templates/argocd-notifications/bots/slack/deployment.yaml index 5fc921a4..98491260 100644 --- a/charts/argo-cd/templates/argocd-notifications/bots/slack/deployment.yaml +++ b/charts/argo-cd/templates/argocd-notifications/bots/slack/deployment.yaml @@ -48,43 +48,16 @@ spec: {{- toYaml .Values.notifications.bots.slack.resources | nindent 12 }} securityContext: {{- toYaml .Values.notifications.bots.slack.containerSecurityContext | nindent 12 }} - {{- if or .Values.notifications.bots.slack.nodeSelector .Values.global.nodeSelector }} - {{- if .Values.notifications.bots.slack.nodeSelector }} - {{- with .Values.notifications.bots.slack.nodeSelector }} + {{- with .Values.notifications.bots.slack.nodeSelector | default .Values.global.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.notifications.bots.slack.affinity .Values.global.affinity }} - {{- if .Values.notifications.bots.slack.affinity }} - {{- with .Values.notifications.bots.slack.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- else }} - {{- with .Values.global.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.notifications.bots.slack.tolerations .Values.global.tolerations }} - {{- if .Values.notifications.bots.slack.tolerations }} - {{- with .Values.notifications.bots.slack.tolerations }} + {{- with .Values.notifications.bots.slack.tolerations | default .Values.global.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.tolerations }} - tolerations: + {{- with .Values.notifications.bots.slack.affinity | default .Values.global.affinity }} + affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- end }} - {{- end }} {{ end }} diff --git a/charts/argo-cd/templates/argocd-notifications/deployment.yaml b/charts/argo-cd/templates/argocd-notifications/deployment.yaml index bfa8d367..9d9a7e71 100644 --- a/charts/argo-cd/templates/argocd-notifications/deployment.yaml +++ b/charts/argo-cd/templates/argocd-notifications/deployment.yaml @@ -88,45 +88,18 @@ spec: initContainers: {{- tpl (toYaml . ) $ | nindent 8 }} {{- end }} - {{- if or .Values.notifications.nodeSelector .Values.global.nodeSelector }} - {{- if .Values.notifications.nodeSelector }} - {{- with .Values.notifications.nodeSelector }} + {{- with .Values.notifications.nodeSelector | default .Values.global.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.notifications.affinity .Values.global.affinity }} - {{- if .Values.notifications.affinity }} - {{- with .Values.notifications.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- else }} - {{- with .Values.global.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.notifications.tolerations .Values.global.tolerations }} - {{- if .Values.notifications.tolerations }} - {{- with .Values.notifications.tolerations }} + {{- with .Values.notifications.tolerations | default .Values.global.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.tolerations }} - tolerations: + {{- with .Values.notifications.affinity | default .Values.global.affinity }} + affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- end }} - {{- end }} {{- with .Values.notifications.priorityClassName }} priorityClassName: {{ . }} {{- end }} diff --git a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml index d570337d..14851604 100755 --- a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml @@ -289,45 +289,18 @@ spec: {{- with .Values.repoServer.initContainers }} {{- tpl (toYaml .) $ | nindent 6 }} {{- end }} - {{- if or .Values.repoServer.nodeSelector .Values.global.nodeSelector }} - {{- if .Values.repoServer.nodeSelector }} - {{- with .Values.repoServer.nodeSelector }} + {{- with .Values.repoServer.nodeSelector | default .Values.global.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.repoServer.tolerations .Values.global.tolerations }} - {{- if .Values.repoServer.tolerations }} - {{- with .Values.repoServer.tolerations }} + {{- with .Values.repoServer.tolerations | default .Values.global.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.repoServer.affinity .Values.global.affinity }} - {{- if .Values.repoServer.affinity }} - {{- with .Values.repoServer.affinity }} + {{- with .Values.repoServer.affinity | default .Values.global.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} {{- with .Values.repoServer.topologySpreadConstraints }} topologySpreadConstraints: {{- range $constraint := . }} diff --git a/charts/argo-cd/templates/argocd-server/deployment.yaml b/charts/argo-cd/templates/argocd-server/deployment.yaml index 778732ff..fa64a591 100755 --- a/charts/argo-cd/templates/argocd-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-server/deployment.yaml @@ -340,45 +340,18 @@ spec: initContainers: {{- tpl (toYaml .) $ | nindent 6 }} {{- end }} - {{- if or .Values.server.nodeSelector .Values.global.nodeSelector }} - {{- if .Values.server.nodeSelector }} - {{- with .Values.server.nodeSelector }} + {{- with .Values.server.nodeSelector | default .Values.global.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.server.tolerations .Values.global.tolerations }} - {{- if .Values.server.tolerations }} - {{- with .Values.server.tolerations }} + {{- with .Values.server.tolerations | default .Values.global.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.server.affinity .Values.global.affinity }} - {{- if .Values.server.affinity }} - {{- with .Values.server.affinity }} + {{- with .Values.server.affinity | default .Values.global.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} {{- with .Values.server.topologySpreadConstraints }} topologySpreadConstraints: {{- range $constraint := . }} diff --git a/charts/argo-cd/templates/dex/deployment.yaml b/charts/argo-cd/templates/dex/deployment.yaml index 78f52796..622fe77b 100755 --- a/charts/argo-cd/templates/dex/deployment.yaml +++ b/charts/argo-cd/templates/dex/deployment.yaml @@ -138,45 +138,18 @@ spec: {{- with .Values.dex.initContainers }} {{- tpl (toYaml .) $ | nindent 6 }} {{- end }} - {{- if or .Values.dex.nodeSelector .Values.global.nodeSelector }} - {{- if .Values.dex.nodeSelector }} - {{- with .Values.dex.nodeSelector }} + {{- with .Values.dex.nodeSelector | default .Values.global.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.dex.tolerations .Values.global.tolerations }} - {{- if .Values.dex.tolerations }} - {{- with .Values.dex.tolerations }} + {{- with .Values.dex.tolerations | default .Values.global.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.dex.affinity .Values.global.affinity }} - {{- if .Values.dex.affinity }} - {{- with .Values.dex.affinity }} + {{- with .Values.dex.affinity | default .Values.global.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} {{- with .Values.dex.topologySpreadConstraints }} topologySpreadConstraints: {{- range $constraint := . }} diff --git a/charts/argo-cd/templates/redis/deployment.yaml b/charts/argo-cd/templates/redis/deployment.yaml index 55643532..906fb479 100755 --- a/charts/argo-cd/templates/redis/deployment.yaml +++ b/charts/argo-cd/templates/redis/deployment.yaml @@ -98,45 +98,18 @@ spec: initContainers: {{- tpl (toYaml .) $ | nindent 6 }} {{- end }} - {{- if or .Values.redis.nodeSelector .Values.global.nodeSelector }} - {{- if .Values.redis.nodeSelector }} - {{- with .Values.redis.nodeSelector }} + {{- with .Values.redis.nodeSelector | default .Values.global.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.redis.tolerations .Values.global.tolerations }} - {{- if .Values.redis.tolerations }} - {{- with .Values.redis.tolerations }} + {{- with .Values.redis.tolerations | default .Values.global.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} - {{- if or .Values.redis.affinity .Values.global.affinity }} - {{- if .Values.redis.affinity }} - {{- with .Values.redis.affinity }} + {{- with .Values.redis.affinity | default .Values.global.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- else }} - {{- with .Values.global.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- end }} {{- with .Values.redis.topologySpreadConstraints }} topologySpreadConstraints: {{- range $constraint := . }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index d9fe2a0c..af9802e7 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -87,13 +87,22 @@ global: # fsGroup: 999 # -- [Node selector] - nodeSelector: {} + nodeSelector: + globalkey1 : globalValue1 + globalkey2 : globalValue2 # -- [Tolerations] for use with node taints - tolerations: [] + tolerations: + - key: globalKey1 + operator: "Exists" + effect: "NoSchedule" + - key: globalKey2 + operator: "NoExists" + effect: "NoSchedule" # -- Assign custom [affinity] rules to the deployment - affinity: {} + affinity: + globalKey: globalAffinity # -- Mapping between IP and hostnames that will be injected as entries in the pod's hosts files hostAliases: [] # - ip: 10.20.30.40 @@ -626,12 +635,18 @@ controller: # -- [Node selector] nodeSelector: {} + # key1: localValue # -- [Tolerations] for use with node taints - tolerations: [] + tolerations: + - key1: localValueContoller + operator: "Exists" + effect: "NoSchedule" # -- Assign custom [affinity] rules to the deployment - affinity: {} + affinity: + localKey: localValueController + # -- Assign custom [TopologySpreadConstraints] rules to the application controller ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ @@ -955,9 +970,13 @@ dex: servicePortMetrics: 5558 # -- [Node selector] - nodeSelector: {} + nodeSelector: + key : valueDexLocal # -- [Tolerations] for use with node taints - tolerations: [] + tolerations: + - key: dexValue + operator: "Exists" + effect: "NoSchedule" # -- Assign custom [affinity] rules to the deployment affinity: {} @@ -1081,10 +1100,14 @@ redis: nodeSelector: {} # -- [Tolerations] for use with node taints - tolerations: [] + tolerations: + - key: LOCSLKeyRedis + operator: "Exists" + effect: "NoSchedule" # -- Assign custom [affinity] rules to the deployment - affinity: {} + affinity: + key : vLAUEaFFINITY # -- Assign custom [TopologySpreadConstraints] rules to redis ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ @@ -1464,9 +1487,13 @@ server: timeoutSeconds: 1 # -- [Node selector] - nodeSelector: {} + nodeSelector: + key: localKeyServerNodeSel # -- [Tolerations] for use with node taints - tolerations: [] + tolerations: + - key: globalKeysSERVER + operator: "Exists" + effect: "NoSchedule" # -- Assign custom [affinity] rules to the deployment affinity: {} @@ -1946,11 +1973,16 @@ repoServer: timeoutSeconds: 1 # -- [Node selector] - nodeSelector: {} + nodeSelector: + key : localRepoServerNS # -- [Tolerations] for use with node taints - tolerations: [] + tolerations: + - key: localKeyReposSERVER + operator: "Exists" + effect: "NoSchedule" # -- Assign custom [affinity] rules to the deployment - affinity: {} + affinity: + key : localRepoServerLocalAffinity # -- Assign custom [TopologySpreadConstraints] rules to the repo server ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ @@ -2287,7 +2319,8 @@ applicationSet: nodeSelector: {} # -- [Tolerations] for use with node taints - tolerations: [] + tolerations: + - key: applicationSetValue # -- Assign custom [affinity] rules affinity: {} @@ -2519,13 +2552,17 @@ notifications: - ALL # -- [Node selector] - nodeSelector: {} + nodeSelector: + key: localRepoServerNS # -- [Tolerations] for use with node taints - tolerations: [] + tolerations: + - key : localRepoServerNotification + operator: nolocal # -- Assign custom [affinity] rules - affinity: {} + affinity: + key : NotificationAffinity # -- Priority class for the notifications controller pods priorityClassName: "" @@ -2825,7 +2862,7 @@ notifications: slack: # -- Enable slack bot ## You have to set secret.notifiers.slack.signingSecret - enabled: false + enabled: true ## Slack bot Pod Disruption Budget ## Ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ @@ -2906,4 +2943,5 @@ notifications: tolerations: [] # -- [Node selector] - nodeSelector: {} + nodeSelector: + key : localRepoServerSlack