diff --git a/helm-chart/templates/adapter-service.yaml b/helm-chart/templates/adapter-service.yaml index af306103..4df2d31d 100644 --- a/helm-chart/templates/adapter-service.yaml +++ b/helm-chart/templates/adapter-service.yaml @@ -12,7 +12,7 @@ spec: protocol: TCP targetPort: 8095 {{- if eq .Values.adapter.service.type "nodePort" }} - nodePort: {{ .Values.adapter.service.nodePort }} + nodePort: {{ .Values.adapter.service.nodePort | default nil }} {{- end }} selector: app: {{ .Release.Name }}-maibot-adapter diff --git a/helm-chart/templates/adapter-statefulset.yaml b/helm-chart/templates/adapter-statefulset.yaml index 311c6d1e..998819ae 100644 --- a/helm-chart/templates/adapter-statefulset.yaml +++ b/helm-chart/templates/adapter-statefulset.yaml @@ -35,9 +35,9 @@ spec: name: config readOnly: true subPath: config.toml - imagePullSecrets: {{ .Values.adapter.image.pullSecrets }} - nodeSelector: {{ .Values.adapter.nodeSelector }} - tolerations: {{ .Values.adapter.tolerations }} + imagePullSecrets: {{ .Values.adapter.image.pullSecrets | default nil }} + nodeSelector: {{ .Values.adapter.nodeSelector | default nil }} + tolerations: {{ .Values.adapter.tolerations | default nil }} volumes: - name: data persistentVolumeClaim: diff --git a/helm-chart/templates/core-statefulset.yaml b/helm-chart/templates/core-statefulset.yaml index 7a1b55d4..56f73581 100644 --- a/helm-chart/templates/core-statefulset.yaml +++ b/helm-chart/templates/core-statefulset.yaml @@ -59,9 +59,9 @@ spec: - mountPath: /MaiMBot/statistics name: statistics {{- end }} - imagePullSecrets: {{ .Values.core.image.pullSecrets }} - nodeSelector: {{ .Values.core.nodeSelector }} - tolerations: {{ .Values.core.tolerations }} + imagePullSecrets: {{ .Values.core.image.pullSecrets | default nil }} + nodeSelector: {{ .Values.core.nodeSelector | default nil }} + tolerations: {{ .Values.core.tolerations | default nil }} volumes: - name: data persistentVolumeClaim: diff --git a/helm-chart/templates/napcat-ingress.yaml b/helm-chart/templates/napcat-ingress.yaml index 9c590895..2343ca9c 100644 --- a/helm-chart/templates/napcat-ingress.yaml +++ b/helm-chart/templates/napcat-ingress.yaml @@ -4,7 +4,7 @@ kind: Ingress metadata: name: {{ .Release.Name }}-maibot-napcat namespace: {{ .Release.Namespace }} - annotations: {{ .Values.napcat.ingress.annotations }} + annotations: {{ .Values.napcat.ingress.annotations | default nil }} labels: app: {{ .Release.Name }}-maibot-napcat spec: diff --git a/helm-chart/templates/napcat-service.yaml b/helm-chart/templates/napcat-service.yaml index a3dc0c8d..245513d6 100644 --- a/helm-chart/templates/napcat-service.yaml +++ b/helm-chart/templates/napcat-service.yaml @@ -13,7 +13,7 @@ spec: protocol: TCP targetPort: 6099 {{- if eq .Values.napcat.service.type "nodePort" }} - nodePort: {{ .Values.napcat.service.nodePort }} + nodePort: {{ .Values.napcat.service.nodePort | default nil }} {{- end }} selector: app: {{ .Release.Name }}-maibot-napcat diff --git a/helm-chart/templates/napcat-statefulset.yaml b/helm-chart/templates/napcat-statefulset.yaml index 51be029f..7969d388 100644 --- a/helm-chart/templates/napcat-statefulset.yaml +++ b/helm-chart/templates/napcat-statefulset.yaml @@ -50,9 +50,9 @@ spec: - mountPath: /app/.config/QQ name: napcat subPath: data - imagePullSecrets: {{ .Values.napcat.image.pullSecrets }} - nodeSelector: {{ .Values.napcat.nodeSelector }} - tolerations: {{ .Values.napcat.tolerations }} + imagePullSecrets: {{ .Values.napcat.image.pullSecrets | default nil }} + nodeSelector: {{ .Values.napcat.nodeSelector | default nil }} + tolerations: {{ .Values.napcat.tolerations | default nil }} volumes: - name: napcat persistentVolumeClaim: diff --git a/helm-chart/templates/sqlite-web-ingress.yaml b/helm-chart/templates/sqlite-web-ingress.yaml index 967c9999..0bd6a3c4 100644 --- a/helm-chart/templates/sqlite-web-ingress.yaml +++ b/helm-chart/templates/sqlite-web-ingress.yaml @@ -4,7 +4,7 @@ kind: Ingress metadata: name: {{ .Release.Name }}-maibot-sqlite-web namespace: {{ .Release.Namespace }} - annotations: {{ .Values.sqlite_web.ingress.annotations }} + annotations: {{ .Values.sqlite_web.ingress.annotations | default nil }} labels: app: {{ .Release.Name }}-maibot-sqlite-web spec: diff --git a/helm-chart/templates/sqlite-web-service.yaml b/helm-chart/templates/sqlite-web-service.yaml index 4212a5a8..f07c8184 100644 --- a/helm-chart/templates/sqlite-web-service.yaml +++ b/helm-chart/templates/sqlite-web-service.yaml @@ -13,7 +13,7 @@ spec: protocol: TCP targetPort: 8080 {{- if eq .Values.sqlite_web.service.type "nodePort" }} - nodePort: {{ .Values.sqlite_web.service.nodePort }} + nodePort: {{ .Values.sqlite_web.service.nodePort | default nil }} {{- end }} selector: app: {{ .Release.Name }}-maibot-sqlite-web diff --git a/helm-chart/templates/sqlite-web-statefulset.yaml b/helm-chart/templates/sqlite-web-statefulset.yaml index 121d11cf..f4bd762a 100644 --- a/helm-chart/templates/sqlite-web-statefulset.yaml +++ b/helm-chart/templates/sqlite-web-statefulset.yaml @@ -42,9 +42,9 @@ spec: volumeMounts: - mountPath: /data/MaiMBot name: data - imagePullSecrets: {{ .Values.sqlite_web.image.pullSecrets }} - nodeSelector: {{ .Values.sqlite_web.nodeSelector }} - tolerations: {{ .Values.sqlite_web.tolerations }} + imagePullSecrets: {{ .Values.sqlite_web.image.pullSecrets | default nil }} + nodeSelector: {{ .Values.sqlite_web.nodeSelector | default nil }} + tolerations: {{ .Values.sqlite_web.tolerations | default nil }} volumes: - name: data persistentVolumeClaim: diff --git a/helm-chart/templates/statistics-deployment.yaml b/helm-chart/templates/statistics-deployment.yaml index 808257b6..9fed86ab 100644 --- a/helm-chart/templates/statistics-deployment.yaml +++ b/helm-chart/templates/statistics-deployment.yaml @@ -39,9 +39,9 @@ spec: - mountPath: /usr/share/nginx/html name: statistics readOnly: true - imagePullSecrets: {{ .Values.statistics_dashboard.image.pullSecrets }} - nodeSelector: {{ .Values.statistics_dashboard.nodeSelector }} - tolerations: {{ .Values.core.tolerations }} + imagePullSecrets: {{ .Values.statistics_dashboard.image.pullSecrets | default nil }} + nodeSelector: {{ .Values.statistics_dashboard.nodeSelector | default nil }} + tolerations: {{ .Values.core.tolerations | default nil }} volumes: - name: statistics persistentVolumeClaim: diff --git a/helm-chart/templates/statistics-ingress.yaml b/helm-chart/templates/statistics-ingress.yaml index c7756647..67c8e037 100644 --- a/helm-chart/templates/statistics-ingress.yaml +++ b/helm-chart/templates/statistics-ingress.yaml @@ -4,7 +4,7 @@ kind: Ingress metadata: name: {{ .Release.Name }}-maibot-statistics-dashboard namespace: {{ .Release.Namespace }} - annotations: {{ .Values.statistics_dashboard.ingress.annotations }} + annotations: {{ .Values.statistics_dashboard.ingress.annotations | default nil }} labels: app: {{ .Release.Name }}-maibot-statistics-dashboard spec: diff --git a/helm-chart/templates/statistics-service.yaml b/helm-chart/templates/statistics-service.yaml index 86d0d628..811d3516 100644 --- a/helm-chart/templates/statistics-service.yaml +++ b/helm-chart/templates/statistics-service.yaml @@ -13,7 +13,7 @@ spec: protocol: TCP targetPort: 80 {{- if eq .Values.statistics_dashboard.service.type "nodePort" }} - nodePort: {{ .Values.statistics_dashboard.service.nodePort }} + nodePort: {{ .Values.statistics_dashboard.service.nodePort | default nil }} {{- end }} selector: app: {{ .Release.Name }}-maibot-statistics-dashboard