Skip to content

charmcraft: mark non-required endpoints as optional#944

Open
rpbritton wants to merge 2 commits into
canonical:mainfrom
rpbritton:mark-optional-endpoints
Open

charmcraft: mark non-required endpoints as optional#944
rpbritton wants to merge 2 commits into
canonical:mainfrom
rpbritton:mark-optional-endpoints

Conversation

@rpbritton

@rpbritton rpbritton commented Jun 4, 2026

Copy link
Copy Markdown

Adds optional: true to endpoints that the charm handles gracefully without a relation and that are not part of the recommended deployment.

Not marked optional: k8s-cluster (provides, k8s) and cluster (requires, k8s-worker) - these are part of the standard multi-node setup or cause BlockedStatus when absent.

rpbritton added 2 commits June 4, 2026 12:51
All provides endpoints on k8s and all provides/requires endpoints on
k8s-worker (except cluster) are genuinely optional - the charm handles
their absence gracefully without blocking:

k8s (charms/worker/k8s/charmcraft.yaml):
- provides: cos-agent, cos-worker-tokens, containerd, ceph-k8s-info,
  k8s-cluster, kube-control
- requires: aws, azure, etcd, external-cloud-provider, gcp,
  external-load-balancer

k8s-worker (charms/worker/charmcraft.yaml):
- provides: cos-agent
- requires: aws, azure, cos-tokens, containerd, gcp

cluster (requires on k8s-worker) is intentionally not marked optional
as _join_cluster raises BlockedStatus when it is absent.
k8s-cluster is the primary worker attachment endpoint and is part of
the recommended deployment. Marking it optional would incorrectly signal
to users that running without workers is the norm.
@rpbritton rpbritton force-pushed the mark-optional-endpoints branch from c0c59c6 to a4e5f5e Compare June 4, 2026 18:51
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.

1 participant