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

add back cluster auth #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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: 4 additions & 0 deletions dask_kubernetes/operator/controller/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
DaskJob,
DaskWorkerGroup,
)
from dask_kubernetes.common.auth import ClusterAuth
from dask_kubernetes.operator.networking import get_scheduler_address

_ANNOTATION_NAMESPACES_TO_IGNORE = (
Expand Down Expand Up @@ -245,6 +246,9 @@ def build_cluster_spec(name, worker_spec, scheduler_spec, annotations, labels):

@kopf.on.startup()
async def startup(settings: kopf.OperatorSettings, **kwargs):
# Authenticate with k8s
await ClusterAuth.load_first()

# Set server and client timeouts to reconnect from time to time.
# In rare occasions the connection might go idle we will no longer receive any events.
# These timeouts should help in those cases.
Expand Down