Skip to content

Rework API to use a Kubernetes CRD - #106

Merged
jmarrero merged 1 commit into
bootc-dev:mainfrom
cgwalters:k8s-prep
Jul 6, 2023
Merged

jmarrero merged 1 commit into
bootc-dev:mainfrom
cgwalters:k8s-prep

Conversation

@cgwalters

@cgwalters cgwalters commented Jul 4, 2023 •

Copy link
Copy Markdown
Member

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
Copy Markdown
Member 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]>

@jmarrero jmarrero 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.

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