Skip to content

Commit

Permalink
make charts
Browse files Browse the repository at this point in the history
  • Loading branch information
skanakal committed Feb 3, 2025
1 parent b29ed27 commit 0ccce92
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-31T19:23:27.399296+05:30"
created: "2025-02-03T11:00:59.321944018+05:30"
description: Logging operator for Kubernetes based on Fluentd and Fluentbit.
digest: 8e73d37d4854b3062bb0a2bd700180c6d47f2bfa7627f0b5d2bab6d6be225fd7
digest: d95024080171b643eb55be47bffeb37a41e762fc8938124cea44a5353e605728
home: https://kube-logging.github.io
icon: file://assets/logos/rancher-logging.svg
keywords:
Expand Down

0 comments on commit 0ccce92

Please sign in to comment.