Skip to content

Rework API to use a Kubernetes CRD #106

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
merged 1 commit into from
Jul 6, 2023
Merged

Conversation

cgwalters
Copy link
Collaborator

@cgwalters cgwalters commented Jul 4, 2023

I was working on the configmap support slowly, but a big issue
it raised was how we expose the ability to mutate things.

Our current "API" is just an imperative CLI. This would require
higher level tooling to manage Kubernetes style declarative system state.

Instead, let's use the really nice Rust kube crate to define a CRD;
this is what is output (in YAML form) via bootc status now.

We translate the imperative CLI verbs into changes to the spec
field.

However, things become more compelling when we offer a bootc edit
CLI verb that allows arbitrary changes to the spec.

I think this will become the only way to manage attached configmaps,
instead of having imperative CLI verbs like bootc configmap add etc.
At least to start.


@cgwalters cgwalters force-pushed the k8s-prep branch 2 times, most recently from 2a225ee to c23b6f6 Compare July 4, 2023 14:32
@cgwalters cgwalters force-pushed the k8s-prep branch 3 times, most recently from 0c4fda5 to 0535729 Compare July 6, 2023 06:42
@cgwalters
Copy link
Collaborator Author

/retest

I was working on the configmap support slowly, but a big issue
it raised was how we expose the ability to mutate things.

Our current "API" is just an imperative CLI.  This would require
higher level tooling to manage Kubernetes style declarative system state.

Instead, let's use the really nice Rust `kube` crate to define a CRD;
this is what is output (in YAML form) via `bootc status` now.

We translate the imperative CLI verbs into changes to the `spec`
field.

However, things become more compelling when we offer a `bootc edit`
CLI verb that allows arbitrary changes to the spec.

I think this will become the *only* way to manage attached configmaps,
instead of having imperative CLI verbs like `bootc configmap add` etc.
At least to start.

Signed-off-by: Colin Walters <[email protected]>
Copy link
Contributor

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

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

lgtm

@jmarrero jmarrero merged commit e851fbb into bootc-dev:main Jul 6, 2023
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