Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix root loggingref #5118

Open
wants to merge 2 commits into
base: dev-v2.11
Choose a base branch
from

Conversation

skanakal
Copy link
Contributor

Pull Requests Rules

  • Never remove an already released chart!

    • This does not apply to RC's because they are not released.
  • Each Pull Request should only modify one chart with its dependencies.

  • Pull request title:

    [dev-v2.X] <chart> <version> <action>
    
    • <action>: 1 of (bump; remove; UnRC)

Checkpoints for Chart Bumps

release.yaml:

  • Each chart version in release.yaml DOES NOT modify an already released chart. If so, stop and modify the versions so that it releases a net-new chart.
  • Each chart version in release.yaml IS exactly 1 more patch or minor version than the last released chart version. If not, stop and modify the versions so that it releases a net-new chart.

Chart.yaml and index.yaml:

  • The index.yaml file has an entry for your new chart version.
  • The index.yaml entries for each chart matches the Chart.yaml for each chart.
  • Each chart has ALL required annotations
    • kube-version annotation
    • rancher-version annotation
    • permits-os annotation (indicates Windows and/or Linux)

Fill the following only if required by your manager.

Issue:

rancher/rancher#49057

Solution

allow root logging to inherit loggingRef from values.yaml, ensuring it behaves like other logging sources...

QA Testing Considerations

@skanakal skanakal requested a review from a team as a code owner February 10, 2025 14:47
Copy link

Validation steps

  • Ensure all container images have repository and tag on the same level to ensure that all container images are included in rancher-images.txt which are used by airgap customers.
  Ex:-
    longhorn-controller:
      repository: rancher/hardened-sriov-cni
      tag: v2.6.3-build20230913
  
  • Add a 👍 (thumbs up) reaction to this comment once done. CI won't pass without this reaction to the github-action bot's latest validation comment.
  • Approve the PR to run the CI check.

{{- $containerLogPath := printf "%s/containers/" (default "/var/lib/docker" .Values.global.dockerRootDirectory) }}
metadata:
name: "{{ .Release.Name }}-root"
spec:
{{- include "logging-operator.individualLoggingRef" (dict "loggingRef" .Values.additionalLoggingSources.loggingRef) | nindent 2 }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also take a look the fluentbitagent.yaml under kube-audit, from my test, without a loggingRef, the kube-audit log is also sent to root-fluend, thanks.

Harvester patches the pulled rancher-logging chart locally.

https://github.com/harvester/harvester-installer/pull/980/files#diff-262d20f5e1057034255c9c16590b8a3e94f4e059297f837c1b8d31f406f1ede0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@w13915984028 You can set this thru below, and that's being set here: https://github.com/rancher/charts/blob/dev-v2.11/charts/rancher-logging/106.0.0-rc.1%2Bup4.10.0/templates/loggings/kube-audit/fluentbitagent.yaml#L2-L6

with the helper function https://github.com/rancher/charts/blob/dev-v2.11/charts/rancher-logging/106.0.0-rc.1%2Bup4.10.0/templates/_helpers.tpl#L220

additionalLoggingSources:
  kube-audit:
    enabled: true
    loggingRef: kubeauditlogging
    fluentbit:
      loggingRef: kubeauditlogging

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skanakal That's great, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants