Skip to content

Commit

Permalink
feat: add annotations to configmaps
Browse files Browse the repository at this point in the history
Signed-off-by: Michael McLeroy <[email protected]>
  • Loading branch information
Boojapho committed May 22, 2023
1 parent 7673a44 commit 4d23ec0
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/fluent-bit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- logging
- fluent-bit
- fluentd
version: 0.29.0
version: 0.29.1
appVersion: 2.1.3
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/fluentd/fluentbit/icon/fluentbit-icon-color.svg
home: https://fluentbit.io/
Expand All @@ -23,4 +23,4 @@ maintainers:
annotations:
artifacthub.io/changes: |
- kind: added
description: "Updated Fluent Bit image to v2.1.3."
description: "Added annotation support for configmaps"
4 changes: 4 additions & 0 deletions charts/fluent-bit/templates/configmap-luascripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
name: {{ include "fluent-bit.fullname" . }}-luascripts
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
{{- with .Values.configmaps.annotations }}
annotations:
{{- toYaml . | nindent 4 -}}
{{- end }}
data:
{{ range $key, $value := .Values.luaScripts }}
{{ $key }}: {{ $value | quote }}
Expand Down
4 changes: 4 additions & 0 deletions charts/fluent-bit/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
name: {{ include "fluent-bit.fullname" . }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
{{- with .Values.configmaps.annotations }}
annotations:
{{- toYaml . | nindent 4 -}}
{{- end }}
data:
custom_parsers.conf: |
{{- (tpl .Values.config.customParsers $) | nindent 4 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/fluent-bit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ networkPolicy:
# ingress:
# from: []

configmaps:
annotations: {}

luaScripts: {}

## https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/configuration-file
Expand Down
2 changes: 1 addition & 1 deletion charts/fluent-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords:
- fluent-bit
- fluentd
- operator
version: 2.2.0
version: 2.2.1
appVersion: 2.2.0
icon: https://raw.githubusercontent.com/fluent/fluent-operator/master/docs/images/fluent-operator-icon.svg
home: https://www.fluentd.org/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: fluent-bit-containerd-config
{{- with .Values.fluentbit.configmaps.annotations }}
annotations:
{{- toYaml . | nindent 4 -}}
{{- end }}
data:
containerd.lua: |
function containerd( tag, timestamp, record)
Expand Down
4 changes: 4 additions & 0 deletions charts/fluent-operator/templates/fluentbit-lua-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: fluent-bit-lua
{{- with .Values.fluentbit.configmaps.annotations }}
annotations:
{{- toYaml . | nindent 4 -}}
{{- end }}
data:
systemd.lua: |
function add_time(tag, timestamp, record)
Expand Down
4 changes: 4 additions & 0 deletions charts/fluent-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ fluentbit:
# name: hostProc
# readOnly: true

configmaps:
# Additional annotations to add to configmaps
annotations: {}

# Set a limit of memory that Tail plugin can use when appending data to the Engine.
# You can find more details here: https://docs.fluentbit.io/manual/pipeline/inputs/tail#config
# If the limit is reach, it will be paused; when the data is flushed it resumes.
Expand Down
2 changes: 1 addition & 1 deletion charts/fluentd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: fluentd
description: A Helm chart for Kubernetes
# type: application
version: 0.4.1
version: 0.4.2
appVersion: v1.14.6
icon: https://www.fluentd.org/images/miscellany/fluentd-logo_2x.png
home: https://www.fluentd.org/
Expand Down
4 changes: 4 additions & 0 deletions charts/fluentd/templates/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ metadata:
{{- range $key, $val := $.Values.dashboards.labels }}
{{ $key }}: {{ $val }}
{{- end }}
{{- with $.Values.dashboards.annotations }}
annotations:
{{- toYaml . | nindent 4 -}}
{{- end }}
data:
{{ base $path }}: |-
{{- $.Files.Get $path | nindent 4 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/fluentd/templates/files.conf/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
labels:
{{- include "fluentd.labels" . | nindent 4 }}
name: fluentd-prometheus-conf-{{ include "fluentd.shortReleaseName" . }}
{{- with .Values.configmaps.annotations }}
annotations:
{{- toYaml . | nindent 4 -}}
{{- end }}
data:
prometheus.conf: |-
<source>
Expand Down
4 changes: 4 additions & 0 deletions charts/fluentd/templates/files.conf/systemd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
labels:
{{- include "fluentd.labels" . | nindent 4 }}
name: fluentd-systemd-conf-{{ include "fluentd.shortReleaseName" . }}
{{- with .Values.configmaps.annotations }}
annotations:
{{- toYaml . | nindent 4 -}}
{{- end }}
data:
systemd.conf: |-
<source>
Expand Down
8 changes: 8 additions & 0 deletions charts/fluentd/templates/fluentd-configurations-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ metadata:
name: fluentd-config-{{ include "fluentd.shortReleaseName" . }}
labels:
{{- include "fluentd.labels" . | nindent 4 }}
{{- with .Values.configmaps.annotations }}
annotations:
{{- toYaml . | nindent 4 -}}
{{- end }}
data:
{{- range $key, $value := .Values.fileConfigs }}
{{$key }}: |-
Expand All @@ -21,6 +25,10 @@ metadata:
name: fluentd-main-{{ include "fluentd.shortReleaseName" . }}
labels:
{{- include "fluentd.labels" . | nindent 4 }}
{{- with .Values.configmaps.annotations }}
annotations:
{{- toYaml . | nindent 4 -}}
{{- end }}
data:
fluent.conf: |-
# do not collect fluentd logs to avoid infinite loops.
Expand Down
5 changes: 5 additions & 0 deletions charts/fluentd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,17 @@ dashboards:
namespace: ""
labels:
grafana_dashboard: '"1"'
annotations: {}

## Fluentd list of plugins to install
##
plugins: []
# - fluent-plugin-out-http

configmaps:
# Additional annotations to add to configmaps
annotations: {}

## Add fluentd config files from K8s configMaps
##
configMapConfigs: []
Expand Down

0 comments on commit 4d23ec0

Please sign in to comment.