Skip to content

namespace.labelSelector doesn't not trigger hook on namespace label change #710

Description

@redbaron

It looks like when namespace.labelSelector is used then label updates to namespace don't trigger hook.

Expected behavior (what you expected to happen):

change to a namespace label listed in namespace.labelSelector should trigger hook execution.

Actual behavior (what actually happened):

hook is not executed when namespace label is changed.

Steps to reproduce:

With following hook config:

- name: configMaps
  apiVersion: v1
  kind: ConfigMap
  namespace:
    labelSelector:
      matchLabels:
        profile: "true"
  nameSelector:
    matchNames: ["app-config"]
  keepFullObjectsInMemory: false
  jqFilter: |
    {
      namespace: .metadata.namespace,
      config: .data."config.yml"
    }

update to labels on the namespace changes number of objects passed in .snapshot.configmaps and therefore I'd expect hook to execute with new value of BINDING_CONTEXT. It seems that because monitored ConfigMap objects themselves are not changed, hook run is skipped.

Environment:

  • Shell-operator version: 1.5.3
  • Kubernetes version: 1.30
  • Installation type (kubectl apply, helm chart, etc.):

Anything else we should know?:

Additional information for debugging (if necessary):

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions