Skip to content

[MEDIUM] Hardcoded controllerconfig name in config health check #189

Description

@pradeepto

Description

internal/controller/config_utils.go:38-39

if err := kubeClient.Get(ctx, types.NamespacedName{
    Name:      "controllerconfig",

The ControllerConfig CR name is hardcoded as "controllerconfig". If the user names their CR anything else the health check silently fails with a "not found" error that looks like a cluster issue.

Fix

Either:

  • Make it configurable via a constant or flag
  • Enforce the name via a validating webhook
  • At minimum extract to a well-documented named constant

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions