Skip to content
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

Rename annotations to cluster-annotations #198

Merged
merged 3 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charms/worker/k8s/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ bases:
architectures: [arm64]
config:
options:
annotations:
cluster-annotations:
type: string
default: ""
description: |
Annotations is a space separated list of (key/value) pairs) that can be
Space-separated list of (key/value) pairs) that can be
used to add arbitrary metadata configuration to the Canonical
Kubernetes cluster. For more information, see the upstream Canonical
Kubernetes documentation about annotations:
Expand Down
4 changes: 2 additions & 2 deletions charms/worker/k8s/src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def _configure_cos_integration(self):
self.collector.request(relation)

def _get_valid_annotations(self) -> Optional[dict]:
"""Fetch and validate annotations from charm configuration.
"""Fetch and validate cluster-annotations from charm configuration.

The values are expected to be a space-separated string of key-value pairs.

Expand All @@ -401,7 +401,7 @@ def _get_valid_annotations(self) -> Optional[dict]:
Raises:
ReconcilerError: If any annotation is invalid.
"""
raw_annotations = self.config.get("annotations")
raw_annotations = self.config.get("cluster-annotations")
if not raw_annotations:
return None

Expand Down
Loading