Add envFrom to the tokengen job (#7479)

Add an envFrom section to the tokengen job.
Fixes https://github.com/grafana/loki/issues/7411
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
pull/7484/head
Michel Hollands 3 years ago committed by GitHub
parent 7e7436d482
commit ec541d70e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      production/helm/loki/README.md
  2. 4
      production/helm/loki/templates/tokengen/job-tokengen.yaml
  3. 2
      production/helm/loki/values.yaml

@ -168,11 +168,12 @@ monitoring:
| enterprise.provisioner.provisionedSecretPrefix | string | `"{{ include \"loki.name\" . }}-provisioned"` | Name of the secret to store provisioned tokens in |
| enterprise.provisioner.securityContext | object | `{"fsGroup":10001,"runAsGroup":10001,"runAsNonRoot":true,"runAsUser":10001}` | Run containers as user `enterprise-logs(uid=10001)` |
| enterprise.provisioner.tenants | list | `[]` | Tenants to be created. Each tenant will get a read and write policy and associated token. |
| enterprise.tokengen | object | `{"annotations":{},"enabled":true,"env":[],"extraArgs":[],"extraVolumeMounts":[],"extraVolumes":[],"labels":{},"securityContext":{"fsGroup":10001,"runAsGroup":10001,"runAsNonRoot":true,"runAsUser":10001},"tolerations":[]}` | Configuration for `tokengen` target |
| enterprise.tokengen | object | `{"annotations":{},"enabled":true,"env":[],"extraArgs":[],"extraEnvFrom":[],"extraVolumeMounts":[],"extraVolumes":[],"labels":{},"securityContext":{"fsGroup":10001,"runAsGroup":10001,"runAsNonRoot":true,"runAsUser":10001},"tolerations":[]}` | Configuration for `tokengen` target |
| enterprise.tokengen.annotations | object | `{}` | Additional annotations for the `tokengen` Job |
| enterprise.tokengen.enabled | bool | `true` | Whether the job should be part of the deployment |
| enterprise.tokengen.env | list | `[]` | Additional Kubernetes environment |
| enterprise.tokengen.extraArgs | list | `[]` | Additional CLI arguments for the `tokengen` target |
| enterprise.tokengen.extraEnvFrom | list | `[]` | Environment variables from secrets or configmaps to add to the tokengen pods |
| enterprise.tokengen.extraVolumeMounts | list | `[]` | Additional volume mounts for Pods |
| enterprise.tokengen.extraVolumes | list | `[]` | Additional volumes for Pods |
| enterprise.tokengen.labels | object | `{}` | Additional labels for the `tokengen` Job |

@ -67,6 +67,10 @@ spec:
{{- if .Values.enterprise.tokengen.env }}
{{ toYaml .Values.enterprise.tokengen.env | nindent 12 }}
{{- end }}
{{- with .Values.enterprise.tokengen.extraEnvFrom }}
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
containers:
- name: create-secret
image: {{ include "loki.kubectlImage" . }}

@ -349,6 +349,8 @@ enterprise:
runAsGroup: 10001
runAsUser: 10001
fsGroup: 10001
# -- Environment variables from secrets or configmaps to add to the tokengen pods
extraEnvFrom: []
# -- Configuration for `provisioner` target
provisioner:

Loading…
Cancel
Save