Skip to content

[BUG] Invalid namespaced owner reference attached to mutatingwebhookconfigurations #6692

@mhotan

Description

@mhotan

Flyte & Flytekit version

Latest

Describe the bug

Currently, we are adding an owner reference that is namespaced to mutatingwebhookconfigurations.admissionregistration.k8s.io, specifically the flyte-pod-webhook. This is not valid and will cause mgcs to be orphaned on uninstall.

Cluster-scoped dependents can only specify cluster-scoped owners. In v1.20+, if a cluster-scoped dependent specifies a namespaced kind as an owner, it is treated as having an unresolvable owner reference, and is not able to be garbage collected.

Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/#owner-references-in-object-specifications

Expected behavior

At a minimum, we should not set the owner reference and set labels to label owners.

Additional context to reproduce

No response

Screenshots

No response

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinguntriagedThis issues has not yet been looked at by the Maintainers

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions