Skip to content

Commit

Permalink
add job env vars (#87)
Browse files Browse the repository at this point in the history
* add job env vars

Signed-off-by: Borislav Velkov <[email protected]>

* bump chart version

Signed-off-by: Borislav Velkov <[email protected]>

* update README

Signed-off-by: Borislav Velkov <[email protected]>

Co-authored-by: Borislav Velkov <[email protected]>
  • Loading branch information
velkovb and Borislav Velkov authored Dec 14, 2021
1 parent 4eea062 commit a721b83
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/graylog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: graylog
home: https://www.graylog.org
version: 1.9.0
version: 1.9.1
appVersion: 4.2.3
description: Graylog is the centralized log management solution built to open standards for capturing, storing, and enabling real-time analysis of terabytes of machine data.
keywords:
Expand Down
2 changes: 2 additions & 0 deletions charts/graylog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ The following table lists the configurable parameters of the Graylog chart and t
| `graylog.init.env` | Additional environment variables to be added to Graylog initContainer | `{}` |
| `graylog.init.resources` | Configure resource requests and limits for the Graylog StatefulSet initContainer | `{}` |
| `graylog.provisioner.enabled` | Enable optional Job to run an arbitrary Bash script | `false` |
| `graylog.provisioner.env` | Job environment variables | `false` |
| `graylog.provisioner.envRaw` | Job environment variables in raw yaml format | `false` |
| `graylog.provisioner.annotations` | Graylog provisioner Job annotations | `{}` |
| `graylog.provisioner.useGraylogServiceAccount` | Use the same ServiceAccount used by Graylog pod | `false` |
| `graylog.provisioner.script` | The contents of the provisioner Bash script | |
Expand Down
10 changes: 9 additions & 1 deletion charts/graylog/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@ spec:
valueFrom:
secretKeyRef:
name: {{ .Values.graylog.existingRootSecret | default (include "graylog.fullname" .) }}

key: graylog-password-secret
{{- range $key, $value := .Values.graylog.provisioner.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- if .Values.graylog.provisioner.envRaw }}
{{- with .Values.graylog.provisioner.envRaw }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
volumeMounts:
- name: configmap
mountPath: /configmap
Expand Down
13 changes: 13 additions & 0 deletions charts/graylog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,19 @@ graylog:
# }'
# curl -v -u "admin:$GRAYLOG_PASSWORD_SECRET" -X PUT --header 'Content-Type: application/json' --header 'X-Requested-By: localhost' --data-binary "${json}" http://graylog-master:9000/api/plugins/org.graylog.plugins.auth.sso/config

## Additional environment variables to be added to Graylog provisioner job
##
env: {}

## Additional environment variables in raw yaml format
## - name: POD_IP
## valueFrom:
## fieldRef:
## fieldPath: status.podIP
## - name: SERVICE_8000_NAME
## value: servicename
envRaw: {}

secret:
## Secret annotations
##
Expand Down

0 comments on commit a721b83

Please sign in to comment.