Skip to content

Add a deploy-form button that provisions a registry pull secret - #347

Merged
acoshift merged 5 commits into
mainfrom
deploy-registry-pull
Oct 28, 2026
Merged

acoshift merged 5 commits into
mainfrom
deploy-registry-pull

Conversation

@acoshift

@acoshift acoshift commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Adds a secondary New button on the deployment deploy form, next to the pull secret field. It provisions a dedicated registry-pull service account, a role whose only permission is registry.pull, and a pull secret for https://registry.deploys.app in the selected location.
  • The pull secret field stays hidden until a location is selected. New stays hidden when registry-pull is already in that location, and so does the "For a private registry..." helper.
  • If that service account already exists (the pull secret may have been deleted), New reads its roles and continues with that account when the roles are empty or only registry-pull, and that role is limited to registry.pull. Any other binding opens an error modal and leaves the account's roles unchanged. role.bind is not called in that case.
  • The deployment still has to reference the secret by name. Nothing pulls the image automatically. A same-project registry.deploys.app/<project>/... image preselects registry-pull only when that secret is already in the loaded list and the field is empty.
  • The button is enabled only when the caller can create the service account, create a key, create a pull secret, and bind the role — plus role.create when the registry-pull role does not already exist. A missing grant shows a disabled button whose tooltip names the first missing permission.
before after

registry-pull already in the location — the field is there, New is not, and the helper is hidden:

registry-pull exists

The existing account is bound to another role, so New stops:

registry-pull cannot be reused

Test plan

  • bun lint
  • bun check
  • bunx playwright test tests/deploy-registry-pull.spec.js --retries=0 (22 passed)

Requested via Grok Work
Prompter: ACS
Session: 0d6e6161-ea08-44d8-898f-0cbd9be7838c

New creates a registry-pull service account, a role with only registry.pull,
and a pull secret for registry.deploys.app in the selected location. A
same-project image preselects that secret when the field is empty and the
location list already contains it.

Prompter: ACS
@deploys-app
deploys-app Bot temporarily deployed to pr-347 October 28, 2026 09:09 Destroyed
@deploys-app

deploys-app Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Preview deleted (PR closed).

New stays off the form when registry-pull is already in that location.

Prompter: ACS
The sentence describes the New button, so it follows the same gate: it stays hidden until the pull-secret list has settled, and it stays hidden when registry-pull is already in the selected location.

Prompter: ACS
serviceAccount.create reports a taken sid as "api: sid not available". New reads that account's roles and continues with it when they are empty or only registry-pull, and when that role is limited to registry.pull. Any other binding stops in an error modal and does not call role.bind.

Prompter: ACS
@acoshift
acoshift merged commit 528aa61 into main Oct 28, 2026
5 checks passed
@acoshift
acoshift deleted the deploy-registry-pull branch October 28, 2026 11:46
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.

1 participant