Automate more of the Kubernetes hosting experience #8426
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR simplifies the procedure of using the
Microsoft.Orleans.Hosting.Kubernetes
package by automating more of the process. With this PR, users will no longer need to specify labels or environment variables in their pod specs.It manages this by:
Environment.MachineName
if not configured via env vars/var/run/secrets/kubernetes.io/serviceaccount/namespace
if not configured via env varsServiceId
&ClusterId
if they are not configured via labelsAdditionally, it filters out non-
Active
members when performing the on-start purge of unmatched silos. This prevents a race that exists today.It adds retries to initialization and demotes the Error-level log when Kubernetes drops a watch to Debug (it's not actionable, is common/normal, and is retried indefinitely)
Patching the pod resource (to update labels for discovery) requires the
patch
verb on the pod's role binding. The package will spit out a log line with an example binding if it receives a permissions error trying to list/get/patch podsMicrosoft Reviewers: Open in CodeFlow