Skip to content
Merged
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 chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
40 changes: 27 additions & 13 deletions chart/templates/deployment/_icc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" $) }}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -247,6 +253,10 @@ spec:
value: {{ .cluster_name }}
{{- end}}

{{- with .env }}
{{- toYaml . | nindent 12 }}
{{- end }}

{{- if .command }}
command:
{{- toYaml .command | nindent 12 }}
Expand All @@ -256,6 +266,10 @@ spec:
workingDir: {{ .workingDir }}
{{- end }}

{{- with .volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
protocol: TCP
Expand Down
33 changes: 26 additions & 7 deletions chart/templates/deployment/_machinist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand All @@ -76,6 +91,10 @@ spec:
workingDir: {{ .workingDir }}
{{- end }}

{{- with .volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
protocol: TCP
Expand Down