Skip to content

Commit

Permalink
add new version PRO UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Aveldin1 committed Aug 22, 2024
1 parent 766a4ac commit a6767e2
Show file tree
Hide file tree
Showing 10 changed files with 162 additions and 162 deletions.
2 changes: 1 addition & 1 deletion charts/pro-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Geo API for getting geo data

type: application

version: 1.26.0
version: 1.35.0
appVersion: 1.35.0

maintainers:
Expand Down
4 changes: 2 additions & 2 deletions charts/pro-ui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: pro-ui
type: application
description: A Helm chart for Kubernetes to deploy 2GIS Pro UI service

version: 1.26.0
appVersion: 2.15.1
version: 2.0.0
appVersion: 2.27.0

maintainers:
- name: 2gis
Expand Down
6 changes: 3 additions & 3 deletions charts/pro-ui/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Pro UI service is released as "{{ .Release.Name }}" at "{{ .Release.Namespace }}" namespace.

{{- if .Values.ui.ingress.enabled }}
{{- if .Values.ingress.enabled }}
You can check service using curl
{{- range $host := .Values.ui.ingress.hosts }}
http{{ if $.Values.ui.ingress.tls }}s{{ end }}://{{ $host.host }}/
{{- range $host := .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}/
{{- end }}
{{- else }}
You should publish the service in your preferred way (ingress, balancer, etc).
Expand Down
3 changes: 1 addition & 2 deletions charts/pro-ui/templates/_env.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{{- define "pro.env.ui" -}}
- name: NETWORK_TIMEOUT
value: "{{ required "A valid .Values.ui.api.timeout" .Values.ui.api.timeout }}"
Expand Down Expand Up @@ -74,7 +73,7 @@
- name: HOME
value: "/tmp"
- name: SERVER_PORT
value: "{{ .Values.ui.containerPort }}"
value: "{{ .Values.containerPort }}"
- name: MAPBOX_STYLE_TOKEN
value: "{{ .Values.ui.mapbox.styleToken }}"
- name: FEATURE_EXTERNAL_STYLE_MANAGER_IS_ENABLED
Expand Down
4 changes: 2 additions & 2 deletions charts/pro-ui/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end -}}

{{- define "pro.ui.service.annotations" -}}
{{- if .Values.ui.service.annotations }}
{{- include "pro.ui.tplvalues.render" (dict "value" .Values.ui.service.annotations "context" . ) }}
{{- if .Values.service.annotations }}
{{- include "pro.ui.tplvalues.render" (dict "value" .Values.service.annotations "context" . ) }}
{{ end }}
{{- end -}}

Expand Down
42 changes: 21 additions & 21 deletions charts/pro-ui/templates/ui/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,60 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "pro.ui.name" . }}
{{- with .Values.ui.annotations }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "pro.ui.labels" . | nindent 4 }}
{{- with .Values.ui.labels }}
{{- with .Values.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.ui.replicas }}
revisionHistoryLimit: {{ .Values.ui.revisionHistoryLimit }}
{{- if .Values.ui.strategy }}
replicas: {{ .Values.replicas }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- if .Values.strategy }}
strategy:
{{- toYaml .Values.ui.strategy | nindent 4 }}
{{- toYaml .Values.strategy | nindent 4 }}
{{- end }}
selector:
matchLabels:
{{- include "pro.ui.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.ui.podAnnotations }}
{{- with .Values.podAnnotations }}
annotations:
{{- include "pro.ui.tplvalues.render" (dict "value" . "context" $ ) | nindent 8 }}
{{- end }}
labels:
{{- include "pro.ui.labels" . | nindent 8 }}
{{- with .Values.ui.podLabels }}
{{- with .Values.podLabels }}
{{- include "pro.ui.tplvalues.render" (dict "value" . "context" $ ) | nindent 8 }}
{{- end }}
spec:
containers:
- name: pro-ui
image: {{ required "A valid .Values.dgctlDockerRegistry entry required" .Values.dgctlDockerRegistry }}/{{ .Values.ui.image.repository }}:{{ .Values.ui.image.tag }}
image: {{ required "A valid .Values.dgctlDockerRegistry entry required" .Values.dgctlDockerRegistry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
ports:
- name: http
containerPort: {{ .Values.ui.containerPort }}
{{- if .Values.ui.readinessProbe.enabled }}
containerPort: {{ .Values.containerPort }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: {{ .Values.ui.healthcheckPath }}
port: http
{{- $otherProbeParams := (omit .Values.ui.readinessProbe "enabled") }}
{{- $otherProbeParams := (omit .Values.readinessProbe "enabled") }}
{{- with $otherProbeParams }}
{{- include "pro.ui.tplvalues.render" (dict "value" . "context" $) | nindent 12 }}
{{- end }}
{{- end }}
{{- if .Values.ui.livenessProbe.enabled }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: {{ .Values.ui.healthcheckPath }}
port: http
{{- $otherProbeParams := (omit .Values.ui.livenessProbe "enabled") }}
{{- $otherProbeParams := (omit .Values.livenessProbe "enabled") }}
{{- with $otherProbeParams }}
{{- include "pro.ui.tplvalues.render" (dict "value" . "context" $) | nindent 12 }}
{{- end }}
Expand All @@ -64,27 +64,27 @@ spec:
preStop:
exec:
command: ["/bin/sh", "-c", "sleep 5"]
{{- if .Values.ui.resources }}
resources: {{- toYaml .Values.ui.resources | nindent 12 }}
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- end }}
env:
{{- include "pro.env.ui" . | nindent 12 }}
{{- with .Values.ui.nodeSelector }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.ui.affinity }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.ui.tolerations }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.ui.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.ui.terminationGracePeriodSeconds }}
{{- if .Values.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/pro-ui/templates/ui/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- with .Values.ui.hpa -}}
{{- with .Values.hpa -}}
{{- if .enabled -}}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
Expand Down
14 changes: 7 additions & 7 deletions charts/pro-ui/templates/ui/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{{- if .Values.ui.ingress.enabled -}}
{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "pro.ui.name" . }}
labels:
{{- include "pro.ui.labels" . | nindent 4 }}
{{- with .Values.ui.ingress.annotations }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ui.ingress.className }}
{{- if .Values.ui.ingress.tls }}
ingressClassName: {{ .Values.ingress.className }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ui.ingress.tls }}
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
Expand All @@ -22,7 +22,7 @@ spec:
{{- end }}
{{- end }}
rules:
{{- range .Values.ui.ingress.hosts }}
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
Expand All @@ -33,7 +33,7 @@ spec:
service:
name: {{ include "pro.ui.name" $ }}
port:
number: {{ $.Values.ui.service.port }}
number: {{ $.Values.service.port }}
{{- end }}
{{- end }}
{{- end }}
8 changes: 4 additions & 4 deletions charts/pro-ui/templates/ui/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ metadata:
{{- include "pro.ui.service.annotations" . | nindent 4 }}
labels:
{{- include "pro.ui.labels" . | nindent 4 }}
{{- with .Values.ui.service.labels }}
{{- with .Values.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.ui.service.type }}
type: {{ .Values.service.type }}
ports:
- name: http
port: {{ .Values.ui.service.port }}
targetPort: {{ .Values.ui.service.targetPort }}
port: {{ .Values.service.port }}
targetPort: {{ .Values.service.targetPort }}
protocol: TCP
appProtocol: http
selector:
Expand Down
Loading

0 comments on commit a6767e2

Please sign in to comment.