From 93c5b587c250e62f948f4bfe4d7fce4a36dde7ad Mon Sep 17 00:00:00 2001 From: tshafir Date: Wed, 13 Sep 2023 16:04:19 +0300 Subject: [PATCH 1/2] [src] add support for user configured env variables for the exporter container --- charts/ocean-metric-exporter/Chart.yaml | 2 +- charts/ocean-metric-exporter/README.md | 3 ++- charts/ocean-metric-exporter/templates/deployment.yaml | 3 +++ charts/ocean-metric-exporter/values.yaml | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/ocean-metric-exporter/Chart.yaml b/charts/ocean-metric-exporter/Chart.yaml index 3b36925..e1747ea 100644 --- a/charts/ocean-metric-exporter/Chart.yaml +++ b/charts/ocean-metric-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: ocean-metric-exporter description: A Helm chart for Ocean Metric Exporter type: application -version: 1.0.4 +version: 1.0.5 appVersion: 1.0.3 home: https://github.com/spotinst/charts/tree/main/charts/ocean-metric-exporter icon: https://docs.spot.io/_media/images/spot_mark.png diff --git a/charts/ocean-metric-exporter/README.md b/charts/ocean-metric-exporter/README.md index bd49174..e4f10fc 100644 --- a/charts/ocean-metric-exporter/README.md +++ b/charts/ocean-metric-exporter/README.md @@ -1,6 +1,6 @@ # ocean-metric-exporter -![Version: 1.0.4](https://img.shields.io/badge/Version-1.0.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.3](https://img.shields.io/badge/AppVersion-1.0.3-informational?style=flat-square) +![Version: 1.0.5](https://img.shields.io/badge/Version-1.0.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.3](https://img.shields.io/badge/AppVersion-1.0.3-informational?style=flat-square) A Helm chart for Ocean Metric Exporter. @@ -47,6 +47,7 @@ helm install my-release spot/ocean-metric-exporter | oceanController.namespace | Optional | `"kube-system"` | Namespace where components should be installed. | | oceanController.secretName | Optional | `"spotinst-kubernetes-cluster-controller"` | Secret name. | | podAnnotations | Optional | `{}` | Pod annotations. Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ | +| podEnvVariables | Optional | `[]` | Additional environment variables for the exporter container. | | replicaCount | Optional | `1` | Replicas. Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#replicas | | resources | Optional | `{"limits":{"cpu":"500m","memory":"500Mi"},"requests":{"cpu":"100m","memory":"50Mi"}}` | Resource requests and limits. Ref: http://kubernetes.io/docs/user-guide/compute-resources/ | | service.create | Optional | `true` | Controls whether a service should be created. | diff --git a/charts/ocean-metric-exporter/templates/deployment.yaml b/charts/ocean-metric-exporter/templates/deployment.yaml index 3649430..b12a86a 100644 --- a/charts/ocean-metric-exporter/templates/deployment.yaml +++ b/charts/ocean-metric-exporter/templates/deployment.yaml @@ -76,6 +76,9 @@ spec: name: {{ include "ocean-metric-exporter.caBundleSecretName" . }} key: userEnvCertificates.pem optional: true + {{- with .Values.podEnvVariables }} + {{- toYaml . | nindent 8 }} + {{- end }} image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} imagePullPolicy: {{ .Values.image.pullPolicy }} command: {{ include "ocean-metric-exporter.command" . }} diff --git a/charts/ocean-metric-exporter/values.yaml b/charts/ocean-metric-exporter/values.yaml index b5f16e3..ac8cb6e 100644 --- a/charts/ocean-metric-exporter/values.yaml +++ b/charts/ocean-metric-exporter/values.yaml @@ -28,6 +28,11 @@ image: # Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ podAnnotations: {} +# -- (Optional) Additional environment variables for the exporter container. +podEnvVariables: [] +#- name: envName +# value: envValue + # -- (Optional) Resource requests and limits. # Ref: http://kubernetes.io/docs/user-guide/compute-resources/ resources: From 3439c0b746d48a581ee11df74df5d023704689b8 Mon Sep 17 00:00:00 2001 From: tshafir Date: Mon, 18 Sep 2023 12:23:49 +0300 Subject: [PATCH 2/2] [src] lint fix --- charts/ocean-metric-exporter/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/ocean-metric-exporter/values.yaml b/charts/ocean-metric-exporter/values.yaml index ac8cb6e..81a6d51 100644 --- a/charts/ocean-metric-exporter/values.yaml +++ b/charts/ocean-metric-exporter/values.yaml @@ -30,8 +30,8 @@ podAnnotations: {} # -- (Optional) Additional environment variables for the exporter container. podEnvVariables: [] -#- name: envName -# value: envValue +# - name: envName +# value: envValue # -- (Optional) Resource requests and limits. # Ref: http://kubernetes.io/docs/user-guide/compute-resources/