diff --git a/deploy/helm/templates/app-control.yaml b/deploy/helm/templates/app-control.yaml index a7b49db..34e8618 100644 --- a/deploy/helm/templates/app-control.yaml +++ b/deploy/helm/templates/app-control.yaml @@ -6,7 +6,7 @@ metadata: labels: app: app-control spec: - replicas: {{ .Values.application.replicas.control }} + replicas: {{ .Values.application.control.replicas }} selector: matchLabels: app: app-control @@ -17,7 +17,11 @@ spec: spec: containers: - name: app-control - image: {{ print "ghcr.io/datalens-tech/datalens-control-api:" .Values.application.versions.control }} + {{- if .Values.application.control.image }} + image: {{ .Values.application.control.image }} + {{- else }} + image: {{ print .Values.registry "/" "datalens-control-api:" .Values.versions.control }} + {{- end }} ports: - containerPort: 8080 env: @@ -47,8 +51,8 @@ spec: key: US_MASTER_TOKEN resources: requests: - cpu: {{ .Values.application.resources.control.requests.cpu }} - memory: {{ .Values.application.resources.control.requests.memory }} + cpu: {{ .Values.application.control.resources.requests.cpu }} + memory: {{ .Values.application.control.resources.requests.memory }} limits: - cpu: {{ .Values.application.resources.control.limits.cpu }} - memory: {{ .Values.application.resources.control.limits.memory }} + cpu: {{ .Values.application.control.resources.limits.cpu }} + memory: {{ .Values.application.control.resources.limits.memory }} diff --git a/deploy/helm/templates/app-data.yaml b/deploy/helm/templates/app-data.yaml index e397d4d..2eea73b 100644 --- a/deploy/helm/templates/app-data.yaml +++ b/deploy/helm/templates/app-data.yaml @@ -6,7 +6,7 @@ metadata: labels: app: app-data spec: - replicas: {{ .Values.application.replicas.data }} + replicas: {{ .Values.application.data.replicas }} selector: matchLabels: app: app-data @@ -17,7 +17,11 @@ spec: spec: containers: - name: app-data - image: {{ print "ghcr.io/datalens-tech/datalens-data-api:" .Values.application.versions.data }} + {{- if .Values.application.data.image }} + image: {{ .Values.application.data.image }} + {{- else }} + image: {{ print .Values.registry "/" "datalens-data-api:" .Values.versions.data }} + {{- end }} ports: - containerPort: 8080 env: @@ -56,8 +60,8 @@ spec: key: US_MASTER_TOKEN resources: requests: - cpu: {{ .Values.application.resources.data.requests.cpu }} - memory: {{ .Values.application.resources.data.requests.memory }} + cpu: {{ .Values.application.data.resources.requests.cpu }} + memory: {{ .Values.application.data.resources.requests.memory }} limits: - cpu: {{ .Values.application.resources.data.limits.cpu }} - memory: {{ .Values.application.resources.data.limits.memory }} + cpu: {{ .Values.application.data.resources.limits.cpu }} + memory: {{ .Values.application.data.resources.limits.memory }} diff --git a/deploy/helm/templates/app-ui.yaml b/deploy/helm/templates/app-ui.yaml index 274daf8..caf47eb 100644 --- a/deploy/helm/templates/app-ui.yaml +++ b/deploy/helm/templates/app-ui.yaml @@ -6,7 +6,7 @@ metadata: labels: app: app-ui spec: - replicas: {{ .Values.application.replicas.ui }} + replicas: {{ .Values.application.ui.replicas }} selector: matchLabels: app: app-ui @@ -17,7 +17,11 @@ spec: spec: containers: - name: app-ui - image: {{ print "ghcr.io/datalens-tech/datalens-ui:" .Values.application.versions.ui }} + {{- if .Values.application.ui.image }} + image: {{ .Values.application.ui.image }} + {{- else }} + image: {{ print .Values.registry "/" "datalens-ui:" .Values.versions.ui }} + {{- end }} ports: - containerPort: 8080 env: @@ -42,8 +46,8 @@ spec: key: US_MASTER_TOKEN resources: requests: - cpu: {{ .Values.application.resources.ui.requests.cpu }} - memory: {{ .Values.application.resources.ui.requests.memory }} + cpu: {{ .Values.application.ui.resources.requests.cpu }} + memory: {{ .Values.application.ui.resources.requests.memory }} limits: - cpu: {{ .Values.application.resources.ui.limits.cpu }} - memory: {{ .Values.application.resources.ui.limits.memory }} + cpu: {{ .Values.application.ui.resources.limits.cpu }} + memory: {{ .Values.application.ui.resources.limits.memory }} diff --git a/deploy/helm/templates/app-us.yaml b/deploy/helm/templates/app-us.yaml index 97dd93c..0690393 100644 --- a/deploy/helm/templates/app-us.yaml +++ b/deploy/helm/templates/app-us.yaml @@ -6,7 +6,7 @@ metadata: labels: app: app-us spec: - replicas: {{ .Values.application.replicas.us }} + replicas: {{ .Values.application.us.replicas }} selector: matchLabels: app: app-us @@ -17,7 +17,11 @@ spec: spec: containers: - name: app-us - image: {{ print "ghcr.io/datalens-tech/datalens-us:" .Values.application.versions.us }} + {{- if .Values.application.us.image }} + image: {{ .Values.application.us.image }} + {{- else }} + image: {{ print .Values.registry "/" "datalens-us:" .Values.versions.us }} + {{- end }} ports: - containerPort: 8083 env: @@ -41,8 +45,8 @@ spec: key: POSTGRES_DSN_LIST_US resources: requests: - cpu: {{ .Values.application.resources.us.requests.cpu }} - memory: {{ .Values.application.resources.us.requests.memory }} + cpu: {{ .Values.application.us.resources.requests.cpu }} + memory: {{ .Values.application.us.resources.requests.memory }} limits: - cpu: {{ .Values.application.resources.us.limits.cpu }} - memory: {{ .Values.application.resources.us.limits.memory }} + cpu: {{ .Values.application.us.resources.limits.cpu }} + memory: {{ .Values.application.us.resources.limits.memory }} diff --git a/deploy/helm/templates/postgresql.yaml b/deploy/helm/templates/postgresql.yaml index a49fc19..2e8886c 100644 --- a/deploy/helm/templates/postgresql.yaml +++ b/deploy/helm/templates/postgresql.yaml @@ -18,7 +18,13 @@ spec: spec: containers: - name: app-pg - image: postgres:16 + {{- if .Values.database.image }} + image: {{ .Values.database.image }} + {{- else if not (eq .Values.registry "ghcr.io/datalens-tech") }} + image: {{ print .Values.registry "/" "postgres:" .Values.database.version }} + {{- else }} + image: {{ print "postgres:" .Values.database.version }} + {{- end }} ports: - containerPort: 5432 env: @@ -33,6 +39,13 @@ spec: secretKeyRef: name: datalens-secret key: POSTGRES_PASSWORD + resources: + requests: + cpu: {{ .Values.database.resources.requests.cpu }} + memory: {{ .Values.database.resources.requests.memory }} + limits: + cpu: {{ .Values.database.resources.limits.cpu }} + memory: {{ .Values.database.resources.limits.memory }} volumeMounts: - name: pg-storage mountPath: /var/lib/pgsql/data diff --git a/deploy/helm/values.yaml b/deploy/helm/values.yaml index 877b616..b217c09 100644 --- a/deploy/helm/values.yaml +++ b/deploy/helm/values.yaml @@ -1,49 +1,67 @@ +versions: + ui: 0.2312.0 + control: 0.2176.0 + data: 0.2176.0 + us: 0.260.0 + database: enabled: true demo: true + version: 16 + image: null + resources: + requests: + cpu: 250m + memory: 128Mi + limits: + cpu: 1000m + memory: 512Mi ingress: enabled: true domain: datalens.local yc: false +registry: ghcr.io/datalens-tech + application: - versions: - ui: 0.2312.0 - control: 0.2176.0 - data: 0.2176.0 - us: 0.260.0 - replicas: - ui: 1 - us: 1 - data: 1 - control: 1 - resources: - ui: + ui: + replicas: 1 + image: null + resources: requests: cpu: 250m memory: 256Mi limits: cpu: 1000m memory: 512Mi - control: + us: + replicas: 1 + image: null + resources: + requests: + cpu: 500m + memory: 512Mi + limits: + cpu: 1000m + memory: 1024Mi + control: + replicas: 1 + image: null + resources: requests: cpu: 500m memory: 1024Mi limits: cpu: 1000m memory: 2048Mi - data: + data: + replicas: 1 + image: null + resources: requests: cpu: 1000m memory: 1024Mi limits: cpu: 2000m memory: 2048Mi - us: - requests: - cpu: 500m - memory: 512Mi - limits: - cpu: 1000m - memory: 1024Mi diff --git a/templates/helm-values.j2 b/templates/helm-values.j2 index 5f05740..f13b19e 100644 --- a/templates/helm-values.j2 +++ b/templates/helm-values.j2 @@ -1,49 +1,67 @@ +versions: + ui: {{ uiVersion }} + control: {{ controlApiVersion }} + data: {{ dataApiVersion }} + us: {{ usVersion }} + database: enabled: true demo: true + version: 16 + image: null + resources: + requests: + cpu: 250m + memory: 128Mi + limits: + cpu: 1000m + memory: 512Mi ingress: enabled: true domain: datalens.local yc: false +registry: ghcr.io/datalens-tech + application: - versions: - ui: {{ uiVersion }} - control: {{ controlApiVersion }} - data: {{ dataApiVersion }} - us: {{ usVersion }} - replicas: - ui: 1 - us: 1 - data: 1 - control: 1 - resources: - ui: + ui: + replicas: 1 + image: null + resources: requests: cpu: 250m memory: 256Mi limits: cpu: 1000m memory: 512Mi - control: + us: + replicas: 1 + image: null + resources: + requests: + cpu: 500m + memory: 512Mi + limits: + cpu: 1000m + memory: 1024Mi + control: + replicas: 1 + image: null + resources: requests: cpu: 500m memory: 1024Mi limits: cpu: 1000m memory: 2048Mi - data: + data: + replicas: 1 + image: null + resources: requests: cpu: 1000m memory: 1024Mi limits: cpu: 2000m memory: 2048Mi - us: - requests: - cpu: 500m - memory: 512Mi - limits: - cpu: 1000m - memory: 1024Mi