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

View version numbers of the providers #2171

Closed
wfernandes opened this issue Jan 27, 2020 · 10 comments · Fixed by #2948
Closed

View version numbers of the providers #2171

wfernandes opened this issue Jan 27, 2020 · 10 comments · Fixed by #2948
Assignees
Labels
area/clusterctl Issues or PRs related to clusterctl kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Milestone

Comments

@wfernandes
Copy link
Contributor

wfernandes commented Jan 27, 2020

User Story

As a [developer/user] I would like to see the version of the providers available and which ones are default.

Detailed Description

  1. clusterctl config providers doesn't provide the version number of the providers available.
    Yet as part of clusterctl init and clusterctl-settings.json we are asked to provide a version number.
    $ clusterctl config providers
    NAME                TYPE                     URL
    aws                 InfrastructureProvider   https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/latest/infrastructure-components.yaml
    cluster-api         CoreProvider             https://github.com/kubernetes-sigs/cluster-api/releases/latest/core-components.yaml
    docker              InfrastructureProvider   https://github.com/kubernetes-sigs/cluster-api-provider-docker/releases/latest/infrastructure-components.yaml
    kubeadm-bootstrap   BootstrapProvider        https://github.com/kubernetes-sigs/cluster-api/releases/latest/bootstrap-components.yaml
    vsphere             InfrastructureProvider   https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/latest/infrastructure-components.yaml
    
    Also in the help provided by other commands such as clusterctl config providers --help it suggests the use of version numbers like
    ...
    # Generates a yaml file for creating a Cluster API workload cluster using
    # specified version of the AWS infrastructure provider
    clusterctl config cluster my-cluster --infrastructure=aws:v0.4.1
    ...
    
    That's why it would be helpful to show the version number.
  2. It would also be nice to mark which ones are the default providers.

/kind feature
/area clusterctl

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. area/clusterctl Issues or PRs related to clusterctl labels Jan 27, 2020
@vincepri
Copy link
Member

+1, I'd probably also hide the URL, which is rather large

@wfernandes
Copy link
Contributor Author

+1, I'd probably also hide the URL, which is rather large

Yeah maybe that could be provided in the yaml output or a --output wide if necessary. But that's a longer term nice to have :)

@fabriziopandini
Copy link
Member

I would like to see the version of the providers available and which ones are default.

If we want to make it accessible the list of versions available for a provider, I propose to change
clusterctl config provider <provider> instead of clusterctl config providers because checking the version available for all the providers in a single operation can be an expensive operation.

clusterctl config provider <provider> already gets acces to the repository and it already shows the default version:

Name:               aws
Type:               InfrastructureProvider
URL:                https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/latest/infrastructure-components.yaml
Version:            v0.4.8
TargetNamespace:    capa-system
WatchingNamespace:
Variables:
  Name
  ----
  AWS_B64ENCODED_CREDENTIALS

This can be easily extended to get the list provider versions as well

it suggests the use of version numbers

This is optional; If the version is not specified, clusterctl pick the default one.

I'd probably also hide the URL

The url of the provider repository is important and I think it should remain accessible in the clusterctl config providers

@wfernandes
Copy link
Contributor Author

This is optional; If the version is not specified, clusterctl pick the default one.

I guess the UX I was going for was to see in the list which of the InfrastructureProviders is the default one. So in the list above, I don't know which one of aws, docker or vsphere InfrastructureProvider is the default.
As per the help in clusterctl config clusters,

  # Generates a yaml file for creating a Cluster API workload cluster using
  # default infrastructure provider and default bootstrap provider installed in the cluster.
  clusterctl config cluster my-cluster

Here, I'm not sure which is the default infrastructure provider until I've run the command.

@fabriziopandini
Copy link
Member

@wfernandes the list above is the list of known providers; the list of installed providers might vary cluster by cluster, and in most cases, there is only an infra provider --> the default one.

@ncdc ncdc added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Jan 29, 2020
@ncdc ncdc added this to the Next milestone Jan 29, 2020
@wfernandes
Copy link
Contributor Author

Another ask would be display if possible the contract version supported by the providers.
For example, if I try and install the following and run into this error.

$ clusterctl init --infrastructure=aws
Fetching providers
Error: installing provider "infrastructure-aws" can lead to a non functioning management cluster: the target version for the provider supports the v1alpha2 API Version of Cluster API (contract), while the management group is using v1alpha3

And then if I check the current/latest release, all I see is v0.4.9 which doesn't give me much insight. I would have to go to the release, download the infrastructure-components.yaml and then inspect it to confirm.

$ clusterctl config provider --infrastructure aws
Name:               aws
Type:               InfrastructureProvider
URL:                https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/latest/infrastructure-components.yaml
Version:            v0.4.9
TargetNamespace:    capa-system
WatchingNamespace:
Variables:
  - AWS_B64ENCODED_CREDENTIALS
Images:
  - us.gcr.io/k8s-artifacts-prod/cluster-api-aws/cluster-api-aws-controller:v0.4.9

@vincepri
Copy link
Member

@wfernandes any thoughts on this?

@wfernandes
Copy link
Contributor Author

I need to look into this some more since it has been a while. I can take a look into this and see if this is still necessary/applicable.
/assign

@vincepri
Copy link
Member

/milestone v0.3.x

@k8s-ci-robot k8s-ci-robot modified the milestones: Next, v0.3.x Apr 20, 2020
@wfernandes
Copy link
Contributor Author

After investigating I'm going to fix the output of clusterctl config provider -i aws.
The URL is technically incorrect for the same reasons as #2830.

Currently we display

URL:                https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/latest/infrastructure-components.yaml
Version:            v0.4.9

I'm thinking of splitting the URL and displaying a portion of it.

URL:                https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/
Version:            v0.4.9
File:               infrastructure-components.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clusterctl Issues or PRs related to clusterctl kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants