Repository navigation
config: Add versioned operator configuration through a CRD #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
alicefr
merged 15 commits into
bootc-dev:main
from
HarshwardhanPatil07:issue-92-configmap-config
Nov 12, 2026
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c63f3a8
api: Add versioned operator configuration resource
HarshwardhanPatil07 639b0c6
api: Test omitted settings and schema validation
HarshwardhanPatil07 dd19835
config: Give resource fields precedence over CLI flags
HarshwardhanPatil07 cc43155
config: Load one resource directly from the API at startup
HarshwardhanPatil07 2254ba8
config: Test startup selection against an API server
HarshwardhanPatil07 cb3fe91
controller: Read operator configuration before manager startup
HarshwardhanPatil07 0f10714
daemon: Read fallback poll period before manager startup
HarshwardhanPatil07 d8e6e3c
dev: Apply bink registry settings after Helm install
HarshwardhanPatil07 c902d14
test: Verify configuration startup and upgrade recovery
HarshwardhanPatil07 d6e2b63
docs: Explain applying and reverting operator configuration
HarshwardhanPatil07 892fc84
helm: Support administrator-owned operator configuration
HarshwardhanPatil07 af7bf94
release: Generate a separate operator configuration asset
HarshwardhanPatil07 1afef1c
release: Verify generated configuration assets in CI
HarshwardhanPatil07 8a67b18
release: Publish the optional configuration example
HarshwardhanPatil07 98252e3
build: Require Go 1.26.11 for the HTTP security fix
HarshwardhanPatil07 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package v1alpha1 | ||
|
|
||
| import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
|
|
||
| const ( | ||
| // DefaultTagResolutionPeriodSeconds is the default interval between resolving image tags. | ||
| DefaultTagResolutionPeriodSeconds int32 = 300 | ||
|
|
||
| // DefaultStatusPollPeriodSeconds is the default interval between fallback bootc status polls. | ||
| DefaultStatusPollPeriodSeconds int32 = 300 | ||
| ) | ||
|
|
||
| // OperatorControllerConfig configures the operator controller at startup. | ||
| type OperatorControllerConfig struct { | ||
| // allowInsecureRegistry allows falling back to HTTP when accessing image | ||
| // registries. Enable this only for trusted registries that do not support TLS. | ||
| // +optional | ||
| AllowInsecureRegistry *bool `json:"allowInsecureRegistry,omitempty"` | ||
|
|
||
| // tagResolutionPeriodSeconds is the interval in seconds between resolving | ||
| // image tags to digests. When omitted, use the CLI value or 300 seconds. | ||
| // +optional | ||
| // +kubebuilder:validation:Minimum=1 | ||
| TagResolutionPeriodSeconds *int32 `json:"tagResolutionPeriodSeconds,omitempty"` | ||
|
|
||
| // pullSecretNamespaces lists extra namespaces whose Secrets may be referenced | ||
| // by pools. The operator namespace is always allowed. Omission preserves CLI | ||
| // settings; an empty list allows no extras. Administrators must grant Secret get/list/watch access | ||
| // in each extra namespace separately. Changes require a controller restart. | ||
| // +optional | ||
| // +listType=set | ||
| // +kubebuilder:validation:items:MaxLength=63 | ||
| // +kubebuilder:validation:items:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$` | ||
| PullSecretNamespaces []string `json:"pullSecretNamespaces,omitzero"` | ||
| } | ||
|
|
||
| // OperatorDaemonConfig configures each node daemon at startup. | ||
| type OperatorDaemonConfig struct { | ||
| // statusPollPeriodSeconds is the interval in seconds between bootc status | ||
| // polls when filesystem notifications are unavailable. When omitted, use the | ||
| // CLI value or 300 seconds. | ||
| // +optional | ||
| // +kubebuilder:validation:Minimum=1 | ||
| StatusPollPeriodSeconds *int32 `json:"statusPollPeriodSeconds,omitempty"` | ||
| } | ||
|
|
||
| // BootcOperatorConfigSpec defines operator settings consumed at process startup. | ||
| // Restart the affected controller or daemon pods after changing these settings. | ||
| type BootcOperatorConfigSpec struct { | ||
| // controller configures the controller. Omitted settings use CLI values or built-in defaults. | ||
| // +optional | ||
| // +kubebuilder:default={} | ||
| Controller *OperatorControllerConfig `json:"controller,omitempty"` | ||
|
|
||
| // daemon configures all node daemons. Omitted settings use CLI values or built-in defaults. | ||
| // +optional | ||
| // +kubebuilder:default={} | ||
| Daemon *OperatorDaemonConfig `json:"daemon,omitempty"` | ||
| } | ||
|
|
||
| // +kubebuilder:object:root=true | ||
| // +kubebuilder:resource:scope=Cluster | ||
|
|
||
| // BootcOperatorConfig configures the controller and node daemons in a cluster. | ||
| // The optional resource is administrator-owned and may have any valid name. | ||
| // The operator rejects multiple configurations at startup. Changes take effect | ||
| // when the affected pods restart; supplied fields take precedence over CLI flags. | ||
| type BootcOperatorConfig struct { | ||
| metav1.TypeMeta `json:",inline"` | ||
|
|
||
| // metadata is standard object metadata. | ||
| // +optional | ||
| metav1.ObjectMeta `json:"metadata,omitzero"` | ||
|
|
||
| // spec defines the configuration consumed when operator processes start. | ||
| // +required | ||
| Spec BootcOperatorConfigSpec `json:"spec"` | ||
| } | ||
|
|
||
| // +kubebuilder:object:root=true | ||
|
|
||
| // BootcOperatorConfigList contains a list of BootcOperatorConfig. | ||
| type BootcOperatorConfigList struct { | ||
| metav1.TypeMeta `json:",inline"` | ||
| metav1.ListMeta `json:"metadata,omitzero"` | ||
| Items []BootcOperatorConfig `json:"items"` | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.