Skip to content

diff() nulls parent objects when only nested keys exist #16414

@skanakal

Description

@skanakal

Setup

  • Rancher version: 2.13.1, master
  • Rancher UI Extensions: NA
  • Browser type & version: Any

Describe the bug

When modifying nested values in rancher-logging chart, specifically hostTailer.workloadMetaOverrides the UI correctly generates the new data but then immediately overwrites the entire object with null during the object diffing process. This results (labels/annotations) failin to save.

To Reproduce

  1. Install rancher-logging (rancher-logging 4.10.0-rancher.19)
  2. edit helm values and add
logging:
  enabled: true
  fluentbitDisabled: true
  hostTailer:
    enabled: true
    workloadMetaOverrides:
      annotations:
        hello: world
      labels:
        key: hellowrold
  1. Save

Result

root@master-0:~# kubectl get hosttailer -A -o yaml
apiVersion: v1
items:
- apiVersion: logging-extensions.banzaicloud.io/v1alpha1
  kind: HostTailer
  metadata:
    annotations:
      meta.helm.sh/release-name: rancher-logging
      meta.helm.sh/release-namespace: cattle-logging-system
    creationTimestamp: "2026-01-21T06:49:53Z"
    generation: 1
    labels:
      app.kubernetes.io/managed-by: Helm
    name: hosttailer
    namespace: cattle-logging-system
    resourceVersion: "532722"
    uid: fa01ff80-d3b4-4e63-8547-21916d896fad
  spec:
    enableRecreateWorkloadOnImmutableFieldChange: false
    image:
      imagePullSecrets: []
    workloadMetaOverrides: {}
    workloadOverrides: {}

Expected Result

root@master-0:~# kubectl get hosttailer -A -o yaml
apiVersion: v1
items:
- apiVersion: logging-extensions.banzaicloud.io/v1alpha1
  kind: HostTailer
  metadata:
    annotations:
      meta.helm.sh/release-name: rancher-logging
      meta.helm.sh/release-namespace: cattle-logging-system
    creationTimestamp: "2026-01-21T06:22:54Z"
    generation: 4
    labels:
      app.kubernetes.io/managed-by: Helm
    name: hosttailer
    namespace: cattle-logging-system
    resourceVersion: "528992"
    uid: 7a0d06d4-f1c9-4e41-bf03-718dc7c13592
  spec:
    enableRecreateWorkloadOnImmutableFieldChange: false
    image:
      imagePullSecrets: []
    workloadMetaOverrides:
      annotations:
         hello: world
      labels:
         key: hellowrold
    workloadOverrides: {}
kind: List

Screenshots

On the rancher UI, edit charts -> rancher-logging -> edit values.yaml
Image

Additional context

[SURE-10926]

Metadata

Metadata

Assignees

Labels

JIRAQA/dev-automationIssues that engineers have written automation around so QA doesn't have look at thisQA/manual-testIndicates issue requires manually testingarea/dashboardkind/bug

Type

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions