diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 132924b..53a3869 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: helm -version: 4.0.1 +version: 4.0.2-alpha3 kubeVersion: ">= 1.30.0-0" description: Platformatic microservices type: application diff --git a/chart/templates/deployment/_icc.yaml b/chart/templates/deployment/_icc.yaml index ef941d6..4d5f74c 100644 --- a/chart/templates/deployment/_icc.yaml +++ b/chart/templates/deployment/_icc.yaml @@ -36,8 +36,14 @@ spec: volumes: {{- range $volume, $value := . }} - name: {{ .name }} + {{- if .hostPath }} + hostPath: + path: {{ .hostPath.path }} + type: {{ .hostPath.type | default "Directory" }} + {{- else }} persistentVolumeClaim: claimName: {{ .name }}-pvc + {{- end }} {{- end }} {{- end }} serviceAccountName: {{ .serviceAccountName | default (include "application.serviceAccountName" $) }} @@ -88,23 +94,23 @@ spec: - name: PLT_MACHINIST_URL value: http://machinist.platformatic - name: PLT_FEATURE_CACHE - value: "{{ .features.cache.enable | default false }}" + value: "{{ .features.cache.enable | default false | toString }}" - name: PLT_FEATURE_CACHE_RECOMMENDATIONS - value: "{{ .features.cache_recommendations.enable | default false }}" + value: "{{ .features.cache_recommendations.enable | default false | toString }}" - name: PLT_FEATURE_RISK_SERVICE_DUMP - value: "{{ .features.risk_service_dump.enable | default false }}" + value: "{{ .features.risk_service_dump.enable | default false | toString }}" - name: PLT_FEATURE_FFC - value: "{{ .features.ffc.enable | default false }}" + value: "{{ .features.ffc.enable | default false | toString }}" - name: PLT_FEATURE_SCALER_TRENDS_LEARNING - value: "{{ .features.scaler_trends_learning.enable | default false }}" + value: "{{ .features.scaler_trends_learning.enable | default false | toString }}" - name: DEV_K8S - value: '{{- dig "features" "dev_mode" "enable" false . }}' + value: '{{ dig "features" "dev_mode" "enable" false . | toString }}' # Main service - name: DEMO_LOGIN - value: '{{- dig "features" "dev_mode" "enable" false . }}' + value: '{{ dig "features" "dev_mode" "enable" false . | toString }}' - name: DEV - value: '{{- dig "features" "dev_mode" "enable" false . }}' + value: '{{ dig "features" "dev_mode" "enable" false . | toString }}' - name: VITE_API_BASE_URL value: "{{ .public_url }}" - name: VITE_SERVER_URL @@ -145,15 +151,15 @@ spec: - name: PLT_METRICS_TIME_RANGE value: "60" - name: PLT_METRICS_PROMETHEUS_URL - value: {{ .prometheus.url }} + value: "{{ .prometheus.url }}" - name: PLT_SCALER_POD_MIN_LABEL - value: {{ $.Values.watt.scaling.labels.minimum_pods.name }} + value: "{{ $.Values.watt.scaling.labels.minimum_pods.name }}" - name: PLT_SCALER_POD_MIN_DEFAULT_VALUE - value: {{ $.Values.watt.scaling.labels.minimum_pods.default_value }} + value: "{{ $.Values.watt.scaling.labels.minimum_pods.default_value }}" - name: PLT_SCALER_POD_MAX_LABEL - value: {{ $.Values.watt.scaling.labels.maximum_pods.name }} + value: "{{ $.Values.watt.scaling.labels.maximum_pods.name }}" - name: PLT_SCALER_POD_MAX_DEFAULT_VALUE - value: {{ $.Values.watt.scaling.labels.maximum_pods.default_value }} + value: "{{ $.Values.watt.scaling.labels.maximum_pods.default_value }}" # Compliance - name: PLT_COMPLIANCE_RULES_DIR @@ -247,6 +253,10 @@ spec: value: {{ .cluster_name }} {{- end}} + {{- with .env }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- if .command }} command: {{- toYaml .command | nindent 12 }} @@ -256,6 +266,10 @@ spec: workingDir: {{ .workingDir }} {{- end }} + {{- with .volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} ports: - name: http protocol: TCP diff --git a/chart/templates/deployment/_machinist.yaml b/chart/templates/deployment/_machinist.yaml index 2836a19..97b727a 100644 --- a/chart/templates/deployment/_machinist.yaml +++ b/chart/templates/deployment/_machinist.yaml @@ -35,6 +35,21 @@ spec: imagePullSecrets: - name: {{ $.Values.imagePullSecret.name | default "image-pull-secret" }} {{- end }} + + {{- with .volumes }} + volumes: + {{- range $volume, $value := . }} + - name: {{ .name }} + {{- if .hostPath }} + hostPath: + path: {{ .hostPath.path }} + type: {{ .hostPath.type | default "Directory" }} + {{- else }} + persistentVolumeClaim: + claimName: {{ .name }}-pvc + {{- end }} + {{- end }} + {{- end }} serviceAccountName: {{ .serviceAccountName | default (include "application.serviceAccountName" $) }} {{- with .podSecurityContext }} securityContext: @@ -53,20 +68,20 @@ spec: - name: PLT_PORT value: "{{ $target_port }}" - name: PLT_LOGGER_LEVEL - value: {{ .log_level }} + value: "{{ .log_level }}" - name: PLT_DEV_MODE - value: '{{- dig "features" "dev_mode" "enable" false . }}' + value: '{{ dig "features" "dev_mode" "enable" false . | toString }}' - name: PLT_K8S_PROVIDER value: "k8s" - name: PLT_DISABLE_EVENT_EXPORT - {{- if .features.event_export.enable }} - value: "false" - {{- else }} - value: "true" - {{- end}} + value: "{{ if .features.event_export.enable }}false{{ else }}true{{ end }}" - name: PLT_K8S_INSTALLED_NAMESPACE value: {{ include "install.namespace" $ }} + {{- with .env }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- if .command }} command: {{- toYaml .command | nindent 12 }} @@ -76,6 +91,10 @@ spec: workingDir: {{ .workingDir }} {{- end }} + {{- with .volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} ports: - name: http protocol: TCP