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

[Connectedk8s] Kubernetes distro and infra parameter and heuristics support #2620

Merged
merged 33 commits into from
Dec 9, 2020

Conversation

alphaWizard
Copy link
Contributor


This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

@azuresdkci
Copy link

If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR:

docker run -it mcr.microsoft.com/azure-cli:latest
export EXT=<NAME>
pip install --upgrade --target ~/.azure/cliextensions/$EXT "git+https://github.com/alphaWizard/azure-cli-extensions.git@distro-infra-feature#subdirectory=src/$EXT&egg=$EXT"

from azure.cli.core.commands.parameters import (file_type)
from azure.cli.core.commands.validators import get_default_location_from_resource_group

distribution_types = ["auto", "generic", "openshift", "rancher_RKE", "kind", "GKE", "EKS", "AKS", "AKS-HCI", "CAPZ", "AKS-engine", "TKG"]
infrastructure_types = ["auto", "generic", "azure", "AWS", "GCP", "Azure_Stack_HC", "Azure_Stack_Hub", "Azure_Stack_Edge", "vSphere"]

Copy link
Contributor Author

@alphaWizard alphaWizard Nov 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"auto" is default cli value, which triggers heuristics evaluation, Remaining are the enum values.

@@ -6,6 +6,8 @@

# pylint: disable=line-too-long

infrastructure_types = ["generic", "azure", "AWS", "GCP", "Azure_Stack_HC", "Azure_Stack_Hub", "Azure_Stack_Edge", "vSphere"]
Copy link
Contributor

@shashankbarsin shashankbarsin Nov 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use following values:

  • generic
  • Amazon Web Services
  • Google Cloud Platform
  • Microsoft Azure
  • Azure Stack Edge
  • Azure Stack Hub
  • Azure Stack HCI
  • VMware vSphere

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vSphere I'll check if we can differentiate between 6.x and 7.x by heuristics

from azure.cli.core.commands.parameters import (file_type)
from azure.cli.core.commands.validators import get_default_location_from_resource_group

distribution_types = ["auto", "generic", "openshift", "rancher_RKE", "kind", "GKE", "EKS", "AKS", "AKS-HCI", "CAPZ", "AKS-engine", "TKG"]
infrastructure_types = ["auto", "generic", "azure", "AWS", "GCP", "Azure_Stack_HC", "Azure_Stack_Hub", "Azure_Stack_Edge", "vSphere"]
Copy link
Contributor

@shashankbarsin shashankbarsin Nov 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use following values:

  • generic
  • Amazon Web Services
  • Google Cloud Platform
  • Microsoft Azure
  • Azure Stack Edge
  • Azure Stack Hub
  • Azure Stack HCI
  • VMware vSphere

Copy link
Contributor Author

@alphaWizard alphaWizard Nov 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One doubt, so if user is providing these values, he will have to type whole like "AmazonWebServices". Isn't it easy for user for type just --infrastructure AWS?. We can always add a logic wherever we want to display(like in portal) to transform from AWS to Amazon Web Services.

from azure.cli.core.commands.parameters import (file_type)
from azure.cli.core.commands.validators import get_default_location_from_resource_group

distribution_types = ["auto", "generic", "openshift", "rancher_RKE", "kind", "GKE", "EKS", "AKS", "AKS-HCI", "CAPZ", "AKS-engine", "TKG"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use following values:

  • Azure Kubernetes Service
  • Google Kubernetes Engine
  • Amazon Elastic Kubernetes Service
  • Rancher Kubernetes Engine
  • OpenShift Kubernetes Distribution
  • OpenShift Container Platform
  • K3s
  • kind
  • minikube
  • Cluster API Provider Azure
  • AKS Engine
  • Tanzu Kubernetes Grid
  • Canonical Charmed Kubernetes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should check if we can distinguish between OKD and OCP in above list.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also check if Docker for Mac/Windows has any cluster identifying characteristic in which case we can include that in the list as well

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 5, 2020

Connectedk8s

@alphaWizard alphaWizard marked this pull request as ready for review November 27, 2020 06:01
src/connectedk8s/setup.py Outdated Show resolved Hide resolved
@alphaWizard
Copy link
Contributor Author

@fengzhou-msft Review is done from the connectedk8s side. It is ready for checking in if you don't have any further reviews.

@alphaWizard
Copy link
Contributor Author

@fengzhou-msft Review is done from the connectedk8s side. It is ready for checking in if you don't have any further reviews.

@fengzhou-msft Gentle ping regarding this.

@fengzhou-msft fengzhou-msft merged commit 672e8c0 into Azure:master Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants