Skip to content

Commit

Permalink
make charts
Browse files Browse the repository at this point in the history
  • Loading branch information
skanakal committed Jan 31, 2025
1 parent 1f28869 commit e83196b
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 26 deletions.
Binary file modified assets/rancher-logging/rancher-logging-106.0.0-rc.1+up4.10.0.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ spec:
Skip_Long_Lines: {{ .Values.fluentbit.inputTail.Skip_Long_Lines | toString | quote }}
{{- end }}
{{- end }}
{{- with (concat (.Values.tolerations) (.Values.fluentbit.tolerations)) }}
tolerations: {{- toYaml . | nindent 6 }}
{{- end }}
tolerations: {{- include "customTolerations" . | nindent 6 }}
{{- with .Values.nodeSelector }}
nodeSelector: {{- toYaml . | nindent 6 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,24 @@ true
{{- (include "windowsPathPrefix" .) | replace "C:" "" -}}
{{- end -}}

{{/*
Set tolerations based on Kubernetes distribution and merge with values.yaml
*/}}
{{- define "customTolerations" -}}
{{- $isRKE2orK3S := or .Values.additionalLoggingSources.rke2.enabled .Values.additionalLoggingSources.k3s.enabled -}}
{{- $defaultTolerations := list -}}
{{- if $isRKE2orK3S }}
{{- $defaultTolerations = append $defaultTolerations (dict "key" "node-role.kubernetes.io/control-plane" "operator" "Exists" "effect" "NoSchedule") -}}
{{- else }}
{{- $defaultTolerations = append $defaultTolerations (dict "key" "node-role.kubernetes.io/controlplane" "operator" "Exists" "effect" "NoSchedule") -}}
{{- end }}
{{- $defaultTolerations = append $defaultTolerations (dict "key" "node-role.kubernetes.io/etcd" "operator" "Exists" "effect" "NoExecute") -}}
{{- $userTolerations := .Values.tolerations | default list -}}
{{- $fluentbitTolerations := .Values.fluentbit.tolerations | default list -}}
{{- $mergedTolerations := concat $defaultTolerations $userTolerations $fluentbitTolerations -}}
{{- toYaml $mergedTolerations }}
{{- end -}}

{{/*
Set the controlplane selector based on kubernetes distribution
*/}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ spec:
Tag: {{ .Values.additionalLoggingSources.kubeAudit.fluentbit.logTag }}
Path: /kube-audit-logs/{{ template "kubeAuditFilename" . }}
Parser: json
{{- with (concat (.Values.tolerations) (.Values.fluentbit.tolerations) (.Values.additionalLoggingSources.kubeAudit.fluentbit.tolerations)) }}
tolerations: {{- toYaml . | nindent 6 }}
{{- end }}
tolerations:
{{- include "customTolerations" . | nindent 6 }}
{{- with .Values.additionalLoggingSources.kubeAudit.fluentbit.tolerations }}
{{- toYaml . | nindent 6 }}
{{- end }}
nodeSelector: {{ include "controlplaneSelector" . | nindent 6 }}
{{- include "logging-operator.individualFluentbit" $individualValues | nindent 2 }}
{{- end -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ spec:
configMap:
name: "{{ .Release.Name }}-rke"
serviceAccountName: "{{ .Release.Name }}-rke-aggregator"
{{- $total_tolerations := concat (.Values.tolerations) (.Values.fluentbit.tolerations) }}
{{- with $total_tolerations }}
tolerations: {{- toYaml . | nindent 8 }}
{{- end }}
tolerations: {{- include "customTolerations" . | nindent 8 }}
{{- with .Values.nodeSelector }}
nodeSelector: {{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
16 changes: 2 additions & 14 deletions charts/rancher-logging/106.0.0-rc.1+up4.10.0/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,7 @@ additionalLoggingSources:
pathPrefix: ""
fluentbit:
logTag: kube-audit
tolerations:
- key: node-role.kubernetes.io/control-plane
value: "true"
effect: NoSchedule
- key: node-role.kubernetes.io/etcd
value: "true"
effect: NoExecute
tolerations: []

# configures node agent options for windows node agents
nodeAgents:
Expand Down Expand Up @@ -458,13 +452,7 @@ fluentbit:
Multiline_Flush: ""
Skip_Long_Lines: ""
resources: {}
tolerations:
- key: node-role.kubernetes.io/control-plane
value: "true"
effect: NoSchedule
- key: node-role.kubernetes.io/etcd
value: "true"
effect: NoExecute
tolerations: []
filterKubernetes:
Merge_Log: ""
Merge_Log_Key: ""
Expand Down
4 changes: 2 additions & 2 deletions index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14847,9 +14847,9 @@ entries:
catalog.cattle.io/upstream-version: 4.10.0
apiVersion: v2
appVersion: 4.10.0
created: "2025-01-29T13:41:12.860185+05:30"
created: "2025-01-31T11:51:53.963161025+05:30"
description: Logging operator for Kubernetes based on Fluentd and Fluentbit.
digest: adf4e3ae4ce20e30e5a4cae8b66921a88d3b7d182da7b2989f65df5a9452783d
digest: a76350f1a95c564237b6d2b8b19893f3fab7671856a06393707d1f1d98a08175
home: https://kube-logging.github.io
icon: file://assets/logos/rancher-logging.svg
keywords:
Expand Down

0 comments on commit e83196b

Please sign in to comment.