Skip to content

feat!: replace --namespace and --context flags with --team and --environment#645

Merged
frodesundby merged 4 commits intomainfrom
remove_context_and_namespace_from_postgres
Feb 17, 2026
Merged

feat!: replace --namespace and --context flags with --team and --environment#645
frodesundby merged 4 commits intomainfrom
remove_context_and_namespace_from_postgres

Conversation

@thokra-nav
Copy link
Contributor

@thokra-nav thokra-nav commented Feb 16, 2026

Replace the --namespace (-n) and --context (-c) flags across all commands with --team (-t) and --environment (-e).

  • Remove the Namespace custom type and its autocomplete logic
  • Remove GetNamespaceForContext and GetNamespacesForContext from k8s client
  • Add RequiredTeam() helper to AdditionalFlags
  • Add UsesRemovedFlags() validation that errors when old flags are used
  • Update all internal functions to accept team/environment instead of namespace/context

BREAKING CHANGE: The --namespace (-n) and --context (-c) flags for commands have been removed. Use --team (-t) and --environment (-e) instead.

…and --environment

Replace the --namespace (-n) and --context (-c) flags across all
postgres commands with --team (-t) and --environment (-e).

- Remove the Namespace custom type and its autocomplete logic
- Remove GetNamespaceForContext and GetNamespacesForContext from k8s client
- Add RequiredTeam() helper to AdditionalFlags
- Add UsesDeprecatedFlags() validation that errors when old flags are used
- Update all internal functions to accept team/environment instead of
  namespace/context

BREAKING CHANGE: The --namespace (-n) and --context (-c) flags for postgres
commands have been removed. Use --team (-t) and --environment (-e) instead.

Co-authored-by: Trong Nguyen <trong.huu.nguyen@nav.no>
Co-authored-by: Frode Sundby <frode.sundby@nav.no>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

📝 Changelog preview

Below is a preview of the Changelog that will be added to the next release. Only commit messages that follow the Conventional Commits specification will be included in the Changelog.

v4.0.0 - 2026-02-17

Full Changelog: v3.32.1...v4.0.0

🚀 Features

  • (postgres) 💥 Breaking change: Replace --namespace and --context flags with --team and --environment (1a7921b)
  • (aiven) Add environment flag to commands and k8s client (11859bf)

thokra-nav added a commit to nais/doc that referenced this pull request Feb 16, 2026
Co-authored-by: Trong Huu Nguyen <trong.huu.nguyen@nav.no>
 and aiven

Replace --namespace/-n and --context/-c with --team/-t and
--environment/-e
across Aiven, Debug, and Postgres commands. Add validation to error on
use of
removed flags. Update internal usage to reference new flags.
@thokra-nav thokra-nav changed the title feat(postgres)!: replace --namespace and --context flags with --team … feat!: replace --namespace and --context flags with --team and --environment Feb 17, 2026
Adds an --environment flag to Aiven commands, passing the selected
environment to k8s client setup and resource operations. This enables
targeting specific Kubernetes contexts for Aiven operations.
@frodesundby frodesundby merged commit c4e546c into main Feb 17, 2026
19 checks passed
@frodesundby frodesundby deleted the remove_context_and_namespace_from_postgres branch February 17, 2026 09:11
frodesundby added a commit to nais/doc that referenced this pull request Feb 17, 2026
* Update docs after nais/cli#645

* Document environment flag for aiven CLI commands

Co-authored-by: Trong Huu Nguyen <trong.huu.nguyen@nav.no>
Co-authored-by: Frode Sundby <frode.sundby@nav.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants