From cc1bac9a28f1a7edf419580c686255c062d40aa3 Mon Sep 17 00:00:00 2001 From: "Federico M. Facca" Date: Thu, 29 Sep 2022 21:10:01 +0200 Subject: [PATCH 1/2] 0.1.21 - checksum for deployment - tolerations - additionalLabels for deployment --- charts/quantumleap/Chart.yaml | 2 +- charts/quantumleap/README.MD | 7 +++++++ charts/quantumleap/templates/autoscaler.yaml | 2 +- charts/quantumleap/templates/deployment.yaml | 14 ++++++++++++++ charts/quantumleap/values.yaml | 8 ++++++++ 5 files changed, 31 insertions(+), 2 deletions(-) diff --git a/charts/quantumleap/Chart.yaml b/charts/quantumleap/Chart.yaml index 9358cd8..818caf1 100644 --- a/charts/quantumleap/Chart.yaml +++ b/charts/quantumleap/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: A Helm chart for QuantumLeap name: quantumleap -version: 0.1.20 +version: 0.1.21 sources: - https://github.com/orchestracities/ngsi-timeseries-api maintainers: diff --git a/charts/quantumleap/README.MD b/charts/quantumleap/README.MD index d6c653b..0bf6a4f 100644 --- a/charts/quantumleap/README.MD +++ b/charts/quantumleap/README.MD @@ -141,6 +141,7 @@ The following table lists the configurable parameters of the Quantum Leap chart | `ingress.tls` | | `{}` | | `resources` | Any resources you wish to assign to the pod | `{}` | | `init` | Init section enable init image to configure | `password: password` | +| | the secret used to store db password | ` passwordSecret: secret` | | | TimescaleDB (option not required using only | `image:` | | | CrateDB) | ` repository: orchestracities/quantumleap-pg-init` | | | | ` tag: latest` | @@ -157,6 +158,7 @@ The following table lists the configurable parameters of the Quantum Leap chart | | | ` name: quantumleap` | | | | ` user: quantumleap` | | | | ` password: quantumleap` | +| | the secret used to store db password | ` passwordSecret: secret` | | | | ` ssl: true` | | `config` | Section to configure db support per tenant | `{}` | | `runtime` | Section to configure Quantum Leap's runtime | `runtime:` | @@ -184,6 +186,11 @@ The following table lists the configurable parameters of the Quantum Leap chart | | | ` successTtl: 86400` | | | | ` workers: 0` | | `resources` | | `{}` | +| `additionalLabels` | If specified, defines labels to be attached to pods | `fiware/platform: fiware` | +| | | `fiware/component: core` | +| | | `fiware/subcomponent: historical` | +| | | `fiware/product: quantumleap` | +| `additionalAnnotations` | Additional annotations for the deployment, if required | `{}` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. diff --git a/charts/quantumleap/templates/autoscaler.yaml b/charts/quantumleap/templates/autoscaler.yaml index c0b4a29..a04f9a3 100644 --- a/charts/quantumleap/templates/autoscaler.yaml +++ b/charts/quantumleap/templates/autoscaler.yaml @@ -10,7 +10,7 @@ metadata: name: {{ template "quantumleap.fullname" . }} spec: scaleTargetRef: - apiVersion: apps/v1beta1 + apiVersion: apps/v1 kind: Deployment name: {{ template "quantumleap.fullname" . }} minReplicas: {{ .Values.autoscaling.minReplicas }} diff --git a/charts/quantumleap/templates/deployment.yaml b/charts/quantumleap/templates/deployment.yaml index 6570fef..1a43e74 100644 --- a/charts/quantumleap/templates/deployment.yaml +++ b/charts/quantumleap/templates/deployment.yaml @@ -14,15 +14,25 @@ spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} strategy: {{ toYaml .Values.updateStrategy | indent 4 }} template: metadata: annotations: chaos.alpha.kubernetes.io/enabled: "{{ .Values.chaos.enabled }}" + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- if .Values.additionalAnnotations }} + {{- with .Values.additionalAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} labels: app: {{ template "quantumleap.name" . }} release: {{ .Release.Name }} + {{- with .Values.additionalLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} @@ -190,6 +200,10 @@ spec: nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} volumes: {{- if .Values.config }} - name: config diff --git a/charts/quantumleap/values.yaml b/charts/quantumleap/values.yaml index 3d7cf74..d4e471c 100644 --- a/charts/quantumleap/values.yaml +++ b/charts/quantumleap/values.yaml @@ -1,6 +1,14 @@ # Default values for quantumleap. # This is a YAML-formatted file. # Declare variables to be passed into your templates. +additionalLabels: + fiware/platform: fiware + fiware/component: core + fiware/subcomponent: historical + fiware/product: quantumleap +# -- additional annotations for the deployment, if required +additionalAnnotations: {} + replicaCount: 2 image: repository: orchestracities/quantumleap From 18777f602546ef025005eb6345a6f7746a24cc65 Mon Sep 17 00:00:00 2001 From: "Federico M. Facca" Date: Thu, 29 Sep 2022 21:11:33 +0200 Subject: [PATCH 2/2] Update deployment.yaml --- charts/quantumleap/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/quantumleap/templates/deployment.yaml b/charts/quantumleap/templates/deployment.yaml index 1a43e74..8d1b864 100644 --- a/charts/quantumleap/templates/deployment.yaml +++ b/charts/quantumleap/templates/deployment.yaml @@ -14,7 +14,7 @@ spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} - revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit | default 3 }} strategy: {{ toYaml .Values.updateStrategy | indent 4 }} template: