Azure / AKS

Azure Kubernetes Service
https://azure.github.io/AKS/
1.97k stars 307 forks source link

[Question] - How to detect AKS in helm charts ? #3375

Open zioproto opened 1 year ago

zioproto commented 1 year ago

I need to extend an existing Helm chart, that needs to autodetect the target cluster is an AKS one. Example https://github.com/istio/istio/blob/fbb25467e9df6dc61fac0a3f6e43d9fac67909cc/manifests/charts/ztunnel/templates/daemonset.yaml#L117-L119

For GKE and EKS this is done using Helm Capabilities:

{{- if not (.Capabilities.KubeVersion.GitVersion | contains "-eks") }}

Because in GKE and EKS doing kubectl version returns a GitVersion object that has a string suffix -eks or -gke

In AKS the string is just the Kubernetes SemVer.

% kubectl version
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.4", GitCommit:"872a965c6c6526caa949f0c6ac028ef7aff3fb78", GitTreeState:"clean", BuildDate:"2022-11-09T13:28:30Z", GoVersion:"go1.19.3", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.2", GitCommit:"5db3654b1af9cc321ccd1371280a3ee4b124ba1e", GitTreeState:"clean", BuildDate:"2022-11-09T17:12:29Z", GoVersion:"go1.19.1", Compiler:"gc", Platform:"linux/amd64"}

In the above example I have GitVersion:"v1.25.2"

In GKE the version would be like: 1.21.3-gke.210 in EKS the version would be like: v1.18.9-eks-d1db3c

Question:

How to detect the cluster is AKS from the Helm capabilities ? https://helm.sh/docs/chart_template_guide/builtin_objects/

One possible idea is to be consistent with the other Cloud Providers is to add to the GitVersion a -aks suffix

Related issues

Related Stackoverflow questions

ghost commented 1 year ago

Action required from @Azure/aks-pm

ghost commented 1 year ago

Issue needing attention of @Azure/aks-leads

justindavies commented 1 year ago

@shashankbarsin any ideas on this?

ghost commented 1 year ago

Action required from @Azure/aks-pm

ghost commented 1 year ago

Issue needing attention of @Azure/aks-leads

ghost commented 1 year ago

Issue needing attention of @Azure/aks-leads

ghost commented 1 year ago

Issue needing attention of @Azure/aks-leads

ghost commented 1 year ago

Issue needing attention of @Azure/aks-leads

ghost commented 1 year ago

Issue needing attention of @Azure/aks-leads

eddycharly commented 1 year ago

Funky :)

ghost commented 1 year ago

Issue needing attention of @Azure/aks-leads

ghost commented 1 year ago

Issue needing attention of @Azure/aks-leads

ghost commented 1 year ago

Issue needing attention of @Azure/aks-leads

ghost commented 1 year ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 9 months ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 8 months ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 8 months ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 7 months ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 7 months ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 6 months ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 6 months ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 5 months ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 5 months ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 4 months ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 4 months ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 3 months ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 3 months ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 2 months ago

Issue needing attention of @Azure/aks-leads

evgenymo commented 2 months ago

@justindavies Any updates on this?

microsoft-github-policy-service[bot] commented 1 month ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 1 month ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 3 weeks ago

Issue needing attention of @Azure/aks-leads

microsoft-github-policy-service[bot] commented 6 days ago

Issue needing attention of @Azure/aks-leads

evgenymo commented 6 days ago

@zioproto Completed how?

zioproto commented 6 days ago

@evgenymo I closed the issue as completed because my original problem with Istio Ambient is now actually solved: https://github.com/istio/istio/issues/41917

However, you are right, this issue is not specifically related to Istio Ambient and there is no solution yet.

Are you blocked by this issue as well for developing an Helm chart ? If who is following this issue would be so kind to comment which Helm chart they are working on, this would help to prioritise this problem with the product team.

Thank you

evgenymo commented 5 days ago

@zioproto

Thanks for the clarification, i managed to find a way to identify AKS via other means but i still find it strange that: