This is an automated email from the ASF dual-hosted git repository.
warren pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-devlake-helm-chart.git
The following commit(s) were added to refs/heads/main by this push:
new 6447f3c feat(helm): Support
resources/nodeSelector/affinity/tolerations properties for lake/ui/grafana (#52)
6447f3c is described below
commit 6447f3c8c8ecc07861a71bdbd74d2ccfdb04d790
Author: Liu Shaohui <[email protected]>
AuthorDate: Fri Nov 4 09:32:55 2022 +0800
feat(helm): Support resources/nodeSelector/affinity/tolerations properties
for lake/ui/grafana (#52)
There are resources/nodeSelector/affinity/tolerations config in values.yaml
but no used in related yamls
---
charts/devlake/templates/deployments.yaml | 32 ++++++++++++++++++++++++++++++
charts/devlake/templates/statefulsets.yaml | 20 +++++++++++++++++++
charts/devlake/values.yaml | 3 +++
3 files changed, 55 insertions(+)
diff --git a/charts/devlake/templates/deployments.yaml
b/charts/devlake/templates/deployments.yaml
index 2de8b2f..da036a9 100644
--- a/charts/devlake/templates/deployments.yaml
+++ b/charts/devlake/templates/deployments.yaml
@@ -67,6 +67,22 @@ spec:
value: {{ include "mysql.server" . }}:{{ include "mysql.port" .
}}
- name: POSTGRES_URL
value: {{ include "pgsql.server" . }}:{{ include "pgsql.port" .
}}
+ {{- with .Values.grafana.resources }}
+ resources:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+ {{- with .Values.grafana.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.grafana.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.grafana.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
volumes:
{{- if ne .Values.option.localtime "" }}
- name: {{ include "devlake.fullname" . }}-grafana-localtime
@@ -118,6 +134,22 @@ spec:
mountPath: /etc/localtime
readOnly: true
{{- end }}
+ {{- with .Values.ui.resources }}
+ resources:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+ {{- with .Values.ui.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.ui.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.ui.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
volumes:
{{- if ne .Values.option.localtime "" }}
- name: {{ include "devlake.fullname" . }}-ui-localtime
diff --git a/charts/devlake/templates/statefulsets.yaml
b/charts/devlake/templates/statefulsets.yaml
index 2e89798..7db0958 100644
--- a/charts/devlake/templates/statefulsets.yaml
+++ b/charts/devlake/templates/statefulsets.yaml
@@ -252,6 +252,26 @@ spec:
mountPath: /etc/localtime
readOnly: true
{{- end }}
+ {{- with .Values.lake.resources }}
+ resources:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+ {{- if .Values.lake.hostNetwork }}
+ hostNetwork: true
+ dnsPolicy: ClusterFirstWithHostNet
+ {{- end }}
+ {{- with .Values.lake.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.lake.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.lake.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
volumes:
{{- if ne .Values.option.localtime "" }}
- name: {{ include "devlake.fullname" . }}-lake-localtime
diff --git a/charts/devlake/values.yaml b/charts/devlake/values.yaml
index e4906ae..e7c4963 100644
--- a/charts/devlake/values.yaml
+++ b/charts/devlake/values.yaml
@@ -136,6 +136,9 @@ lake:
class: ""
size: 100Mi
+ # If hostNetwork is true, then dnsPolicy is set to ClusterFirstWithHostNet
+ hostNetwork: false
+
resources: {}
nodeSelector: {}