Allow chart to be deployed and only ship CRDs

This commit is contained in:
Tim Priestnall 2023-10-17 10:57:20 +01:00
parent df9ee892b5
commit 67494a64ad
99 changed files with 205 additions and 7 deletions

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.createAggregateRoles }} {{- if .Values.createAggregateRoles }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole kind: ClusterRole
@ -83,3 +84,4 @@ rules:
- update - update
- watch - watch
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- $config := .Values.controller.clusterAdminAccess | default dict -}} {{- $config := .Values.controller.clusterAdminAccess | default dict -}}
{{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }} {{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -22,3 +23,4 @@ rules:
- '*' - '*'
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- $config := .Values.controller.clusterAdminAccess | default dict -}} {{- $config := .Values.controller.clusterAdminAccess | default dict -}}
{{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }} {{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -15,3 +16,4 @@ subjects:
name: {{ include "argo-cd.controllerServiceAccountName" . }} name: {{ include "argo-cd.controllerServiceAccountName" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.controller.metrics.enabled }} {{- if .Values.controller.metrics.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -32,3 +33,4 @@ spec:
selector: selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 4 }} {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 4 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.global.networkPolicy.create }} {{- if .Values.global.networkPolicy.create }}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: NetworkPolicy kind: NetworkPolicy
@ -18,3 +19,4 @@ spec:
policyTypes: policyTypes:
- Ingress - Ingress
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.controller.pdb.enabled }} {{- if .Values.controller.pdb.enabled }}
apiVersion: policy/v1 apiVersion: policy/v1
kind: PodDisruptionBudget kind: PodDisruptionBudget
@ -25,3 +26,4 @@ spec:
matchLabels: matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 6 }} {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 6 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.controller.metrics.enabled .Values.controller.metrics.rules.enabled }} {{- if and .Values.controller.metrics.enabled .Values.controller.metrics.rules.enabled }}
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule kind: PrometheusRule
@ -22,3 +23,4 @@ spec:
rules: rules:
{{- toYaml .Values.controller.metrics.rules.spec | nindent 4 }} {{- toYaml .Values.controller.metrics.rules.spec | nindent 4 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
@ -34,4 +35,5 @@ rules:
- events - events
verbs: verbs:
- create - create
- list - list
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
metadata: metadata:
@ -12,4 +13,5 @@ roleRef:
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: {{ template "argo-cd.controllerServiceAccountName" . }} name: {{ template "argo-cd.controllerServiceAccountName" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.controller.serviceAccount.create }} {{- if .Values.controller.serviceAccount.create }}
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@ -17,3 +18,4 @@ metadata:
{{ $key }}: {{ $value | quote }} {{ $key }}: {{ $value | quote }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.controller.metrics.enabled .Values.controller.metrics.serviceMonitor.enabled }} {{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.controller.metrics.enabled .Values.controller.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor kind: ServiceMonitor
@ -45,3 +46,4 @@ spec:
matchLabels: matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.controller.name "name" "metrics") | nindent 6 }} {{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.controller.name "name" "metrics") | nindent 6 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
@ -338,3 +339,4 @@ spec:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
dnsPolicy: {{ .Values.controller.dnsPolicy }} dnsPolicy: {{ .Values.controller.dnsPolicy }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.applicationSet.certificate.enabled -}} {{- if .Values.applicationSet.certificate.enabled -}}
apiVersion: cert-manager.io/v1 apiVersion: cert-manager.io/v1
kind: Certificate kind: Certificate
@ -37,3 +38,4 @@ spec:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.applicationSet.enabled }} {{- if .Values.applicationSet.enabled }}
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@ -315,3 +316,4 @@ spec:
{{- end }} {{- end }}
dnsPolicy: {{ .Values.applicationSet.dnsPolicy }} dnsPolicy: {{ .Values.applicationSet.dnsPolicy }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.applicationSet.enabled .Values.applicationSet.metrics.enabled }} {{- if and .Values.applicationSet.enabled .Values.applicationSet.metrics.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -32,3 +33,4 @@ spec:
selector: selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.applicationSet.name) | nindent 4 }} {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.applicationSet.name) | nindent 4 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.applicationSet.enabled .Values.global.networkPolicy.create (or .Values.applicationSet.metrics.enabled .Values.applicationSet.webhook.ingress.enabled) }} {{- if and .Values.applicationSet.enabled .Values.global.networkPolicy.create (or .Values.applicationSet.metrics.enabled .Values.applicationSet.webhook.ingress.enabled) }}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: NetworkPolicy kind: NetworkPolicy
@ -24,3 +25,4 @@ spec:
policyTypes: policyTypes:
- Ingress - Ingress
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.applicationSet.enabled .Values.applicationSet.pdb.enabled }} {{- if and .Values.applicationSet.enabled .Values.applicationSet.pdb.enabled }}
apiVersion: policy/v1 apiVersion: policy/v1
kind: PodDisruptionBudget kind: PodDisruptionBudget
@ -25,3 +26,4 @@ spec:
matchLabels: matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.applicationSet.name) | nindent 6 }} {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.applicationSet.name) | nindent 6 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.applicationSet.enabled }} {{- if .Values.applicationSet.enabled }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
@ -87,3 +88,4 @@ rules:
- update - update
- watch - watch
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.applicationSet.enabled }} {{- if .Values.applicationSet.enabled }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
@ -15,3 +16,4 @@ subjects:
name: {{ template "argo-cd.applicationSetServiceAccountName" . }} name: {{ template "argo-cd.applicationSetServiceAccountName" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.applicationSet.enabled }} {{- if .Values.applicationSet.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -24,3 +25,4 @@ spec:
selector: selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.applicationSet.name) | nindent 4 }} {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.applicationSet.name) | nindent 4 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.applicationSet.enabled .Values.applicationSet.serviceAccount.create }} {{- if and .Values.applicationSet.enabled .Values.applicationSet.serviceAccount.create }}
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@ -17,3 +18,4 @@ metadata:
{{ $key }}: {{ $value | quote }} {{ $key }}: {{ $value | quote }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.applicationSet.enabled }} {{- if .Values.applicationSet.enabled }}
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.applicationSet.metrics.enabled .Values.applicationSet.metrics.serviceMonitor.enabled }} {{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.applicationSet.metrics.enabled .Values.applicationSet.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
@ -47,3 +48,4 @@ spec:
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.applicationSet.name "name" "metrics") | nindent 6 }} {{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.applicationSet.name "name" "metrics") | nindent 6 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.applicationSet.enabled .Values.applicationSet.webhook.ingress.enabled -}} {{- if and .Values.applicationSet.enabled .Values.applicationSet.webhook.ingress.enabled -}}
{{- $servicePort := .Values.applicationSet.service.portName -}} {{- $servicePort := .Values.applicationSet.service.portName -}}
{{- $paths := .Values.applicationSet.webhook.ingress.paths -}} {{- $paths := .Values.applicationSet.webhook.ingress.paths -}}
@ -71,3 +72,4 @@ spec:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if (hasKey .Values.server "configEnabled") | ternary .Values.server.configEnabled .Values.configs.cm.create }} {{- if (hasKey .Values.server "configEnabled") | ternary .Values.server.configEnabled .Values.configs.cm.create }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -15,3 +16,4 @@ metadata:
data: data:
{{- include "argo-cd.config.cm" . | trim | nindent 2 }} {{- include "argo-cd.config.cm" . | trim | nindent 2 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.configs.params.create }} {{- if .Values.configs.params.create }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -15,3 +16,4 @@ metadata:
data: data:
{{- include "argo-cd.config.params" . | trim | nindent 2 }} {{- include "argo-cd.config.params" . | trim | nindent 2 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.configs.cmp.create }} {{- if .Values.configs.cmp.create }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -23,3 +24,4 @@ data:
{{- toYaml $cmp_plugin_config | nindent 6 }} {{- toYaml $cmp_plugin_config | nindent 6 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.dex.enabled .Values.dex.certificateSecret.enabled }} {{- if and .Values.dex.enabled .Values.dex.certificateSecret.enabled }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@ -23,3 +24,4 @@ data:
tls.crt: {{ .Values.dex.certificateSecret.crt | b64enc | quote }} tls.crt: {{ .Values.dex.certificateSecret.crt | b64enc | quote }}
tls.key: {{ .Values.dex.certificateSecret.key | b64enc | quote }} tls.key: {{ .Values.dex.certificateSecret.key | b64enc | quote }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@ -15,3 +16,4 @@ metadata:
data: data:
{{- toYaml . | nindent 2 }} {{- toYaml . | nindent 2 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.notifications.enabled .Values.notifications.cm.create }} {{- if and .Values.notifications.enabled .Values.notifications.cm.create }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -26,3 +27,4 @@ data:
{{- toYaml . | nindent 2 }} {{- toYaml . | nindent 2 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.notifications.enabled .Values.notifications.secret.create }} {{- if and .Values.notifications.enabled .Values.notifications.secret.create }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@ -21,3 +22,4 @@ stringData:
{{- toYaml . | nindent 2 }} {{- toYaml . | nindent 2 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if (hasKey .Values.server "rbacConfigCreate") | ternary .Values.server.rbacConfigCreate .Values.configs.rbac.create }} {{- if (hasKey .Values.server "rbacConfigCreate") | ternary .Values.server.rbacConfigCreate .Values.configs.rbac.create }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -17,3 +18,4 @@ data:
{{- toYaml . | nindent 2 }} {{- toYaml . | nindent 2 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.repoServer.certificateSecret.enabled }} {{- if .Values.repoServer.certificateSecret.enabled }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@ -23,3 +24,4 @@ data:
tls.crt: {{ .Values.repoServer.certificateSecret.crt | b64enc | quote }} tls.crt: {{ .Values.repoServer.certificateSecret.crt | b64enc | quote }}
tls.key: {{ .Values.repoServer.certificateSecret.key | b64enc | quote }} tls.key: {{ .Values.repoServer.certificateSecret.key | b64enc | quote }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.configs.secret.createSecret }} {{- if .Values.configs.secret.createSecret }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@ -47,3 +48,4 @@ data:
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.server.certificateSecret.enabled (not .Values.server.certificate.enabled) }} {{- if and .Values.server.certificateSecret.enabled (not .Values.server.certificate.enabled) }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@ -20,3 +21,4 @@ data:
tls.crt: {{ .Values.server.certificateSecret.crt | b64enc | quote }} tls.crt: {{ .Values.server.certificateSecret.crt | b64enc | quote }}
tls.key: {{ .Values.server.certificateSecret.key | b64enc | quote }} tls.key: {{ .Values.server.certificateSecret.key | b64enc | quote }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@ -21,3 +22,4 @@ data:
{{- with .Values.configs.ssh.extraHosts }} {{- with .Values.configs.ssh.extraHosts }}
{{- . | nindent 4 }} {{- . | nindent 4 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.configs.styles }} {{- if .Values.configs.styles }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -10,3 +11,4 @@ data:
custom.styles.css: | custom.styles.css: |
{{- .Values.configs.styles | nindent 4 }} {{- .Values.configs.styles | nindent 4 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@ -21,3 +22,4 @@ data:
{{- toYaml . | nindent 2 }} {{- toYaml . | nindent 2 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- range .Values.configs.clusterCredentials }} {{- range .Values.configs.clusterCredentials }}
--- ---
apiVersion: v1 apiVersion: v1
@ -33,3 +34,4 @@ stringData:
config: | config: |
{{- required "A valid .Values.configs.clusterCredentials[].config entry is required!" .config | toRawJson | nindent 4 }} {{- required "A valid .Values.configs.clusterCredentials[].config entry is required!" .config | toRawJson | nindent 4 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and (or .Values.externalRedis.username .Values.externalRedis.password) (not .Values.externalRedis.existingSecret) }} {{- if and (or .Values.externalRedis.username .Values.externalRedis.password) (not .Values.externalRedis.existingSecret) }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@ -21,3 +22,4 @@ data:
redis-password: {{ . | b64enc }} redis-password: {{ . | b64enc }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- range $repo_cred_key, $repo_cred_value := .Values.configs.credentialTemplates }} {{- range $repo_cred_key, $repo_cred_value := .Values.configs.credentialTemplates }}
--- ---
apiVersion: v1 apiVersion: v1
@ -19,3 +20,4 @@ data:
{{ $key }}: {{ $value | toString | b64enc }} {{ $key }}: {{ $value | toString | b64enc }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- range $repo_key, $repo_value := .Values.configs.repositories }} {{- range $repo_key, $repo_value := .Values.configs.repositories }}
--- ---
apiVersion: v1 apiVersion: v1
@ -19,3 +20,4 @@ data:
{{ $key }}: {{ $value | b64enc }} {{ $key }}: {{ $value | b64enc }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.notifications.enabled }} {{- if .Values.notifications.enabled }}
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@ -159,3 +160,4 @@ spec:
{{- end }} {{- end }}
dnsPolicy: {{ .Values.notifications.dnsPolicy }} dnsPolicy: {{ .Values.notifications.dnsPolicy }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.notifications.enabled .Values.notifications.metrics.enabled }} {{- if and .Values.notifications.enabled .Values.notifications.metrics.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -32,3 +33,4 @@ spec:
port: {{ .Values.notifications.metrics.port }} port: {{ .Values.notifications.metrics.port }}
targetPort: metrics targetPort: metrics
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.notifications.enabled .Values.global.networkPolicy.create .Values.notifications.metrics.enabled }} {{- if and .Values.notifications.enabled .Values.global.networkPolicy.create .Values.notifications.metrics.enabled }}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: NetworkPolicy kind: NetworkPolicy
@ -18,3 +19,4 @@ spec:
policyTypes: policyTypes:
- Ingress - Ingress
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.notifications.enabled .Values.notifications.pdb.enabled }} {{- if and .Values.notifications.enabled .Values.notifications.pdb.enabled }}
apiVersion: policy/v1 apiVersion: policy/v1
kind: PodDisruptionBudget kind: PodDisruptionBudget
@ -25,3 +26,4 @@ spec:
matchLabels: matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.notifications.name) | nindent 6 }} {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.notifications.name) | nindent 6 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.notifications.enabled }} {{- if .Values.notifications.enabled }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
@ -43,3 +44,4 @@ rules:
verbs: verbs:
- get - get
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.notifications.enabled }} {{- if .Values.notifications.enabled }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
@ -15,3 +16,4 @@ subjects:
name: {{ template "argo-cd.notificationsServiceAccountName" . }} name: {{ template "argo-cd.notificationsServiceAccountName" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.notifications.enabled .Values.notifications.serviceAccount.create }} {{- if and .Values.notifications.enabled .Values.notifications.serviceAccount.create }}
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@ -17,3 +18,4 @@ metadata:
{{ $key }}: {{ $value | quote }} {{ $key }}: {{ $value | quote }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.notifications.enabled .Values.notifications.metrics.enabled .Values.notifications.metrics.serviceMonitor.enabled }} {{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.notifications.enabled .Values.notifications.metrics.enabled .Values.notifications.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor kind: ServiceMonitor
@ -48,3 +49,4 @@ spec:
matchLabels: matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.notifications.name "name" "metrics") | nindent 6 }} {{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.notifications.name "name" "metrics") | nindent 6 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- $config := .Values.repoServer.clusterAdminAccess | default dict -}} {{- $config := .Values.repoServer.clusterAdminAccess | default dict -}}
{{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }} {{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -22,3 +23,4 @@ rules:
- '*' - '*'
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- $config := .Values.repoServer.clusterAdminAccess | default dict -}} {{- $config := .Values.repoServer.clusterAdminAccess | default dict -}}
{{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }} {{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -15,3 +16,4 @@ subjects:
name: {{ include "argo-cd.repoServerServiceAccountName" . }} name: {{ include "argo-cd.repoServerServiceAccountName" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@ -396,3 +397,4 @@ spec:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
dnsPolicy: {{ .Values.repoServer.dnsPolicy }} dnsPolicy: {{ .Values.repoServer.dnsPolicy }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.repoServer.autoscaling.enabled }} {{- if .Values.repoServer.autoscaling.enabled }}
apiVersion: autoscaling/v2 apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
@ -39,3 +40,4 @@ spec:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.repoServer.metrics.enabled }} {{- if .Values.repoServer.metrics.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -32,3 +33,4 @@ spec:
selector: selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.repoServer.name) | nindent 4 }} {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.repoServer.name) | nindent 4 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.global.networkPolicy.create }} {{- if .Values.global.networkPolicy.create }}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: NetworkPolicy kind: NetworkPolicy
@ -40,3 +41,4 @@ spec:
policyTypes: policyTypes:
- Ingress - Ingress
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.repoServer.pdb.enabled }} {{- if .Values.repoServer.pdb.enabled }}
apiVersion: policy/v1 apiVersion: policy/v1
kind: PodDisruptionBudget kind: PodDisruptionBudget
@ -25,3 +26,4 @@ spec:
matchLabels: matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.repoServer.name) | nindent 6 }} {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.repoServer.name) | nindent 6 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.repoServer.serviceAccount.create }} {{- if .Values.repoServer.serviceAccount.create }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
@ -11,3 +12,4 @@ rules:
{{toYaml .Values.repoServer.rbac }} {{toYaml .Values.repoServer.rbac }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.repoServer.serviceAccount.create }} {{- if .Values.repoServer.serviceAccount.create }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
@ -14,4 +15,5 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: {{ template "argo-cd.repoServerServiceAccountName" . }} name: {{ template "argo-cd.repoServerServiceAccountName" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -21,4 +22,5 @@ spec:
port: {{ .Values.repoServer.service.port }} port: {{ .Values.repoServer.service.port }}
targetPort: repo-server targetPort: repo-server
selector: selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.repoServer.name) | nindent 4 }} {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.repoServer.name) | nindent 4 }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.repoServer.serviceAccount.create }} {{- if .Values.repoServer.serviceAccount.create }}
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@ -17,3 +18,4 @@ metadata:
{{ $key }}: {{ $value | quote }} {{ $key }}: {{ $value | quote }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.repoServer.metrics.enabled .Values.repoServer.metrics.serviceMonitor.enabled }} {{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.repoServer.metrics.enabled .Values.repoServer.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor kind: ServiceMonitor
@ -45,3 +46,4 @@ spec:
matchLabels: matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.repoServer.name "name" (printf "%s-metrics" .Values.repoServer.name)) | nindent 6 }} {{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.repoServer.name "name" (printf "%s-metrics" .Values.repoServer.name)) | nindent 6 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.server.ingressGrpc.enabled .Values.server.ingressGrpc.isAWSALB -}} {{- if and .Values.server.ingressGrpc.enabled .Values.server.ingressGrpc.isAWSALB -}}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -23,3 +24,4 @@ spec:
sessionAffinity: None sessionAffinity: None
type: {{ .Values.server.ingressGrpc.awsALB.serviceType }} type: {{ .Values.server.ingressGrpc.awsALB.serviceType }}
{{- end -}} {{- end -}}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.server.certificate.enabled -}} {{- if .Values.server.certificate.enabled -}}
apiVersion: cert-manager.io/v1 apiVersion: cert-manager.io/v1
kind: Certificate kind: Certificate
@ -41,3 +42,4 @@ spec:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- $config := .Values.server.clusterAdminAccess | default dict -}} {{- $config := .Values.server.clusterAdminAccess | default dict -}}
{{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }} {{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -60,3 +61,4 @@ rules:
{{/* supports triggering workflows from UI */}} {{/* supports triggering workflows from UI */}}
- create - create
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- $config := .Values.server.clusterAdminAccess | default dict -}} {{- $config := .Values.server.clusterAdminAccess | default dict -}}
{{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }} {{- if hasKey $config "enabled" | ternary $config.enabled .Values.createClusterRoles }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -15,3 +16,4 @@ subjects:
name: {{ include "argo-cd.serverServiceAccountName" . }} name: {{ include "argo-cd.serverServiceAccountName" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end }} {{- end }}
{{- end -}}

2
charts/argo-cd/templates/argocd-server/deployment.yaml Executable file → Normal file
View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@ -450,3 +451,4 @@ spec:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
dnsPolicy: {{ .Values.server.dnsPolicy }} dnsPolicy: {{ .Values.server.dnsPolicy }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.server.GKEbackendConfig.enabled }} {{- if .Values.server.GKEbackendConfig.enabled }}
apiVersion: {{ include "argo-cd.apiVersions.cloudgoogle" . }} apiVersion: {{ include "argo-cd.apiVersions.cloudgoogle" . }}
kind: BackendConfig kind: BackendConfig
@ -9,3 +10,4 @@ metadata:
spec: spec:
{{- toYaml .Values.server.GKEbackendConfig.spec | nindent 2 }} {{- toYaml .Values.server.GKEbackendConfig.spec | nindent 2 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.server.GKEfrontendConfig.enabled }} {{- if .Values.server.GKEfrontendConfig.enabled }}
apiVersion: networking.gke.io/v1beta1 apiVersion: networking.gke.io/v1beta1
kind: FrontendConfig kind: FrontendConfig
@ -9,3 +10,4 @@ metadata:
spec: spec:
{{- toYaml .Values.server.GKEfrontendConfig.spec | nindent 2 }} {{- toYaml .Values.server.GKEfrontendConfig.spec | nindent 2 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.server.GKEmanagedCertificate.enabled }} {{- if .Values.server.GKEmanagedCertificate.enabled }}
apiVersion: networking.gke.io/v1 apiVersion: networking.gke.io/v1
kind: ManagedCertificate kind: ManagedCertificate
@ -10,3 +11,4 @@ spec:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.server.autoscaling.enabled }} {{- if .Values.server.autoscaling.enabled }}
apiVersion: autoscaling/v2 apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
@ -39,3 +40,4 @@ spec:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.server.ingressGrpc.enabled (not .Values.server.ingressGrpc.isAWSALB) -}} {{- if and .Values.server.ingressGrpc.enabled (not .Values.server.ingressGrpc.isAWSALB) -}}
{{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingressGrpc.https -}} {{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingressGrpc.https -}}
{{- $paths := .Values.server.ingressGrpc.paths -}} {{- $paths := .Values.server.ingressGrpc.paths -}}
@ -71,3 +72,4 @@ spec:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.server.ingress.enabled -}} {{- if .Values.server.ingress.enabled -}}
{{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingress.https -}} {{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingress.https -}}
{{- $paths := .Values.server.ingress.paths -}} {{- $paths := .Values.server.ingress.paths -}}
@ -88,3 +89,4 @@ spec:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.server.metrics.enabled }} {{- if .Values.server.metrics.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -32,3 +33,4 @@ spec:
selector: selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 4 }} {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 4 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.global.networkPolicy.create }} {{- if .Values.global.networkPolicy.create }}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: NetworkPolicy kind: NetworkPolicy
@ -15,3 +16,4 @@ spec:
policyTypes: policyTypes:
- Ingress - Ingress
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.server.route.enabled -}} {{- if .Values.server.route.enabled -}}
apiVersion: route.openshift.io/v1 apiVersion: route.openshift.io/v1
kind: Route kind: Route
@ -25,3 +26,4 @@ spec:
insecureEdgeTerminationPolicy: {{ .Values.server.route.termination_policy | quote }} insecureEdgeTerminationPolicy: {{ .Values.server.route.termination_policy | quote }}
wildcardPolicy: None wildcardPolicy: None
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.server.pdb.enabled }} {{- if .Values.server.pdb.enabled }}
apiVersion: policy/v1 apiVersion: policy/v1
kind: PodDisruptionBudget kind: PodDisruptionBudget
@ -25,3 +26,4 @@ spec:
matchLabels: matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 6 }} {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 6 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
@ -53,3 +54,4 @@ rules:
verbs: verbs:
- create - create
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
metadata: metadata:
@ -12,4 +13,5 @@ roleRef:
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: {{ template "argo-cd.serverServiceAccountName" . }} name: {{ template "argo-cd.serverServiceAccountName" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -54,3 +55,4 @@ spec:
{{- with .Values.server.service.sessionAffinity }} {{- with .Values.server.service.sessionAffinity }}
sessionAffinity: {{ . }} sessionAffinity: {{ . }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.server.serviceAccount.create }} {{- if .Values.server.serviceAccount.create }}
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@ -17,3 +18,4 @@ metadata:
{{ $key }}: {{ $value | quote }} {{ $key }}: {{ $value | quote }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.server.metrics.enabled .Values.server.metrics.serviceMonitor.enabled }} {{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.server.metrics.enabled .Values.server.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor kind: ServiceMonitor
@ -45,3 +46,4 @@ spec:
matchLabels: matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.server.name "name" (printf "%s-metrics" .Values.server.name)) | nindent 6 }} {{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.server.name "name" (printf "%s-metrics" .Values.server.name)) | nindent 6 }}
{{- end }} {{- end }}
{{- end -}}

