diff --git a/charts/graylog/Chart.lock b/charts/graylog/Chart.lock index 4b665ed819fb2eec0391e532e32e49a6d8e68279..0f377167c3937540a30a193bebcbeb19d534f1ad 100644 --- a/charts/graylog/Chart.lock +++ b/charts/graylog/Chart.lock @@ -1,9 +1,9 @@ dependencies: - name: mongodb repository: https://groundhog2k.github.io/helm-charts - version: 0.2.7 + version: 0.2.9 - name: elasticsearch repository: https://groundhog2k.github.io/helm-charts - version: 0.1.0 -digest: sha256:a060aad91af87a477e72361960c442acef3e4851fcc41690058d970d25481190 -generated: "2021-01-04T14:04:19.2835459+01:00" + version: 0.1.1 +digest: sha256:530abd6484262fef5547fd1ba79bb13e722f05b1c1d8314945a39c1481810336 +generated: "2021-01-24T14:57:46.0365799+01:00" diff --git a/charts/graylog/Chart.yaml b/charts/graylog/Chart.yaml index ad257804daf158fe46eb8f5ff18015edd15f3f22..d5487e87c81de8f6ce411bb21110bc8c8ebb4fb9 100644 --- a/charts/graylog/Chart.yaml +++ b/charts/graylog/Chart.yaml @@ -7,16 +7,16 @@ type: application maintainers: - name: groundhog2k -version: 0.1.0 +version: 0.1.1 appVersion: "4.0.1" dependencies: - name: mongodb - version: 0.2.7 + version: 0.2.9 repository: "https://groundhog2k.github.io/helm-charts" condition: mongodb.enabled - name: elasticsearch - version: 0.1.0 + version: 0.1.1 repository: "https://groundhog2k.github.io/helm-charts" condition: elasticsearch.enabled diff --git a/charts/graylog/README.md b/charts/graylog/README.md index a154b8f9f690ca1b7e46724fb877c33ff01945c4..cd9f383f8f01b7ebf90fd5ce5dfd6187f04a3e7d 100644 --- a/charts/graylog/README.md +++ b/charts/graylog/README.md @@ -1,6 +1,6 @@ # Graylog -   +   A Helm chart for Graylog on Kubernetes @@ -37,6 +37,13 @@ To uninstall/delete the `my-release` deployment: $ helm uninstall my-release ``` +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| @groundhog2k | mongodb | 0.2.9 | +| @groundhog2k | elasticsearch | 0.1.1 | + ## Common parameters | Key | Type | Default | Description | @@ -57,6 +64,8 @@ $ helm uninstall my-release | imagePullSecrets | list | `[]` | Image pull secrets | | livenessProbe | object | `see values.yaml` | Liveness probe configuration | | readinessProbe | object | `see values.yaml` | Readiness probe configuration | +| customLivenessProbe | object | `{}` | Custom liveness probe (overwrites default liveness probe configuration) | +| customReadinessProbe | object | `{}` | Custom readiness probe (overwrites default readiness probe configuration) | | resources | object | `{}` | Resource limits and requests | | nodeSelector | object | `{}` | Deployment node selector | | podAnnotations | object | `{}` | Additional pod annotations | diff --git a/charts/graylog/charts/elasticsearch-0.1.0.tgz b/charts/graylog/charts/elasticsearch-0.1.0.tgz deleted file mode 100644 index 1a614c4f56efed73f57b9908cdd12a7f42871560..0000000000000000000000000000000000000000 Binary files a/charts/graylog/charts/elasticsearch-0.1.0.tgz and /dev/null differ diff --git a/charts/graylog/charts/elasticsearch-0.1.1.tgz b/charts/graylog/charts/elasticsearch-0.1.1.tgz new file mode 100644 index 0000000000000000000000000000000000000000..dc684d69daee3f8ac76836a8747c7b14ed4ed15e Binary files /dev/null and b/charts/graylog/charts/elasticsearch-0.1.1.tgz differ diff --git a/charts/graylog/charts/mongodb-0.2.7.tgz b/charts/graylog/charts/mongodb-0.2.7.tgz deleted file mode 100644 index 0381de981febb699e64e3c1bfb5bfedc3e5d2bf4..0000000000000000000000000000000000000000 Binary files a/charts/graylog/charts/mongodb-0.2.7.tgz and /dev/null differ diff --git a/charts/graylog/charts/mongodb-0.2.9.tgz b/charts/graylog/charts/mongodb-0.2.9.tgz new file mode 100644 index 0000000000000000000000000000000000000000..840086547ce42ec8e7bca93ba8d8a52cb2493c9d Binary files /dev/null and b/charts/graylog/charts/mongodb-0.2.9.tgz differ diff --git a/charts/graylog/templates/_helpers.tpl b/charts/graylog/templates/_helpers.tpl index c66cfee7b4e5f76aaff2f821f92d9b73b25ee08f..53749e69ee09e3d3c5078afe8f779669f036b711 100644 --- a/charts/graylog/templates/_helpers.tpl +++ b/charts/graylog/templates/_helpers.tpl @@ -153,10 +153,6 @@ Graylog settings via environment variables - name: GRAYLOG_TRANSPORT_EMAIL_USE_SSL value: {{ .Values.settings.smtp.useSsl | quote }} {{- end }} -{{- if .Values.settings.smtp.username }} -- name: GRAYLOG_TRANSPORT_EMAIL_AUTH_USERNAME - value: {{ .Values.settings.smtp.username | quote }} -{{- end }} {{- if .Values.settings.smtp.subjectPrefix }} - name: GRAYLOG_TRANSPORT_EMAIL_SUBJECT_PREFIX value: {{ .Values.settings.smtp.subjectPrefix | quote }} @@ -166,4 +162,14 @@ Graylog settings via environment variables value: {{ .Values.settings.smtp.emailFrom | quote }} {{- end }} {{- end }} +{{- if .Values.initGeoIPDatabase.enabled }} +{{- if .Values.initGeoIPDatabase.host }} +- name: GEOIPUPDATE_HOST + value: {{ .Values.initGeoIPDatabase.host | quote }} +{{- end }} +{{- if .Values.initGeoIPDatabase.proxy }} +- name: GEOIPUPDATE_PROXY + value: {{ .Values.initGeoIPDatabase.proxy | quote }} +{{- end }} +{{- end }} {{- end }} diff --git a/charts/graylog/templates/geoipsecrets.yaml b/charts/graylog/templates/geoipsecrets.yaml index fb8b0ed6d8b04f42a857a0caec24b7ce0bb60b84..84a01552b2353a54e8b516478b579bc164c88839 100644 --- a/charts/graylog/templates/geoipsecrets.yaml +++ b/charts/graylog/templates/geoipsecrets.yaml @@ -5,17 +5,12 @@ metadata: name: {{ include "graylog.fullname" . }}-geoip labels: {{- include "graylog.labels" . | nindent 4 }} -stringData: - GEOIPUPDATE_ACCOUNT_ID: {{ .Values.initGeoIPDatabase.accountId | quote }} - GEOIPUPDATE_LICENSE_KEY: {{ .Values.initGeoIPDatabase.licenseKey | quote }} - GEOIPUPDATE_EDITION_IDS: {{ .Values.initGeoIPDatabase.editionId | quote }} - {{- if .Values.initGeoIPDatabase.host }} - GEOIPUPDATE_HOST: {{ .Values.initGeoIPDatabase.host | quote }} - {{- end }} - {{- if .Values.initGeoIPDatabase.proxy }} - GEOIPUPDATE_PROXY: {{ .Values.initGeoIPDatabase.proxy | quote }} - {{- end }} +type: Opaque +data: + GEOIPUPDATE_ACCOUNT_ID: {{ .Values.initGeoIPDatabase.accountId | b64enc }} + GEOIPUPDATE_LICENSE_KEY: {{ .Values.initGeoIPDatabase.licenseKey | b64enc }} + GEOIPUPDATE_EDITION_IDS: {{ .Values.initGeoIPDatabase.editionId | b64enc }} {{- if .Values.initGeoIPDatabase.proxyUserPassword }} - GEOIPUPDATE_PROXY_USER_PASSWORD: {{ .Values.initGeoIPDatabase.proxyUserPassword | quote }} + GEOIPUPDATE_PROXY_USER_PASSWORD: {{ .Values.initGeoIPDatabase.proxyUserPassword | b64enc }} {{- end }} {{- end }} diff --git a/charts/graylog/templates/secureconfig.yaml b/charts/graylog/templates/secureconfig.yaml index 8c42b4001dcb0b4fba3dfbb2d21dfb871e098aa8..86d2440bd3116228515917f34d842d951807b5d1 100644 --- a/charts/graylog/templates/secureconfig.yaml +++ b/charts/graylog/templates/secureconfig.yaml @@ -4,23 +4,29 @@ metadata: name: {{ include "graylog.fullname" . }} labels: {{- include "graylog.labels" . | nindent 4 }} -stringData: +type: Opaque +data: {{- if .Values.mongodb.enabled }} - GRAYLOG_MONGODB_URI: mongodb://{{ .Values.mongodb.userDatabase.user}}:{{ .Values.mongodb.userDatabase.password}}@{{ include "mongodb.servicename" . }}:{{ .Values.mongodb.service.port }}/{{ .Values.mongodb.userDatabase.name }} + GRAYLOG_MONGODB_URI: {{ (printf "mongodb://%s:%s@%s:%s/%s" .Values.mongodb.userDatabase.user .Values.mongodb.userDatabase.password (include "mongodb.servicename" .) (.Values.mongodb.service.port | toString) .Values.mongodb.userDatabase.name) | b64enc }} {{- else }} {{- with .Values.externalDatabase }} - GRAYLOG_MONGODB_URI: mongodb://{{ .user }}:{{ .password }}@{{ .host }}/{{ .name }} + GRAYLOG_MONGODB_URI: {{ (printf "mongodb://%s:%s@%s/%s" .user .password .host .name) | b64enc }} {{- end }} {{- end }} -{{- if and (.Values.settings.smtp.enabled) (.Values.settings.smtp.password) }} - GRAYLOG_TRANSPORT_EMAIL_AUTH_PASSWORD: {{ .Values.settings.smtp.password | quote }} +{{- if .Values.settings.smtp.enabled }} +{{- if .Values.settings.smtp.username }} + GRAYLOG_TRANSPORT_EMAIL_AUTH_USERNAME: {{ .Values.settings.smtp.username | b64enc }} +{{- end }} +{{- if .Values.settings.smtp.password }} + GRAYLOG_TRANSPORT_EMAIL_AUTH_PASSWORD: {{ .Values.settings.smtp.password | b64enc }} +{{- end }} {{- end }} {{- if .Values.settings.passwordSecret }} - GRAYLOG_PASSWORD_SECRET: {{ .Values.settings.passwordSecret | quote }} + GRAYLOG_PASSWORD_SECRET: {{ .Values.settings.passwordSecret | b64enc }} {{- end }} {{- if .Values.settings.rootUser.username }} - GRAYLOG_ROOT_USERNAME: {{ .Values.settings.rootUser.username | quote }} + GRAYLOG_ROOT_USERNAME: {{ .Values.settings.rootUser.username | b64enc }} {{- end }} {{- if .Values.settings.rootUser.sha2Password }} - GRAYLOG_ROOT_PASSWORD_SHA2: {{ .Values.settings.rootUser.sha2Password | quote }} + GRAYLOG_ROOT_PASSWORD_SHA2: {{ .Values.settings.rootUser.sha2Password | b64enc }} {{- end }} diff --git a/charts/graylog/templates/statefulset.yaml b/charts/graylog/templates/statefulset.yaml index 7e176bbc1e6ff5500ee541909e47bcd90c3f9a76..0c943ca7bf98e1f01cf6430a541419d15e140c42 100644 --- a/charts/graylog/templates/statefulset.yaml +++ b/charts/graylog/templates/statefulset.yaml @@ -15,8 +15,10 @@ spec: type: {{ .Values.updateStrategyType }} template: metadata: - {{- with .Values.podAnnotations }} annotations: + checksum/secureconfig: {{ include (print $.Template.BasePath "/secureconfig.yaml") . | sha256sum }} + checksum/geopipsecrets: {{ include (print $.Template.BasePath "/geoipsecrets.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: @@ -89,7 +91,11 @@ spec: {{- include "graylog.environment" . | nindent 12 }} {{- with .Values.env }} {{- toYaml . | nindent 12 }} - {{- end }} + {{- end }} + {{- if .Values.customLivenessProbe }} + livenessProbe: + {{- toYaml .Values.customLivenessProbe | nindent 12 }} + {{- else }} {{- if .Values.livenessProbe.enabled }} livenessProbe: httpGet: @@ -106,6 +112,11 @@ spec: periodSeconds: {{ .periodSeconds }} {{- end }} {{- end }} + {{- end }} + {{- if .Values.customReadinessProbe }} + readinessProbe: + {{- toYaml .Values.customReadinessProbe | nindent 12 }} + {{- else }} {{- if .Values.readinessProbe.enabled }} readinessProbe: httpGet: @@ -122,6 +133,7 @@ spec: periodSeconds: {{ .periodSeconds }} {{- end }} {{- end }} + {{- end }} {{- with .Values.resources }} resources: {{- toYaml . | nindent 12 }} @@ -172,8 +184,6 @@ spec: volumeClaimTemplates: - metadata: name: graylog-volume - labels: - {{- include "graylog.labels" . | nindent 10 }} spec: {{- with .Values.storage.accessModes }} accessModes: diff --git a/charts/graylog/values.yaml b/charts/graylog/values.yaml index 4b896b21817fe865248bfa9b0e072a0f12eede6a..8ed86777ad9fceacda98a913ac6b6a96c00728cc 100644 --- a/charts/graylog/values.yaml +++ b/charts/graylog/values.yaml @@ -113,6 +113,9 @@ tolerations: [] affinity: {} +## Custom liveness probe (overwrites default liveness probe) +customLivenessProbe: {} + ## Default liveness probe livenessProbe: enabled: true @@ -122,6 +125,9 @@ livenessProbe: successThreshold: 1 periodSeconds: 10 +## Custom readiness probe (overwrites default readiness probe) +customReadinessProbe: {} + ## Default readiness probe readinessProbe: enabled: true