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 62964f1 commit 7fec92d
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 @@ -11,9 +11,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 }}
{{- end -}}
{{- if .Values.additionalLoggingSources.kubeAudit.enabled }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,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-29T08:19:12.16911+05:30"
created: "2025-01-31T11:10:49.152403373+05:30"
description: Logging operator for Kubernetes based on Fluentd and Fluentbit.
digest: 73f3d3b2df614d473a47e879d4330709d99fde524e6bc0557760d2232f7c4ff7
digest: 2aaa15def2a7bf7650cbf529b7cfc181bc0a796ccb2765210ea998abe347ae9e
home: https://kube-logging.github.io
icon: file://assets/logos/rancher-logging.svg
keywords:
Expand Down

0 comments on commit 7fec92d

Please sign in to comment.