-
Notifications
You must be signed in to change notification settings - Fork 5
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
Implement k8s
clustering
#15
Conversation
charms/k8s/src/charm.py
Outdated
if self.unit.is_leader(): | ||
self._bootstrap_k8s_snap() | ||
self._enable_components() | ||
self._create_cluster_tokens() | ||
else: | ||
self._join_cluster() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️
4fc25a1
to
8286831
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking so nice... a few questions still
@on_error(WaitingStatus("Waiting for Cluster token"), TypeError) | ||
def _join_cluster(self): | ||
"""Retrieve the join token from secret databag and join the cluster.""" | ||
if self.api_manager.is_cluster_bootstrapped(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100% LGTM
Overview
Implement the Join Cluster process for
k8s
charm units.Rationale
This pull request introduces the implementation for joining multiple control plane units into the cluster via the
cluster
peer relation. This relation utilizes Juju secrets for distributing the cluster join tokens over the relation data.Juju Events Changes
create_cluster_tokens
andjoin_cluster
).