From 22931609ae3ec3026b63020aae071c1d75061e9c Mon Sep 17 00:00:00 2001 From: Matheus Moraes Date: Tue, 21 Nov 2023 17:44:19 -0300 Subject: [PATCH] feat: add env and envFrom parameters in helm chart --- charts/zora/Chart.yaml | 4 ++-- charts/zora/README.md | 6 ++++-- charts/zora/templates/operator/deployment.yaml | 4 ++++ charts/zora/values.yaml | 9 +++++++++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/charts/zora/Chart.yaml b/charts/zora/Chart.yaml index 40b01d1c..42e4d8de 100644 --- a/charts/zora/Chart.yaml +++ b/charts/zora/Chart.yaml @@ -17,7 +17,7 @@ name: zora description: A multi-plugin solution that reports misconfigurations and vulnerabilities by scanning your cluster at scheduled times. icon: https://zora-docs.undistro.io/v0.7/assets/logo.svg type: application -version: 0.7.0 -appVersion: "v0.7.0" +version: 0.7.1 +appVersion: "v0.7.1" sources: - https://github.com/undistro/zora diff --git a/charts/zora/README.md b/charts/zora/README.md index 6ec942cd..e39c5035 100644 --- a/charts/zora/README.md +++ b/charts/zora/README.md @@ -1,6 +1,6 @@ # Zora Helm Chart -![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square&color=3CA9DD) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square&color=3CA9DD) ![AppVersion: v0.7.0](https://img.shields.io/badge/AppVersion-v0.7.0-informational?style=flat-square&color=3CA9DD) +![Version: 0.7.1](https://img.shields.io/badge/Version-0.7.1-informational?style=flat-square&color=3CA9DD) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square&color=3CA9DD) ![AppVersion: v0.7.1](https://img.shields.io/badge/AppVersion-v0.7.1-informational?style=flat-square&color=3CA9DD) A multi-plugin solution that reports misconfigurations and vulnerabilities by scanning your cluster at scheduled times. @@ -13,7 +13,7 @@ helm repo add undistro https://charts.undistro.io --force-update helm repo update undistro helm upgrade --install zora undistro/zora \ -n zora-system \ - --version 0.7.0 \ + --version 0.7.1 \ --create-namespace \ --wait \ --set clusterName="$(kubectl config current-context)" @@ -93,6 +93,8 @@ The following table lists the configurable parameters of the Zora chart and thei | operator.log.level | string | `"info"` | Log level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', or any integer value > 0 which corresponds to custom debug levels of increasing verbosity | | operator.log.stacktraceLevel | string | `"error"` | Log level at and above which stacktraces are captured (one of 'info', 'error' or 'panic') | | operator.log.timeEncoding | string | `"rfc3339"` | Log time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano') | +| operator.env | list | `[]` | List of environment variables to set in operator container. Cannot be updated | +| operator.envFrom | list | `[]` | List of sources to populate environment variables in operator container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. | | scan.misconfiguration.enabled | bool | `true` | Specifies whether misconfiguration scan is enabled | | scan.misconfiguration.schedule | string | Cron expression for every hour at the current minute + 5 minutes | Cluster scan schedule in Cron format for misconfiguration scan | | scan.misconfiguration.successfulScansHistoryLimit | int | `1` | The number of successful finished scans and their issues to retain. | diff --git a/charts/zora/templates/operator/deployment.yaml b/charts/zora/templates/operator/deployment.yaml index 21a3ca84..1f111cf2 100644 --- a/charts/zora/templates/operator/deployment.yaml +++ b/charts/zora/templates/operator/deployment.yaml @@ -59,6 +59,10 @@ spec: securityContext: {{- toYaml .Values.operator.rbacProxy.securityContext | nindent 12 }} - name: manager + envFrom: + {{- toYaml .Values.operator.envFrom | nindent 12 }} + env: + {{- toYaml .Values.operator.env | nindent 12 }} command: - /manager args: diff --git a/charts/zora/values.yaml b/charts/zora/values.yaml index 44aeafae..f96a572d 100644 --- a/charts/zora/values.yaml +++ b/charts/zora/values.yaml @@ -143,6 +143,15 @@ operator: stacktraceLevel: error # -- Log time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano') timeEncoding: rfc3339 + # -- List of environment variables to set in operator container. Cannot be updated + env: [] + # - name: key + # value: value + + # -- List of sources to populate environment variables in operator container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. + envFrom: [] + # - configMapRef: + # name: foo scan: misconfiguration: