kubernetes-sigs / kubernetes-sigs/cli-utils

Feature Request: Allow resource references to omit namespace if referencing a resource in same namespace as itself

Open
#437 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lifecycle/frozen
Dominant language
Go
Stars
178
Forks
85
PR merge metrics
No merged PRs in 30d

Description

We currently require that resource references to namespaced resource contains the namespace (i.e. config.kubernetes.io/depends-on: apps/namespaces/default/Deployment/wordpress-mysql). This can become a bit awkward if we have a set of resources that doesn't have the namespace set, but relies on it being resolved from the kube context. We could consider allowing the namespace to be omitted, but resolve it to the same namespace as the resource in which the annotation is set.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue centers on config.kubernetes.io/depends-on and namespace resolution for namespaced resources. Start by tracing the resource-reference resolution entry point and existing tests for fully qualified references; done means an omitted namespace resolves to the referencing resource's namespace without changing explicit references.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.