-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fluentd-kubernetes] add serviceaccount (#247)
- Loading branch information
marcin
authored
Jun 23, 2020
1 parent
1ce8a8c
commit 55d38cf
Showing
11 changed files
with
240 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ apiVersion: v1 | |
description: Kubernetes logs collect and forward with Fluentd. | ||
icon: https://raw.githubusercontent.com/fluent/fluentd-docs/master/public/logo/Fluentd_square.png | ||
name: fluentd-kubernetes | ||
version: 0.3.0 | ||
appVersion: 0.12 | ||
version: 0.4.0 | ||
appVersion: 1.8.0 | ||
home: https://www.fluentd.org/ | ||
sources: | ||
- https://quay.io/repository/coreos/fluentd-kubernetes | ||
|
@@ -12,4 +12,6 @@ maintainers: | |
- name: cloudposse | ||
email: [email protected] | ||
- name: goruha | ||
email: [email protected] | ||
email: [email protected] | ||
- name: 3h4x | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- if .Values.serviceAccount.enabled }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ .Values.serviceAccount.name }} | ||
labels: | ||
app: {{ template "fluentd_kubernetes.name" . }} | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
- namespaces | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
{{- end }} |
19 changes: 19 additions & 0 deletions
19
incubator/fluentd-kubernetes/templates/clusterrolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{- if .Values.serviceAccount.enabled }} | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: {{ .Values.serviceAccount.name }} | ||
labels: | ||
app: {{ template "fluentd_kubernetes.name" . }} | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
roleRef: | ||
kind: ClusterRole | ||
name: {{ .Values.serviceAccount.name }} | ||
apiGroup: rbac.authorization.k8s.io | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ .Values.serviceAccount.name }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,29 @@ | ||
{{ with index .Values "configMaps" -}} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "fluentd_kubernetes.fullname" . }} | ||
name: {{ template "fluentd_kubernetes.fullname" $ }}-config | ||
labels: | ||
app: {{ template "fluentd_kubernetes.name" . }} | ||
chart: {{ template "fluentd_kubernetes.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
app: {{ template "fluentd_kubernetes.name" $ }} | ||
chart: {{ template "fluentd_kubernetes.chart" $ }} | ||
release: {{ $.Release.Name }} | ||
heritage: {{ $.Release.Service }} | ||
data: | ||
{{- range $key, $value := .Values.configMaps }} | ||
{{ $key }}: |- | ||
{{ $value | indent 4 }} | ||
{{- range $key, $value := . }} | ||
{{ $key }}: |- {{ $value | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- with index .Values "fluent.conf" }} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "fluentd_kubernetes.fullname" $ }}-fluent-conf | ||
labels: | ||
app: {{ template "fluentd_kubernetes.name" $ }} | ||
chart: {{ template "fluentd_kubernetes.chart" $ }} | ||
release: {{ $.Release.Name }} | ||
heritage: {{ $.Release.Service }} | ||
data: | ||
fluent.conf: |- {{ . | nindent 4 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
{{ with .Values.env.secret }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "fluentd_kubernetes.fullname" . }} | ||
name: {{ include "fluentd_kubernetes.fullname" $ }} | ||
labels: | ||
app: {{ template "fluentd_kubernetes.name" . }} | ||
chart: {{ template "fluentd_kubernetes.chart" . }} | ||
app: {{ template "fluentd_kubernetes.name" $ }} | ||
chart: {{ template "fluentd_kubernetes.chart" $ }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
type: Opaque | ||
data: | ||
{{- range $name, $value := .Values.env.secret }} | ||
{{- if not (empty $value) }} | ||
{{- range $name, $value := . }} | ||
{{- if not (empty $value) }} | ||
{{ $name }}: {{ $value | b64enc }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
incubator/fluentd-kubernetes/templates/serviceaccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if .Values.serviceAccount.enabled }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ .Values.serviceAccount.name }} | ||
{{- with index .Values.serviceAccount "annotations"}} | ||
annotations: | ||
{{- range $key, $value := . }} | ||
"{{ $key }}": "{{ $value }}" | ||
{{- end }} | ||
{{- end }} | ||
labels: | ||
app: {{ template "fluentd_kubernetes.name" . }} | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
{{- end }} |
18 changes: 18 additions & 0 deletions
18
incubator/fluentd-kubernetes/templates/servicemonitor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if .Values.serviceMonitor.enabled }} | ||
kind: ServiceMonitor | ||
apiVersion: monitoring.coreos.com/v1 | ||
metadata: | ||
name: {{ template "fluentd_kubernetes.fullname" . }} | ||
labels: | ||
app: {{ template "fluentd_kubernetes.name" . }} | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
endpoints: | ||
- port: metrics | ||
selector: | ||
matchLabels: | ||
app: {{ template "fluentd_kubernetes.name" . }} | ||
release: {{ .Release.Name }} | ||
{{- end }} |
Oops, something went wrong.