Skip to content

feat: make the shared image pull secret configurable - #703

Open
Matthiator wants to merge 1 commit into
mainfrom
optional-image-pull-secret
Open

Matthiator wants to merge 1 commit into
mainfrom
optional-image-pull-secret

Conversation

@Matthiator

@Matthiator Matthiator commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Some projects do not want a shared image pull secret distributed to every namespace, or simply have no registry credentials to configure.

Add clusters[].imagePullSecretName: empty disables the shared pull secret, a name overrides it, and omission preserves image-pull-secret. Bootstrap and local OpenBao respect the setting; docs explain optional credentials.

Change type

  • CLI or Go code
  • Documentation
  • Tests or CI
  • Refactor or cleanup

Breaking change

  • This changes existing behaviour. I explained the migration or impact above.

How I tested it

  • go test ./internal/config ./internal/cmd/bootstrap ./internal/envconfig ./internal/cmd/generate
  • Built the CLI and checked generation with updated catalogs, including hub/spoke configurations and invalid-name rejection.
  • mkdocs build --strict; no live bootstrap tested.

Notes for reviewers

Companion catalogs: kubara-io/catalogs#290 (required to omit generated references). Existing configurations retain their default behavior.

@tuunit
tuunit force-pushed the optional-image-pull-secret branch from bdf7ed6 to 1ae0212 Compare November 10, 2026 20:12

@tuunit tuunit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Matthiator I just merged the refactor for libkubara introducing kubebuilder and controller-runtime as building blocks for the kubara internals therefore your open PR was full of conflicts. I fixed it and changed your implementation to adhere to the new way of defining types.

Further we want to introduce a global config or options field to the clusters which would probably be the better place for your new field to live. Therefore I'll keep the PR open for another 2 weeks or so

Networking ClusterNetworking `json:"networking,omitempty"`

// Image Pull Secret Name,description=Shared registry secret name.
// +kubebuilder:validation:Pattern=`^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this be just fine?

Suggested change
// +kubebuilder:validation:Pattern=`^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
// +kubebuilder:validation:Pattern=`^$|^[-a-z0-9]{1,63}$`

This branch has not been deployed

No deployments
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