2
charts/argo-cd/templates/dex/deployment.yaml Executable file → Normal file
View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.dex.enabled }} {{- if .Values.dex.enabled }}
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@ -205,3 +206,4 @@ spec:
{{- end }} {{- end }}
dnsPolicy: {{ .Values.dex.dnsPolicy }} dnsPolicy: {{ .Values.dex.dnsPolicy }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.global.networkPolicy.create .Values.dex.enabled }} {{- if and .Values.global.networkPolicy.create .Values.dex.enabled }}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: NetworkPolicy kind: NetworkPolicy
@ -30,3 +31,4 @@ spec:
policyTypes: policyTypes:
- Ingress - Ingress
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.dex.enabled .Values.dex.pdb.enabled }} {{- if and .Values.dex.enabled .Values.dex.pdb.enabled }}
apiVersion: policy/v1 apiVersion: policy/v1
kind: PodDisruptionBudget kind: PodDisruptionBudget
@ -25,3 +26,4 @@ spec:
matchLabels: matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.dex.name) | nindent 6 }} {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.dex.name) | nindent 6 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.dex.enabled }} {{- if .Values.dex.enabled }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
@ -16,4 +17,5 @@ rules:
- get - get
- list - list
- watch - watch
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.dex.enabled }} {{- if .Values.dex.enabled }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
@ -14,4 +15,5 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: {{ template "argo-cd.dexServiceAccountName" . }} name: {{ template "argo-cd.dexServiceAccountName" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if .Values.dex.enabled }} {{- if .Values.dex.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -34,3 +35,4 @@ spec:
selector: selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.dex.name) | nindent 4 }} {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.dex.name) | nindent 4 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.dex.enabled .Values.dex.serviceAccount.create }} {{- if and .Values.dex.enabled .Values.dex.serviceAccount.create }}
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@ -14,3 +15,4 @@ metadata:
labels: labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 4 }} {{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 4 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.dex.metrics.enabled .Values.dex.metrics.serviceMonitor.enabled }} {{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.dex.metrics.enabled .Values.dex.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor kind: ServiceMonitor
@ -45,3 +46,4 @@ spec:
matchLabels: matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 6 }} {{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 6 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{ range .Values.extraObjects }} {{ range .Values.extraObjects }}
--- ---
{{ if typeIs "string" . }} {{ if typeIs "string" . }}
@ -6,3 +7,4 @@
{{- tpl (toYaml .) $ }} {{- tpl (toYaml .) $ }}
{{- end }} {{- end }}
{{ end }} {{ end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.global.networkPolicy.create .Values.global.networkPolicy.defaultDenyIngress }} {{- if and .Values.global.networkPolicy.create .Values.global.networkPolicy.defaultDenyIngress }}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: NetworkPolicy kind: NetworkPolicy
@ -11,3 +12,4 @@ spec:
policyTypes: policyTypes:
- Ingress - Ingress
{{- end }} {{- end }}
{{- end -}}

2
charts/argo-cd/templates/redis/deployment.yaml Executable file → Normal file
View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- $redisHa := index .Values "redis-ha" -}} {{- $redisHa := index .Values "redis-ha" -}}
{{- if and .Values.redis.enabled (not $redisHa.enabled) -}} {{- if and .Values.redis.enabled (not $redisHa.enabled) -}}
apiVersion: apps/v1 apiVersion: apps/v1
@ -146,3 +147,4 @@ spec:
{{- end }} {{- end }}
dnsPolicy: {{ .Values.redis.dnsPolicy }} dnsPolicy: {{ .Values.redis.dnsPolicy }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- $redisHa := (index .Values "redis-ha") -}} {{- $redisHa := (index .Values "redis-ha") -}}
{{- if and .Values.redis.enabled (not $redisHa.enabled) .Values.redis.metrics.enabled -}} {{- if and .Values.redis.enabled (not $redisHa.enabled) .Values.redis.metrics.enabled -}}
apiVersion: v1 apiVersion: v1
@ -33,3 +34,4 @@ spec:
selector: selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }} {{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- $redisHa := (index .Values "redis-ha") -}} {{- $redisHa := (index .Values "redis-ha") -}}
{{- if and .Values.global.networkPolicy.create .Values.redis.enabled (not $redisHa.enabled) }} {{- if and .Values.global.networkPolicy.create .Values.redis.enabled (not $redisHa.enabled) }}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
@ -35,3 +36,4 @@ spec:
policyTypes: policyTypes:
- Ingress - Ingress
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- $redisHa := index .Values "redis-ha" -}} {{- $redisHa := index .Values "redis-ha" -}}
{{- if and .Values.redis.enabled (not $redisHa.enabled) .Values.redis.pdb.enabled }} {{- if and .Values.redis.enabled (not $redisHa.enabled) .Values.redis.pdb.enabled }}
apiVersion: policy/v1 apiVersion: policy/v1
@ -26,3 +27,4 @@ spec:
matchLabels: matchLabels:
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.redis.name }} app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.redis.name }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- $redisHa := (index .Values "redis-ha") -}} {{- $redisHa := (index .Values "redis-ha") -}}
{{- if and .Values.redis.enabled (not $redisHa.enabled) -}} {{- if and .Values.redis.enabled (not $redisHa.enabled) -}}
apiVersion: v1 apiVersion: v1
@ -24,3 +25,4 @@ spec:
selector: selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.redis.name) | nindent 4 }} {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.redis.name) | nindent 4 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- if and .Values.redis.enabled .Values.redis.serviceAccount.create }} {{- if and .Values.redis.enabled .Values.redis.serviceAccount.create }}
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@ -14,3 +15,4 @@ metadata:
labels: labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }} {{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -1,3 +1,4 @@
{{- if not .Values.crds.only -}}
{{- $redisHa := (index .Values "redis-ha") -}} {{- $redisHa := (index .Values "redis-ha") -}}
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.redis.enabled (not $redisHa.enabled) .Values.redis.metrics.enabled .Values.redis.metrics.serviceMonitor.enabled -}} {{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.redis.enabled (not $redisHa.enabled) .Values.redis.metrics.enabled .Values.redis.metrics.serviceMonitor.enabled -}}
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
@ -46,3 +47,4 @@ spec:
matchLabels: matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 6 }} {{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 6 }}
{{- end }} {{- end }}
{{- end -}}

View file

@ -28,6 +28,8 @@ openshift:
## Custom resource configuration ## Custom resource configuration
crds: crds:
# -- Only install CRDs
only: false
# -- Install and upgrade CRDs # -- Install and upgrade CRDs
install: true install: true
# -- Keep CRDs on chart uninstall # -- Keep CRDs on chart uninstall