Skip to content

Commit

Permalink
Rename annotations to cluster-annotations (#198)
Browse files Browse the repository at this point in the history
* Rename annotations to cluster-annotations

---------

Co-authored-by: Adam Dyess <[email protected]>
  • Loading branch information
berkayoz and addyess authored Dec 3, 2024
1 parent 638de69 commit b4a17c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit b4a17c5

Please sign in to comment.