From bf6e130e4042e982683bd9d77b025cfac8a6fe60 Mon Sep 17 00:00:00 2001 From: xalvaine Date: Tue, 26 Nov 2024 23:20:50 +0300 Subject: [PATCH] [CITYLENS-728] Add citylens-routes-ui chart --- charts/citylens-routes-ui/.gitignore | 2 + charts/citylens-routes-ui/.helmignore | 22 +++ charts/citylens-routes-ui/Chart.yaml | 13 ++ charts/citylens-routes-ui/README.md | 114 ++++++++++++ charts/citylens-routes-ui/templates/NOTES.txt | 14 ++ .../citylens-routes-ui/templates/_helpers.tpl | 13 ++ .../templates/deployment.yaml | 89 +++++++++ charts/citylens-routes-ui/templates/hpa.yaml | 1 + .../citylens-routes-ui/templates/ingress.yaml | 45 +++++ charts/citylens-routes-ui/templates/pdb.yaml | 1 + .../citylens-routes-ui/templates/secrets.yaml | 7 + .../citylens-routes-ui/templates/service.yaml | 28 +++ charts/citylens-routes-ui/templates/vpa.yaml | 1 + charts/citylens-routes-ui/values.yaml | 172 ++++++++++++++++++ 14 files changed, 522 insertions(+) create mode 100644 charts/citylens-routes-ui/.gitignore create mode 100644 charts/citylens-routes-ui/.helmignore create mode 100644 charts/citylens-routes-ui/Chart.yaml create mode 100644 charts/citylens-routes-ui/README.md create mode 100644 charts/citylens-routes-ui/templates/NOTES.txt create mode 100644 charts/citylens-routes-ui/templates/_helpers.tpl create mode 100644 charts/citylens-routes-ui/templates/deployment.yaml create mode 100644 charts/citylens-routes-ui/templates/hpa.yaml create mode 100644 charts/citylens-routes-ui/templates/ingress.yaml create mode 100644 charts/citylens-routes-ui/templates/pdb.yaml create mode 100644 charts/citylens-routes-ui/templates/secrets.yaml create mode 100644 charts/citylens-routes-ui/templates/service.yaml create mode 100644 charts/citylens-routes-ui/templates/vpa.yaml create mode 100644 charts/citylens-routes-ui/values.yaml diff --git a/charts/citylens-routes-ui/.gitignore b/charts/citylens-routes-ui/.gitignore new file mode 100644 index 000000000..2946e34f0 --- /dev/null +++ b/charts/citylens-routes-ui/.gitignore @@ -0,0 +1,2 @@ +Chart.lock +charts/ diff --git a/charts/citylens-routes-ui/.helmignore b/charts/citylens-routes-ui/.helmignore new file mode 100644 index 000000000..50af03172 --- /dev/null +++ b/charts/citylens-routes-ui/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/citylens-routes-ui/Chart.yaml b/charts/citylens-routes-ui/Chart.yaml new file mode 100644 index 000000000..4b6e7a602 --- /dev/null +++ b/charts/citylens-routes-ui/Chart.yaml @@ -0,0 +1,13 @@ +apiVersion: v2 +name: citylens-routes-ui +description: A Helm chart for Kubernetes to deploy Citylens UI service +type: application +version: 0.0.1 +appVersion: '0.0.1' +dependencies: + - name: generic-chart + version: '*' + repository: file://../generic-chart +maintainers: + - name: 2gis + email: devops@2gis.ru diff --git a/charts/citylens-routes-ui/README.md b/charts/citylens-routes-ui/README.md new file mode 100644 index 000000000..85bd710fa --- /dev/null +++ b/charts/citylens-routes-ui/README.md @@ -0,0 +1,114 @@ +## Values + +### Docker Registry settings + +| Name | Description | Value | +| --------------------- | --------------------------------------------------------------------------------------- | -------------- | +| `dgctlDockerRegistry` | Docker Registry endpoint where On-Premise services' images reside. Format: `host:port`. | `""` | +| `imagePullPolicy` | Pull Policy | `IfNotPresent` | +| `imagePullSecrets` | Kubernetes image pull secrets. | `[]` | + +### Strategy settings + +| Name | Description | Value | +| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | +| `strategy.type` | Type of Kubernetes deployment. Can be `Recreate` or `RollingUpdate`. | `RollingUpdate` | +| `strategy.rollingUpdate.maxUnavailable` | Maximum number of pods that can be created over the desired number of pods when doing [rolling update](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment). | `0` | +| `strategy.rollingUpdate.maxSurge` | Maximum number of pods that can be unavailable during the [rolling update](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment) process. | `1` | + +### Deployment settings + +| Name | Description | Value | +| ------------------ | ----------- | ------------------------------------ | +| `image.repository` | Repository | `2gis-on-premise/citylens-routes-ui` | +| `image.tag` | Tag | `latest` | + +### Environment + +| Name | Description | Value | +| --------------------- | -------------------------------------- | ----- | +| `env.CATALOG_API_URL` | Catalog API base URL | `""` | +| `env.MAPGL_API_URL` | Map API base URL | `""` | +| `env.MAPGL_KEY` | API key for mapgl | `""` | +| `env.MAPGL_STYLE_ID` | Map style ID | `""` | +| `env.ROUTES_API_URL` | Backend (citylens-routes-api) base URL | `""` | + +### Common deployment settings + +| Name | Description | Value | +| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | +| `replicas` | A replica count for the pod. | `1` | +| `revisionHistoryLimit` | Revision history limit (used for [rolling back](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) a deployment). | `3` | +| `terminationGracePeriodSeconds` | Seconds pod needs to [terminate](https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods) gracefully | `60` | +| `nodeSelector` | Kubernetes [node selectors](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector). | `{}` | +| `affinity` | Kubernetes pod [affinity settings](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity). | `{}` | +| `tolerations` | Kubernetes [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) settings. | `[]` | +| `podAnnotations` | Kubernetes [pod annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). | `{}` | +| `podLabels` | Kubernetes [pod labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). | `{}` | +| `annotations` | Kubernetes [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). | `{}` | +| `labels` | Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). | `{}` | +| `readinessProbe.enabled` | Enable [readinessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) on PRO UI containers | `false` | +| `livenessProbe.enabled` | Enable [livenessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) on PRO UI containers | `true` | +| `livenessProbe.healthcheckPath` | Application http path for health check | `/health` | +| `containerPort` | Port on which application listen connection in container | `3000` | + +### Service settings + +| Name | Description | Value | +| --------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------- | +| `service.annotations` | Kubernetes [service annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). | `{}` | +| `service.labels` | Kubernetes [service labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). | `{}` | +| `service.type` | Kubernetes [service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types). | `ClusterIP` | +| `service.port` | Service port. | `80` | + +### Kubernetes [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) settings + +| Name | Description | Value | +| ------------------------------------ | --------------------------------------------------------------------------------------------------------- | ------------------------- | +| `ingress.enabled` | If Ingress is enabled for the service. | `false` | +| `ingress.annotations` | Kubernetes [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). | `{}` | +| `ingress.className` | Name of the Ingress controller class. | `nginx` | +| `ingress.hosts[0].host` | Hostname for the Ingress service. | `citylens-ui.example.com` | +| `ingress.hosts[0].paths[0].path` | Path of the host for the Ingress service. | `/` | +| `ingress.hosts[0].paths[0].pathType` | Type of the path for the Ingress service. | `Prefix` | +| `ingress.tls` | TLS configuration | `[]` | + +### Limits + +| Name | Description | Value | +| --------------------------- | ----------------- | ------- | +| `resources.requests.cpu` | A CPU request. | `300m` | +| `resources.requests.memory` | A memory request. | `256Mi` | +| `resources.limits.cpu` | A CPU limit. | `1` | +| `resources.limits.memory` | A memory limit. | `384Mi` | + +### Kubernetes [Pod Disruption Budget](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets) settings + +| Name | Description | Value | +| -------------------- | --------------------------------------------------- | ------- | +| `pdb.enabled` | If PDB is enabled for the service | `false` | +| `pdb.minAvailable` | How many pods must be available after the eviction | `""` | +| `pdb.maxUnavailable` | How many pods can be unavailable after the eviction | `1` | + +### Kubernetes [Horizontal Pod Autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) settings + +| Name | Description | Value | +| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| `hpa.enabled` | If HPA is enabled for the service | `false` | +| `hpa.minReplicas` | Lower limit for the number of replicas to which the autoscaler can scale down | `1` | +| `hpa.maxReplicas` | Upper limit for the number of replicas to which the autoscaler can scale up | `100` | +| `hpa.scaleDownStabilizationWindowSeconds` | Scale-down window | `""` | +| `hpa.scaleUpStabilizationWindowSeconds` | Scale-up window | `""` | +| `hpa.targetCPUUtilizationPercentage` | Target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used | `80` | +| `hpa.targetMemoryUtilizationPercentage` | Target average memory utilization (represented as a percentage of requested memory) over all the pods; if not specified the default autoscaling policy will be used | `""` | + +### Kubernetes [Vertical Pod Autoscaling](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/README.md) settings + +| Name | Description | Value | +| ----------------------- | ------------------------------------------------------------------------------------------------------------ | ------- | +| `vpa.enabled` | If VPA is enabled for the service. | `false` | +| `vpa.updateMode` | VPA [update mode](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler#quick-start). | `Auto` | +| `vpa.minAllowed.cpu` | Lower limit for the number of CPUs to which the autoscaler can scale down. | `500m` | +| `vpa.minAllowed.memory` | Lower limit for the RAM size to which the autoscaler can scale down. | `128Mi` | +| `vpa.maxAllowed.cpu` | Upper limit for the number of CPUs to which the autoscaler can scale up. | `2000` | +| `vpa.maxAllowed.memory` | Upper limit for the RAM size to which the autoscaler can scale up. | `512Mi` | diff --git a/charts/citylens-routes-ui/templates/NOTES.txt b/charts/citylens-routes-ui/templates/NOTES.txt new file mode 100644 index 000000000..f241ff2b7 --- /dev/null +++ b/charts/citylens-routes-ui/templates/NOTES.txt @@ -0,0 +1,14 @@ +{{ .Chart.Name }} is installed by release "{{ .Release.Name }}" at "{{ .Release.Namespace }}" namespace + +You can check the status of the app using command + +kubectl get pods -n {{ .Release.Namespace}} -l app.kubernetes.io/name={{ include "citylens-ui.name" . }} -l app.kubernetes.io/instance={{ .Release.Name }} + +{{- if .Values.ingress.enabled }} +You can check service using curl +{{- range .Values.ingress.hosts }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ .host }}/ +{{- end }} +{{- else }} +You should publish the service in your preferred way (ingress, balancer, etc). +{{- end }} diff --git a/charts/citylens-routes-ui/templates/_helpers.tpl b/charts/citylens-routes-ui/templates/_helpers.tpl new file mode 100644 index 000000000..911cc374f --- /dev/null +++ b/charts/citylens-routes-ui/templates/_helpers.tpl @@ -0,0 +1,13 @@ +{{- define "citylens-ui.name" -}} +{{- .Release.Name }} +{{- end }} + +{{- define "citylens-ui.selectorLabels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{- define "citylens-ui.labels" -}} +{{ include "citylens-ui.selectorLabels" . }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} diff --git a/charts/citylens-routes-ui/templates/deployment.yaml b/charts/citylens-routes-ui/templates/deployment.yaml new file mode 100644 index 000000000..8839fb446 --- /dev/null +++ b/charts/citylens-routes-ui/templates/deployment.yaml @@ -0,0 +1,89 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "citylens-ui.name" . }} + {{- with .Values.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.service.labels }} + labels: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + replicas: {{ .Values.replicas }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + {{- if .Values.strategy }} + strategy: + {{- toYaml .Values.strategy | nindent 4 }} + {{- end }} + selector: + matchLabels: + {{- include "citylens-ui.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "citylens-ui.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + enableServiceLinks: false + containers: + - name: {{ include "citylens-ui.name" . }} + image: "{{ required "A valid .Values.dgctlDockerRegistry entry required" .Values.dgctlDockerRegistry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.imagePullPolicy }} + ports: + - name: http + containerPort: {{ .Values.containerPort }} + lifecycle: + preStop: + exec: + command: [ "/bin/sh", "-c", "sleep 5" ] + {{- if .Values.resources }} + resources: {{- toYaml .Values.resources | nindent 12 }} + {{- end }} + env: + - name: CATALOG_API_URL + value: {{ required "A valid .Values.env.CATALOG_API_URL entry required" .Values.env.CATALOG_API_URL | quote }} + - name: MAPGL_API_URL + value: {{ required "A valid .Values.env.MAPGL_API_URL entry required" .Values.env.MAPGL_API_URL | quote }} + - name: MAPGL_STYLE_ID + value: {{ .Values.env.MAPGL_STYLE_ID }} + - name: ROUTES_API_URL + value: {{ required "A valid .Values.env.ROUTES_API_URL entry required" .Values.env.ROUTES_API_URL | quote }} + - name: MAPGL_KEY + valueFrom: + secretKeyRef: + key: MAPGL_KEY + name: {{ include "citylens-ui.name" . }}-secret + {{- if .Values.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: {{ .Values.livenessProbe.healthcheckPath }} + port: http + {{- end }} + + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .Values.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} + {{- end }} diff --git a/charts/citylens-routes-ui/templates/hpa.yaml b/charts/citylens-routes-ui/templates/hpa.yaml new file mode 100644 index 000000000..41e1e392d --- /dev/null +++ b/charts/citylens-routes-ui/templates/hpa.yaml @@ -0,0 +1 @@ +{{- template "generic-chart.hpa.tpl" . }} diff --git a/charts/citylens-routes-ui/templates/ingress.yaml b/charts/citylens-routes-ui/templates/ingress.yaml new file mode 100644 index 000000000..234871745 --- /dev/null +++ b/charts/citylens-routes-ui/templates/ingress.yaml @@ -0,0 +1,45 @@ +{{- with .Values.ingress }} +{{- if .enabled -}} +--- + +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "citylens-ui.name" $ }} + labels: + {{- include "citylens-ui.labels" $ | nindent 4 }} + {{- with .annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + +spec: + ingressClassName: {{ .className }} + {{- if .tls }} + tls: + {{- range .tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + pathType: Prefix + backend: + service: + name: {{ include "citylens-ui.name" $ }} + port: + number: {{ $.Values.service.port }} + {{- end }} + {{- end }} + +{{- end }} +{{- end }} diff --git a/charts/citylens-routes-ui/templates/pdb.yaml b/charts/citylens-routes-ui/templates/pdb.yaml new file mode 100644 index 000000000..824f66d70 --- /dev/null +++ b/charts/citylens-routes-ui/templates/pdb.yaml @@ -0,0 +1 @@ +{{- template "generic-chart.pdb.tpl" . }} diff --git a/charts/citylens-routes-ui/templates/secrets.yaml b/charts/citylens-routes-ui/templates/secrets.yaml new file mode 100644 index 000000000..aeb6a0b4c --- /dev/null +++ b/charts/citylens-routes-ui/templates/secrets.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "citylens-ui.name" . }}-secret +type: Opaque +data: + MAPGL_KEY: {{ required "Valid .Values.env.MAPGL_KEY required!" .Values.env.MAPGL_KEY | b64enc }} diff --git a/charts/citylens-routes-ui/templates/service.yaml b/charts/citylens-routes-ui/templates/service.yaml new file mode 100644 index 000000000..e319216bd --- /dev/null +++ b/charts/citylens-routes-ui/templates/service.yaml @@ -0,0 +1,28 @@ +apiVersion: v1 +kind: Service + +metadata: + name: {{ include "citylens-ui.name" $ }} + + annotations: + router.deis.io/domains: {{ include "citylens-ui.name" $ }} + {{- if .Values.service.annotations }} + {{- toYaml .Values.service.annotations | nindent 4 }} + {{- end }} + + labels: + {{- if .Values.service.labels }} + {{- toYaml .Values.service.labels | nindent 4 }} + {{- end }} + +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + appProtocol: http + + selector: + {{- include "citylens-ui.selectorLabels" $ | nindent 4 }} diff --git a/charts/citylens-routes-ui/templates/vpa.yaml b/charts/citylens-routes-ui/templates/vpa.yaml new file mode 100644 index 000000000..5de5ca28e --- /dev/null +++ b/charts/citylens-routes-ui/templates/vpa.yaml @@ -0,0 +1 @@ +{{- template "generic-chart.vpa.tpl" . }} diff --git a/charts/citylens-routes-ui/values.yaml b/charts/citylens-routes-ui/values.yaml new file mode 100644 index 000000000..1cc412e58 --- /dev/null +++ b/charts/citylens-routes-ui/values.yaml @@ -0,0 +1,172 @@ +# @section Docker Registry settings + +# @param dgctlDockerRegistry Docker Registry endpoint where On-Premise services' images reside. Format: `host:port`. +dgctlDockerRegistry: '' + +# @param imagePullPolicy Pull Policy +# @param imagePullSecrets Kubernetes image pull secrets. +imagePullPolicy: IfNotPresent +imagePullSecrets: [] + +# @section Strategy settings + +# @param strategy.type Type of Kubernetes deployment. Can be `Recreate` or `RollingUpdate`. +# @param strategy.rollingUpdate.maxUnavailable Maximum number of pods that can be created over the desired number of pods when doing [rolling update](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment). +# @param strategy.rollingUpdate.maxSurge Maximum number of pods that can be unavailable during the [rolling update](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment) process. +strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 0 + maxSurge: 1 + +# @section Deployment settings + +# @param image.repository Repository +# @param image.tag Tag +image: + repository: 2gis-on-premise/citylens-routes-ui + tag: latest + +# @section Environment + +# @param env.CATALOG_API_URL Catalog API base URL +# @param env.MAPGL_API_URL Map API base URL +# @param env.MAPGL_KEY API key for mapgl +# @param env.MAPGL_STYLE_ID Map style ID +# @param env.ROUTES_API_URL Backend (citylens-routes-api) base URL +env: + CATALOG_API_URL: '' + MAPGL_API_URL: '' + MAPGL_KEY: '' + MAPGL_STYLE_ID: '' + ROUTES_API_URL: '' + +# @section Common deployment settings + +# @param replicas A replica count for the pod. +# @param revisionHistoryLimit Revision history limit (used for [rolling back](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) a deployment). +# @param terminationGracePeriodSeconds Seconds pod needs to [terminate](https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods) gracefully +# @param nodeSelector Kubernetes [node selectors](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector). +# @param affinity Kubernetes pod [affinity settings](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity). +# @param tolerations Kubernetes [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) settings. +# @param podAnnotations Kubernetes [pod annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). +# @param podLabels Kubernetes [pod labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). +# @param annotations Kubernetes [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). +# @param labels Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). +# @param readinessProbe.enabled Enable [readinessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) on PRO UI containers +# @param livenessProbe.enabled Enable [livenessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) on PRO UI containers +# @param livenessProbe.healthcheckPath Application http path for health check +# @param containerPort Port on which application listen connection in container +replicas: 1 +revisionHistoryLimit: 3 +terminationGracePeriodSeconds: 60 +nodeSelector: {} +affinity: {} +tolerations: [] +podAnnotations: {} +podLabels: {} +annotations: {} +labels: {} +readinessProbe: + enabled: false +livenessProbe: + enabled: true + healthcheckPath: /health +containerPort: 3000 + +# @section Service settings + +# @param service.annotations Kubernetes [service annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). +# @param service.labels Kubernetes [service labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). +# @param service.type Kubernetes [service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types). +# @param service.port Service port. +service: + annotations: {} + labels: {} + type: ClusterIP + port: 80 + +# @section Kubernetes [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) settings + +# @param ingress.enabled If Ingress is enabled for the service. +# @param ingress.annotations Kubernetes [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). +# @param ingress.className Name of the Ingress controller class. +# @param ingress.hosts[0].host Hostname for the Ingress service. +# @param ingress.hosts[0].paths[0].path Path of the host for the Ingress service. +# @param ingress.hosts[0].paths[0].pathType Type of the path for the Ingress service. +# @param ingress.tls TLS configuration +ingress: + enabled: false + annotations: {} + className: nginx + hosts: + - host: citylens-ui.example.com + paths: + - path: / + pathType: Prefix + tls: [] + # - hosts: + # - citylens-ui.example.com + # secretName: secret.tls + +# @section Limits + +# @param resources.requests.cpu A CPU request. +# @param resources.requests.memory A memory request. +# @param resources.limits.cpu A CPU limit. +# @param resources.limits.memory A memory limit. +resources: + requests: + cpu: 300m + memory: 256Mi + limits: + cpu: 1 + memory: 384Mi + +# @section Kubernetes [Pod Disruption Budget](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets) settings + +# @param pdb.enabled If PDB is enabled for the service +# @param pdb.minAvailable How many pods must be available after the eviction +# @param pdb.maxUnavailable How many pods can be unavailable after the eviction + +pdb: + enabled: false + minAvailable: '' + maxUnavailable: 1 + +# @section Kubernetes [Horizontal Pod Autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) settings + +# @param hpa.enabled If HPA is enabled for the service +# @param hpa.minReplicas Lower limit for the number of replicas to which the autoscaler can scale down +# @param hpa.maxReplicas Upper limit for the number of replicas to which the autoscaler can scale up +# @param hpa.scaleDownStabilizationWindowSeconds Scale-down window +# @param hpa.scaleUpStabilizationWindowSeconds Scale-up window +# @param hpa.targetCPUUtilizationPercentage Target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used +# @param hpa.targetMemoryUtilizationPercentage Target average memory utilization (represented as a percentage of requested memory) over all the pods; if not specified the default autoscaling policy will be used + +hpa: + enabled: false + minReplicas: 1 + maxReplicas: 100 + scaleDownStabilizationWindowSeconds: '' + scaleUpStabilizationWindowSeconds: '' + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: '' + +# @section Kubernetes [Vertical Pod Autoscaling](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/README.md) settings + +# @param vpa.enabled If VPA is enabled for the service. +# @param vpa.updateMode VPA [update mode](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler#quick-start). +# @param vpa.minAllowed.cpu Lower limit for the number of CPUs to which the autoscaler can scale down. +# @param vpa.minAllowed.memory Lower limit for the RAM size to which the autoscaler can scale down. +# @param vpa.maxAllowed.cpu Upper limit for the number of CPUs to which the autoscaler can scale up. +# @param vpa.maxAllowed.memory Upper limit for the RAM size to which the autoscaler can scale up. +vpa: + enabled: false + updateMode: Auto + minAllowed: + cpu: 500m + memory: 128Mi + maxAllowed: + cpu: 2000 + memory: 512Mi