This repository has been archived by the owner on May 16, 2023. It is now read-only.
This repository has been archived by the owner on May 16, 2023. It is now read-only.
Closed
Description
Describe the feature:
For convenient use of k8s secrets should add helm chart for create secrets.
Describe a specific use case for the feature:
Add secrets for using in k8s should be more convenient from the one logstash helm chart.
The helm chart for secret can looks like bellow
secret.yaml
{{- if .Values.logstashSecrets }}
{{- range .Values.logstashSecrets }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ template "logstash.fullname" $ }}-{{ .name }}
labels:
app: "{{ template "logstash.fullname" $ }}"
chart: "{{ $.Chart.Name }}"
heritage: {{ $.Release.Service | quote }}
release: {{ $.Release.Name | quote }}
{{- range $key, $value := $.Values.labels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
data:
{{- range $key, $val := .value }}
{{ $key }}: {{ $val | toString | b64enc | quote }}
{{- end }}
type: Opaque
{{- end }}
{{- end }}
values.yaml
logstashSecrets:
- name: "env"
value:
logstash.conf: |
input {
exec {
command => "uptime"
interval => 30
}
}
output { stdout { } }
api_key: ui2CsdUadTiBasRJRkl9tvNnw
- name: "tls"
value:
ca.crt: "LS0tLS1CRUdJT0K"
cert.crt: "LS0tLS1CRUdJTiBlRJRklDQVRFLS0tLS0K"
cert.key: "LS0tLS1CRUdJTiBgUFJJVkFURSBLRVktLS0tLQo="