Skip to content

feat(pull-secret): add pull secret management commands#80

Open
Benedicte Brandsnes Nyheim (benedictebn) wants to merge 6 commits intomainfrom
feat/pull-secret-support
Open

feat(pull-secret): add pull secret management commands#80
Benedicte Brandsnes Nyheim (benedictebn) wants to merge 6 commits intomainfrom
feat/pull-secret-support

Conversation

@benedictebn
Copy link
Copy Markdown

@benedictebn Benedicte Brandsnes Nyheim (benedictebn) commented Feb 23, 2026

Summary

  • CRUD Operations: Full create, read, update, and delete commands for image pull secrets (pull-secret list/get/create/delete)
  • Registry Management: Subcommands to manage registries on existing secrets via pull-secret registry add/remove (following the team member add/remove pattern)
  • Cluster Integration: New cluster pullsecret set command to assign secrets to clusters
  • Cluster Wizard: Pull secret selection integrated into the cluster creation wizard and --pull-secret flag on cluster create
  • Display Enhancement: Pull secret assignments shown in cluster get output
  • Backend Support: PullSecretClient interface and REST methods added to platform client, plus ImagePullSecret field to the Cluster struct

Test plan

Pull secret management

  • indev pull-secret create -n my-secret -a ghcr.io -u myuser --password mytoken — creates a new pull secret with an initial registry
  • indev pull-secret list — lists all pull secrets
  • indev pull-secret list -o wide — lists with ID and created-at columns
  • indev pull-secret list -o json / -o yaml — machine-readable output
  • indev pull-secret get my-secret — shows details including attached registries
  • indev pull-secret delete my-secret — deletes the pull secret

Registry management

  • indev pull-secret registry add -p my-secret -a docker.io -u myuser --password mytoken — adds an additional registry with credentials
  • indev pull-secret registry remove -p my-secret -a docker.io — removes a registry from a pull secret

Cluster integration

  • indev cluster create -n my-cluster --pull-secret my-secret — creates a cluster with a pull secret attached
  • indev cluster create (interactive wizard) — pull secret selection appears in wizard when pull secrets exist
  • indev cluster pullsecret set my-cluster my-secret — assigns a pull secret to an existing cluster

Error cases

  • indev pull-secret create without --name returns a clear error
  • indev pull-secret create -n my-secret without registry flags returns a clear error
  • indev pull-secret registry add with missing flags returns a clear error
  • indev cluster pullsecret set with a non-existent pull secret name returns a clear error

🤖 Generated with Claude Code

@Callum0x50
Copy link
Copy Markdown
Contributor

Har patchet prosjektet siden du la inn denne. Trenger nok en rebase. La oss ta en runde og se over de nye kommandoene først vi merger. Si ifra når det er klart.

…tegration

Add full CRUD support for image pull secrets (list, get, create, edit, delete),
a cluster pull-secret set command, pull secret selection in the cluster create
wizard, and pull secret display in cluster get output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix line length by extracting endpoint variables
- Fix cyclomatic complexity by extracting resolvePullSecretRef
- Fix function length by extracting wizard helpers into wizard.go
- Fix argument limit by using editOptions struct
- Add yaml struct tags to PullSecret for musttag
- Wrap FindPullSecretByName error for wrapcheck
- Preallocate psOptions slice

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Password field is a credential payload sent to the API, not a
hardcoded secret.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mands

Remove interactive wizard from create/edit commands and introduce a
hierarchical `registry` subcommand group (add/remove) mirroring the
teams member management pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add registry flags (--address, --username, --password) to pull-secret create,
  as the backend requires at least one registry at creation time
- Fix dev backend port from 8080 to 8081

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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