Repository navigation
config: Add versioned operator configuration through a CRD - #203
Open
HarshwardhanPatil07 wants to merge 14 commits into
Open
HarshwardhanPatil07 wants to merge 14 commits into
HarshwardhanPatil07 wants to merge 14 commits into
Conversation
HarshwardhanPatil07
requested review from
Johan-Liebert1,
alicefr,
cheesesashimi,
jbtrystram and
ptalgulk01
September 29, 2026 10:38
Collaborator
|
I personally prefer a new CRD over a configmap. Mostly for 2 reasons, first it is versioned, secondly eventually we could use the crd status for reporting the operator status. The second point right now isn't used so the motivation isn't that strong. I'd love also @cheesesashimi's opinion |
HarshwardhanPatil07
force-pushed
the
issue-92-configmap-config
branch
from
September 30, 2026 09:52
3f7612f to
abb529e
Compare
HarshwardhanPatil07
force-pushed
the
issue-92-configmap-config
branch
5 times, most recently
from
September 30, 2026 11:24
16f3e66 to
19361d9
Compare
Member
Author
|
updated PTAL |
alicefr
reviewed
Oct 2, 2026
alicefr
reviewed
Oct 2, 2026
alicefr
reviewed
Oct 2, 2026
|
|
||
| // TestOperatorConfig changes shared operator configuration and must remain | ||
| // serial. Run it on a dedicated test cluster, like the other lifecycle tests. | ||
| func TestOperatorConfig(t *testing.T) { |
Collaborator
There was a problem hiding this comment.
Is this test really necessary, it adds a lot of complexity for little gain imo. Cannot we cover with unit test?
Collaborator
|
We should also probably generate a cr as part of the release with some good defaults. This is at least how kubevirt is doing it |
HarshwardhanPatil07
force-pushed
the
issue-92-configmap-config
branch
6 times, most recently
from
October 6, 2026 07:48
bfbeb93 to
e2740b9
Compare
Member
Author
|
PTAL |
alicefr
reviewed
Oct 6, 2026
| resources: | ||
| - bootcoperatorconfigs | ||
| verbs: | ||
| - list |
Collaborator
|
@HarshwardhanPatil07 it looks great many thanks for doing this. Few last comment and this requires a rebase |
Give administrators a typed cluster-scoped API for controller and daemon settings without editing workloads. Keep naming flexible; startup selection enforces that only one instance is used. Refs: bootc-dev#92 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
Prove API-server defaulting and rejection of invalid period, type, and field values before the startup path depends on the resource. Refs: bootc-dev#92 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
Preserve existing CLI behavior while allowing administrators to supply defaults through the resource. Explicit false values and fractional CLI durations continue to take precedence. Refs: bootc-dev#92 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
Read the administrator resource before informer caches exist. Treat missing CRDs, permission failures, API errors, and multiple instances as actionable startup errors while an absent instance keeps defaults. Refs: bootc-dev#92 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
Exercise absent, custom-named, updated, conflicting, and missing-CRD resources through envtest so the loader behavior is covered beyond mocked HTTP responses. Refs: bootc-dev#92 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
Make registry policy and tag resolution configurable on controller startup without changing explicit CLI overrides. Grant its service account only the list permission needed to select the singleton. Refs: bootc-dev#92 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
Let each daemon load the same administrator-owned resource at startup while preserving explicit CLI overrides. Give the daemon service account the list permission needed for the read. Refs: bootc-dev#92 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
Bink needs local registry settings at the controller first startup. Wait for the CRD, create or update the one resource, then deploy; preserve the redeploy restart that refreshes the latest image. Refs: bootc-dev#92 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
The release upgrade test temporarily removes current CRDs, which also deletes configuration. Snapshot and restore the optional resource during cleanup and restart workloads so later tests observe the original settings. Refs: bootc-dev#92 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
Give administrators a concrete example and document the single-instance rule, CLI precedence, manual restarts, and upgrade-safe ownership before they adopt the new API. Refs: bootc-dev#92 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
Helm does not upgrade CRDs in the chart automatically. Explain how to establish the new CRD before workloads restart and read the optional configuration. Refs: bootc-dev#92 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
Provide an editable example without putting an administrator-owned instance into install.yaml, so routine installs and upgrades cannot overwrite configuration. Refs: bootc-dev#92 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
Keep the downloadable example aligned with API defaults and ensure install.yaml ships the CRD without creating a configuration instance. Run the checks on every PR. Refs: bootc-dev#92 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
Make the versioned API discoverable alongside each release. Validate both assets before publishing and direct administrators to check for an existing instance before applying the example. Refs: bootc-dev#92 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
HarshwardhanPatil07
force-pushed
the
issue-92-configmap-config
branch
from
October 9, 2026 10:15
e2740b9 to
7a4ebda
Compare
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Administrators currently need to edit operator workload arguments to change settings and preserve those edits during upgrades. Add an optional, administrator-owned, cluster-scoped
BootcOperatorConfigusing the versionednode.bootc.dev/v1alpha1API. The resource may have any valid Kubernetes name, but the controller and daemon require at most one instance at startup.The API exposes controller insecure-registry policy and image-tag resolution period, plus the daemon fallback status-poll period. Kubernetes validates types and positive whole-second periods. Both processes make one bounded, uncached list request at startup: zero instances use existing defaults, one supplies settings, and multiple instances or API errors stop startup with a contextual error. Explicit CLI flags take precedence, including
falseand fractional durations. Changes require a manual restart of the affected workload. Both service accounts receive onlylistpermission for this resource.The bink workflow now installs the CRD, waits for it, creates or updates its local-registry configuration, and only then deploys workloads. Install and Helm manifests include the CRD and permissions without creating or overwriting administrator configuration. Releases publish an optional, editable
operator-config.yamlseparately frominstall.yaml. Documentation covers precedence, restarts, revert and upgrade behavior, and Helm CRD upgrade ordering. Live updates, operator status reporting, and feature gates from #181 remain deferred.Closes #92.