diff --git a/ndustrial/deployment/Chart.yaml b/ndustrial/deployment/Chart.yaml index 4c6985b..ca78239 100644 --- a/ndustrial/deployment/Chart.yaml +++ b/ndustrial/deployment/Chart.yaml @@ -12,5 +12,5 @@ maintainers: - email: devops@ndustrial.io name: DevOps # Please make sure that version and appVersion are always the same. -version: 0.1.21 -appVersion: 0.1.21 +version: 0.1.22 +appVersion: 0.1.22 diff --git a/ndustrial/deployment/README.md b/ndustrial/deployment/README.md index acea25d..c753946 100644 --- a/ndustrial/deployment/README.md +++ b/ndustrial/deployment/README.md @@ -90,7 +90,7 @@ | `ingress.pathType` | Ingress path type | `ImplementationSpecific` | | `ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `nil` | | `ingress.hostname` | Default host for the ingress record | `chart-example.local` | -| `ingress.path` | Default path for the ingress record | `ImplementationSpecific` | +| `ingress.path` | Default path for the ingress record | `/` | | `ingress.annotations` | Additional custom annotations for the ingress record | `{}` | | `ingress.tls` | Enable TLS configuration for the host defined at `ingress.hostname` parameter | `false` | | `ingress.certManager` | Add the corresponding annotations for cert-manager integration | `false` | @@ -142,6 +142,7 @@ | `lifecycleHooks` | Add lifecycle hooks to the Deployment deployment | `{}` | | `shareProcessNamespace` | Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. | `false` | | `extraEnvVars` | Add extra environment variables to the Deployment container | `[]` | +| `extraEnvVarsMap` | Add extra environment variables to the Deployment container | `{}` | | `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `nil` | | `extraEnvVarsCMs` | Optionally specify extra list of additional existing ConfigMaps containing extra env vars | `[]` | | `extraEnvVarsSecret` | Name of existing Secret containing extra env vars | `nil` | diff --git a/ndustrial/deployment/_var_list.yml b/ndustrial/deployment/_var_list.yml index ec9cbfe..66b5ba9 100644 --- a/ndustrial/deployment/_var_list.yml +++ b/ndustrial/deployment/_var_list.yml @@ -363,6 +363,10 @@ group: Pod default: [] type: +- variable: extraEnvVarsMap + group: Pod + default: {} + type: - variable: extraEnvVarsCM group: Pod default: diff --git a/ndustrial/deployment/templates/deployment.yaml b/ndustrial/deployment/templates/deployment.yaml index 3ac0f96..2b6e7ca 100644 --- a/ndustrial/deployment/templates/deployment.yaml +++ b/ndustrial/deployment/templates/deployment.yaml @@ -97,6 +97,12 @@ spec: {{- if .Values.extraEnvVars }} {{- include "nio-common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }} {{- end }} + {{- if .Values.extraEnvVarsMap }} + {{- range $key, $val := .Values.extraEnvVarsMap }} + - name: {{ $key }} + value: {{ include "nio-common.tplvalues.render" (dict "value" $key "context" $) | quote }} + {{- end }} + {{- end }} - name: POD_NAMESPACE valueFrom: fieldRef: diff --git a/ndustrial/deployment/values.yaml b/ndustrial/deployment/values.yaml index 299d8eb..9b32011 100644 --- a/ndustrial/deployment/values.yaml +++ b/ndustrial/deployment/values.yaml @@ -372,6 +372,13 @@ shareProcessNamespace: false ## extraEnvVars: [] +## @param extraEnvVarsMap Add extra environment variables to the Deployment container +## E.g: +## extraEnvVarsMap: +## FOO: "bar" +## +extraEnvVarsMap: {} + ## @param extraEnvVarsCM Name of existing ConfigMap containing extra env vars ## extraEnvVarsCM: diff --git a/ndustrial/statefulset/Chart.yaml b/ndustrial/statefulset/Chart.yaml index 92616c9..908e1a0 100644 --- a/ndustrial/statefulset/Chart.yaml +++ b/ndustrial/statefulset/Chart.yaml @@ -12,5 +12,5 @@ maintainers: - email: devops@ndustrial.io name: DevOps # Please make sure that version and appVersion are always the same. -version: 0.1.20 -appVersion: 0.1.20 +version: 0.1.21 +appVersion: 0.1.21 diff --git a/ndustrial/statefulset/README.md b/ndustrial/statefulset/README.md index eeb6133..0336015 100644 --- a/ndustrial/statefulset/README.md +++ b/ndustrial/statefulset/README.md @@ -66,13 +66,13 @@ ### persistentVolume parameters -| Name | Description | Value | -| ------------------------------- | ------------------------------------ | ------------- | -| `persistentVolume.enabled` | Enable persistentVolume | `true` | -| `persistentVolume.accessModes` | Storage size of the persistentVolume | `[]` | -| `persistentVolume.storageClass` | StorageClass of the persistentVolume | `""` | -| `persistentVolume.size` | Storage size of the persistentVolume | `400M` | -| `persistentVolume.mountPath` | Mount path of the persistentVolume | `/tmp/volume` | +| Name | Description | Value | +| ------------------------------- | ------------------------------------ | ------------------- | +| `persistentVolume.enabled` | Enable persistentVolume | `true` | +| `persistentVolume.accessModes` | Storage size of the persistentVolume | `["ReadWriteOnce"]` | +| `persistentVolume.storageClass` | StorageClass of the persistentVolume | `""` | +| `persistentVolume.size` | Storage size of the persistentVolume | `400M` | +| `persistentVolume.mountPath` | Mount path of the persistentVolume | `/tmp/volume` | ### Service parameters @@ -101,7 +101,7 @@ | `ingress.pathType` | Ingress path type | `ImplementationSpecific` | | `ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `nil` | | `ingress.hostname` | Default host for the ingress record | `chart-example.local` | -| `ingress.path` | Default path for the ingress record | `ImplementationSpecific` | +| `ingress.path` | Default path for the ingress record | `/` | | `ingress.annotations` | Additional custom annotations for the ingress record | `{}` | | `ingress.tls` | Enable TLS configuration for the host defined at `ingress.hostname` parameter | `false` | | `ingress.certManager` | Add the corresponding annotations for cert-manager integration | `false` | diff --git a/scripts/gen.sh b/scripts/gen.sh index 6995f9e..49ab7bd 100755 --- a/scripts/gen.sh +++ b/scripts/gen.sh @@ -2,39 +2,25 @@ set -e WORKDIR=$(pwd) -CI_DIR=${WORKDIR}/.ci -README_GEN_BIN=$(which readme-generator) +README_GEN_BIN=$(which readme-generator || true) to_workdir() { - cd ${WORKDIR} + cd "${WORKDIR}" } to_chart_dir() { local chart=$1 - cd ${WORKDIR}/ndustrial/${chart} + cd "${WORKDIR}"/ndustrial/"${chart}" } install_md_gen() { - if [ -d ${CI_DIR} ]; then - mkdir -p ${CI_DIR} - fi - - if [ -d ${CI_DIR}/readme-generator-for-helm ]; then - cd ${CI_DIR} - git clone https://github.com/bitnami-labs/readme-generator-for-helm - cd ${CI_DIR}/readme-generator-for-helm - npm install - cd ${CI_DIR} - npm install -g readme-generator-for-helm - fi - - to_workdir + npm install -g git+https://github.com/bitnami-labs/readme-generator-for-helm } gen_readme() { local chart=$1 echo "Generating README.md for ${chart}" - to_chart_dir ${chart} + to_chart_dir "${chart}" ${README_GEN_BIN} -r ./README.md -v values.yaml to_workdir } @@ -43,13 +29,14 @@ gen_questions() { local chart=$1 echo "Generating questions for ${chart}" - docker run --rm -v $(pwd):/app crystallang/crystal:1.0.0 \ - crystal /app/scripts/question_gen.cr -f /app/ndustrial/${chart}/values.yaml + docker run --rm -v "$(pwd)":/app crystallang/crystal:1.0.0 \ + crystal /app/scripts/question_gen.cr -f /app/ndustrial/"${chart}"/values.yaml } -if [ -z ${README_GEN_BIN} ]; then +if [ -z "${README_GEN_BIN}" ]; then echo "missing readme-generator" install_md_gen + README_GEN_BIN=$(which readme-generator) fi echo "Generating README.md"