Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Node selector, Affinity and tolerations update #154

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/devtron/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ keywords:
- argocd
- Hyperion
engine: gotpl
version: 0.22.51
version: 0.22.52
sources:
- https://github.com/devtron-labs/charts
dependencies:
Expand Down
Binary file added charts/devtron/charts/argo-cd-5.9.1.tgz
Binary file not shown.
Binary file added charts/devtron/charts/security-0.1.4.tgz
Binary file not shown.
24 changes: 23 additions & 1 deletion charts/devtron/templates/app-sync-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,31 @@ spec:
{{- end }}
{{- end }}
restartPolicy: OnFailure
{{- if .Values.components.migrator }}
{{- if .Values.components.migrator.appSync }}
{{- if or $.Values.components.migrator.appSync.affinity (and $.Values.global $.Values.global.affinity) }}
{{- with $.Values.components.migrator.appSync.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.migrator.appSync.tolerations (and $.Values.global $.Values.global.tolerations ) }}
{{- with $.Values.components.migrator.appSync.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.migrator.appSync.nodeSelector (and $.Values.global $.Values.global.nodeSelector ) }}
{{- with $.Values.components.migrator.appSync.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
backoffLimit: 4
---
{{- end }}
{{- if .Capabilities.APIVersions.Has "batch/v1/CronJob" }}
apiVersion: batch/v1
{{- else -}}
Expand Down
18 changes: 18 additions & 0 deletions charts/devtron/templates/dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,24 @@ spec:
spec:
terminationGracePeriodSeconds: 30
restartPolicy: Always
{{- if or $.Values.components.dashboard.affinity (and $.Values.global $.Values.global.affinity) }}
{{- with $.Values.components.dashboard.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.dashboard.tolerations (and $.Values.global $.Values.global.tolerations ) }}
{{- with $.Values.components.dashboard.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.dashboard.nodeSelector (and $.Values.global $.Values.global.nodeSelector ) }}
{{- with $.Values.components.dashboard.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
containers:
- name: dashboard
image: {{ .image }}
Expand Down
18 changes: 18 additions & 0 deletions charts/devtron/templates/devtron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,24 @@ spec:
terminationGracePeriodSeconds: 30
restartPolicy: Always
serviceAccountName: devtron
{{- if or $.Values.components.devtron.affinity (and $.Values.global $.Values.global.affinity) }}
{{- with $.Values.components.devtron.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.devtron.tolerations (and $.Values.global $.Values.global.tolerations ) }}
{{- with $.Values.components.devtron.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.devtron.nodeSelector (and $.Values.global $.Values.global.nodeSelector ) }}
{{- with $.Values.components.devtron.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
containers:
- name: devtron
{{- if $.Values.installer.modules }}
Expand Down
12 changes: 12 additions & 0 deletions charts/devtron/templates/dex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ spec:
app.kubernetes.io/part-of: argocd
topologyKey: kubernetes.io/hostname
weight: 5
{{- if or $.Values.components.argocdDexServer.tolerations (and $.Values.global $.Values.global.tolerations ) }}
{{- with $.Values.components.argocdDexServer.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.argocdDexServer.nodeSelector (and $.Values.global $.Values.global.nodeSelector ) }}
{{- with $.Values.components.argocdDexServer.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
containers:
- command:
- /shared/authenticator
Expand Down
30 changes: 30 additions & 0 deletions charts/devtron/templates/grafana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ spec:
template:
spec:
serviceAccountName: devtron
{{- with $.Values.monitoring.grafana.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.monitoring.grafana.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.monitoring.grafana.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: grafana-restart
image: "quay.io/devtron/kubectl:latest"
Expand Down Expand Up @@ -660,6 +672,24 @@ metadata:
namespace: devtroncd
spec:
serviceAccountName: devtron-grafana-test
{{- if or $.Values.monitoring.grafana.affinity (and $.Values.global $.Values.global.affinity) }}
{{- with $.Values.monitoring.grafana.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- if or $.Values.monitoring.grafana.tolerations (and $.Values.global $.Values.global.tolerations ) }}
{{- with $.Values.monitoring.grafana.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- if or $.Values.monitoring.grafana.nodeSelector (and $.Values.global $.Values.global.nodeSelector ) }}
{{- with $.Values.monitoring.grafana.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
containers:
- name: devtron-test
image: "quay.io/devtron/bats:v1.4.1"
Expand Down
18 changes: 18 additions & 0 deletions charts/devtron/templates/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,24 @@ spec:
{{- end }}
restartPolicy: Always
serviceAccountName: installer
{{- if or $.Values.installer.affinity (and $.Values.global $.Values.global.affinity) }}
{{- with $.Values.installer.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.installer.tolerations (and $.Values.global $.Values.global.tolerations ) }}
{{- with $.Values.installer.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.installer.nodeSelector (and $.Values.global $.Values.global.nodeSelector ) }}
{{- with $.Values.installer.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
terminationGracePeriodSeconds: 30
{{- end }}
{{- end }}
Expand Down
18 changes: 18 additions & 0 deletions charts/devtron/templates/kubelink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,24 @@ spec:
spec:
terminationGracePeriodSeconds: 30
restartPolicy: Always
{{- if or $.Values.components.kubelink.affinity (and $.Values.global $.Values.global.affinity) }}
{{- with $.Values.components.kubelink.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.kubelink.tolerations (and $.Values.global $.Values.global.tolerations ) }}
{{- with $.Values.components.kubelink.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.kubelink.nodeSelector (and $.Values.global $.Values.global.nodeSelector ) }}
{{- with $.Values.components.kubelink.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
serviceAccount: devtron
containers:
- name: kubelink
Expand Down
36 changes: 36 additions & 0 deletions charts/devtron/templates/migrator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,24 @@ spec:
{{- end }}
{{- end }}
restartPolicy: OnFailure
{{- if or $.Values.components.migrator.affinity (and $.Values.global $.Values.global.affinity) }}
{{- with $.Values.components.migrator.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.migrator.tolerations (and $.Values.global $.Values.global.tolerations ) }}
{{- with $.Values.components.migrator.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.migrator.nodeSelector (and $.Values.global $.Values.global.nodeSelector ) }}
{{- with $.Values.components.migrator.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
backoffLimit: 20
activeDeadlineSeconds: 1500
---
Expand Down Expand Up @@ -113,6 +131,24 @@ spec:
memory: 500Mi
{{- end }}
restartPolicy: OnFailure
{{- if or $.Values.components.migrator.affinity (and $.Values.global $.Values.global.affinity) }}
{{- with $.Values.components.migrator.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.migrator.tolerations (and $.Values.global $.Values.global.tolerations ) }}
{{- with $.Values.components.migrator.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.migrator.nodeSelector (and $.Values.global $.Values.global.nodeSelector ) }}
{{- with $.Values.components.migrator.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
backoffLimit: 20
activeDeadlineSeconds: 1500
{{- end }}
42 changes: 42 additions & 0 deletions charts/devtron/templates/minio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,24 @@ spec:
release: {{ $.Release.Name }}
spec:
serviceAccountName: "devtron-minio"
{{- if or $.Values.minio.affinity (and $.Values.global $.Values.global.affinity) }}
{{- with $.Values.minio.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.minio.tolerations (and $.Values.global $.Values.global.tolerations ) }}
{{- with $.Values.minio.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.minio.nodeSelector (and $.Values.global $.Values.global.nodeSelector ) }}
{{- with $.Values.minio.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
securityContext:
runAsUser: 1000
runAsGroup: 1000
Expand Down Expand Up @@ -337,6 +355,18 @@ spec:
- secret:
name: devtron-minio
serviceAccountName: "devtron-minio"
{{- with $.Values.minio.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.minio.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.minio.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: minio-mc
image: {{ $.Values.minio.mbImage }}
Expand Down Expand Up @@ -383,6 +413,18 @@ spec:
release: devtron-minio
spec:
serviceAccountName: "devtron-minio"
{{- with $.Values.minio.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.minio.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.minio.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: minio
image: "quay.io/devtron/minio:RELEASE.2020-12-03T05-49-24Z"
Expand Down
18 changes: 18 additions & 0 deletions charts/devtron/templates/notifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@ spec:
spec:
terminationGracePeriodSeconds: 30
restartPolicy: Always
{{- if or $.Values.notifier.affinity (and $.Values.global $.Values.global.affinity) }}
{{- with $.Values.notifier.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.notifier.tolerations (and $.Values.global $.Values.global.tolerations ) }}
{{- with $.Values.notifier.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.notifier.nodeSelector (and $.Values.global $.Values.global.nodeSelector ) }}
{{- with $.Values.notifier.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
containers:
- name: notifier
image: {{ .image }}
Expand Down
36 changes: 36 additions & 0 deletions charts/devtron/templates/postgresql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,24 @@ spec:
spec:
securityContext:
fsGroup: 1001
{{- if or $.Values.components.postgres.affinity (and $.Values.global $.Values.global.affinity ) }}
{{- with $.Values.components.postgres.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.postgres.tolerations (and $.Values.global $.Values.global.tolerations ) }}
{{- with $.Values.components.postgres.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.postgres.nodeSelector (and $.Values.global $.Values.global.nodeSelector ) }}
{{- with $.Values.components.postgres.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
initContainers:
- name: init-chmod-data
image: "quay.io/devtron/minideb:latest"
Expand Down Expand Up @@ -444,6 +462,24 @@ spec:
spec:
securityContext:
fsGroup: 999
{{- if or $.Values.components.postgres.affinity (and $.Values.global $.Values.global.affinity) }}
{{- with $.Values.components.postgres.affinity | default $.Values.global.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.postgres.tolerations (and $.Values.global $.Values.global.tolerations ) }}
{{- with $.Values.components.postgres.tolerations | default $.Values.global.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or $.Values.components.postgres.nodeSelector (and $.Values.global $.Values.global.nodeSelector ) }}
{{- with $.Values.components.postgres.nodeSelector | default $.Values.global.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
initContainers:
- name: postgres-init
securityContext:
Expand Down
Loading