-
Notifications
You must be signed in to change notification settings - Fork 150
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
Set K8s distribution with Helm to simplify choosing container runtime socket #427
Set K8s distribution with Helm to simplify choosing container runtime socket #427
Conversation
Signed-off-by: Kate Goldenring <[email protected]>
Signed-off-by: Kate Goldenring <[email protected]>
Signed-off-by: Kate Goldenring <[email protected]>
deployment/helm/values.yaml
Outdated
# kubernetesDistro describes the Kubernetes distro Akri is running on. It is used to conditionally set | ||
# distribution specific values such as container runtime socket. | ||
kubernetesDistro: | ||
microk8s: false |
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.
i think i'd lean towards using kubernetesDistro==k8s | kubernetesDistro==microk8s | kubernetesDistro==k3s ... rather than kubernetesDistro.microk8s==true, etc.
seems like maybe a cleaner way to make sure one and only one distro is ever specified.
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.
I was worried about spelling but this makes sense. Changed it all!
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.
Should we default to some value? like if not set then k8s is picked.
Signed-off-by: Kate Goldenring <[email protected]>
Signed-off-by: Kate Goldenring <[email protected]>
Signed-off-by: Kate Goldenring <[email protected]>
My thought is no. It seems better to error and let them decide their distro. Otherwise slot reconciliation may not work. i know this is different from what we were doing but it would reduce the number of issues folks have with slot reconciliation errors. |
Signed-off-by: Kate Goldenring <[email protected]>
Associated documentation: project-akri/akri-docs#19 |
Signed-off-by: Kate Goldenring <[email protected]>
Please update the PR message with the updated design. |
{{- else if eq .Values.kubernetesDistro "k3s" }} | ||
path: "/run/k3s/containerd/containerd.sock" | ||
{{- else if eq .Values.kubernetesDistro "k8s" }} | ||
path: "/var/run/dockershim.sock" |
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.
What if folks use containerd instead of dockershim?
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.
then they can set agent.host.containerRuntimeSocket
to whatever they want
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.
The change in documentation should clarify that project-akri/akri-docs#19
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.
Would it make sense to then use k8s-dockershim to reduce confusion? Otherwise folks with containerd might be surprised why it is not working. Just FYI, AKS has transitioned from dockershim to containerd, the future lies with containerd, not dockershim.
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.
in that case i think it would be better to do the alternative i describe in the PR description. Namely, we would provide no kubernetesDistro=$DISTRO_NAME
and instead recommend how to set agent.host.containerRuntimeSocket
based on the distro. I think that would be better than providing multiple options per distro (k8s-containerd
, k8s-dockershim
, etc). @bfjelds and @romoh on thoughts?
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.
i would say have distro=k8s|k3s|etc ... then use whatever the distro default is (dockershim or containerd) ... and document that anything that doesn't follow the defaults can be supported iwth containerRuntimeSocket. though i also have no problem with k8s-dockershim|k8s-containerd|etc.
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.
I am going with brian's last comment and sticking with what we have here. If folks complain about wanting our k8s default changed, we can change it. And I'll make sure the documentation points out how to set it to containerd.
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.
Sounds good to me.
Signed-off-by: Kate Goldenring <[email protected]>
Signed-off-by: Kate Goldenring <[email protected]>
Signed-off-by: Kate Goldenring <[email protected]>
Signed-off-by: Kate Goldenring <[email protected]>
{{- else if eq .Values.kubernetesDistro "k3s" }} | ||
path: "/run/k3s/containerd/containerd.sock" | ||
{{- else if eq .Values.kubernetesDistro "k8s" }} | ||
path: "/var/run/dockershim.sock" |
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.
Sounds good to me.
What this PR does / why we need it:
Now that we have removed the need to specify a crictl path #418, all that needs to be set when installing Akri is the container runtime socket, which is set with
--set agent.host.containerRuntimeSock="/some/sock.sock
. This varies by distribution. To simplify installation and Kubernetes cluster setup, this proposes providing akubernetesDistro
value. Simply setkubernetesDistro=$DISTRO
, where$DISTRO
is eitherk3s
,microk8s
, ork8s
. The template will always preferenceagent.host.containerRuntimeSocket
if set. Chart throws the following error if no distribution nor socket are set:Please set container runtime socket by either selecting the appropriate K8s distro
kubernetesDistro=<k8s|k3s|microk8s>or setting
agent.host.containerRuntimeSocket=/container/runtime.sock. See https://docs.akri.sh/user-guide/cluster-setup for more information."
Alternatives:
If adding
kuberntesDistro
is more confusing than beneficial, just retain theagent.host.containerRuntimeSock
value and set it per usual in the docs, just renaming to be associated with container runtime. These docs will need to be modified to describe setting a distro during installation anyways.Docs to modify: PR project-akri/akri-docs#19
If applicable:
cargo fmt
)./version.sh
)