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

Add a GitRepository source, from the current open Git Repo in VS Code to a AKS Cluster #103

Closed
murillodigital opened this issue Oct 8, 2021 · 4 comments
Assignees
Labels
Azure Azure related issues (AKS / Azure Arc) feature New feature request git Issues related to git source control or git repository source

Comments

@murillodigital
Copy link
Contributor

murillodigital commented Oct 8, 2021

Please note that the UX and UI for this feature should be closely related to that implemented in #104.

The az command below requires the following command line properties to be dynamically passed given the cluster's configuration:

  • -n the unique name for this Flux configuration
  • -g the name of the Resource Group where the AKS cluster was created
  • -c the name of the AKS Cluster as defined in Azure. This name is usually the name of the context in the kubectl configuration, also shown for cluster name under Clusters
  • --subscription the name or ID of the Azure subscription that owns the resource group.
az k8s-configuration flux create \
    -g <Resource_Group_of_Cluster> -c <Name_of_Cluster> -t managedClusters \
    -n <Unique_Flux_Configuration_Name> --scope cluster \
    -u <URL for GitRepository> --branch <Branch for Git Repository>

Note that, as implemented in #104, the URL as well as branch of the repo should be implied from the local git clone that the user is performing this action on.

The values for -g, -c and --subscription should be automatically filled if the user has already provided them.

@usernamehw
Copy link
Collaborator

For some reason command doesn't work without the confirmation:

az k8s-configuration flux create -g vscode-gitops-development -c aks-development -t managedClusters -n idk2 --scope cluster -u https://github.com/murillodigital/sample-k8s --branch main

Running in the Output View (shelljs)

ERROR: Unable to prompt for confirmation as no tty available. Use --yes.

Running in the terminal:

Warning! No kustomizations were specified for this configuration. The specified source may not be applied to the cluster.
Are you sure you want to proceed without any kustomizations? (y/n): Terminate batch job (Y/N)?

Running with the --yes

az k8s-configuration flux create -g vscode-gitops-development -c aks-development -t managedClusters -n idk2 --scope cluster -u https://github.com/murillodigital/sample-k8s --branch main --yes
az --yes k8s-configuration flux create -g vscode-gitops-development -c aks-development -t managedClusters -n idk2 --scope cluster -u https://github.com/murillodigital/sample-k8s --branch main
az k8s-configuration flux create --yes -g vscode-gitops-development -c aks-development -t managedClusters -n idk2 --scope cluster -u https://github.com/murillodigital/sample-k8s --branch main

unrecognized arguments: --yes

unrecognized arguments: --yes -g vscode-gitops-development -c aks-development -t managedClusters -n idk2 --scope cluster -u https://github.com/murillodigital/sample-k8s --branch main

unrecognized arguments: --yes

@usernamehw
Copy link
Collaborator

@murillodigital Maybe you know if it's possible to run this command without the confirmation prompt?

az k8s-configuration flux create -g vscode-gitops-development -c aks-development -t managedClusters --subscription 6bf943cd-75d6-4e1c-b2bf-b8691841d4ae -n idk2 --scope cluster -u https://github.com/murillodigital/sample-k8s --branch main

@murillodigital
Copy link
Contributor Author

@usernamehw let me try this out and raise to the MSFT folks to see if they know whatsup

@murillodigital
Copy link
Contributor Author

@usernamehw see #130 and #133 as these specs will impact the implementation being those in this ticket.

@usernamehw usernamehw added the git Issues related to git source control or git repository source label Nov 17, 2021
@usernamehw usernamehw added the Azure Azure related issues (AKS / Azure Arc) label Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure Azure related issues (AKS / Azure Arc) feature New feature request git Issues related to git source control or git repository source
Projects
None yet
Development

No branches or pull requests

2 participants