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

Arlon cli context management support #52

Open
chinmaykolhatkar opened this issue Jun 1, 2022 · 3 comments
Open

Arlon cli context management support #52

chinmaykolhatkar opened this issue Jun 1, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request Needs Review For all new issues that are unplanned, have no milestone or project. size:L UX
Milestone

Comments

@chinmaykolhatkar
Copy link
Collaborator

chinmaykolhatkar commented Jun 1, 2022

Currently arlon cli interacted with 3 entities:

  1. Git repo
  2. ArgoCD Server
  3. K8s API Server of Management Cluster

It would be very beneficial to have a context management similar to how its done by argocd cli.
A context can be defined as combination of git repo (with credentials if there), ArgoCD Server connection information, k8s API Server connection information.

All the information about multiple contexts can be saved in ~/.arlon folder on user machine.

User should be able to perform following activities with the contexts:

  1. Create new contexts
  2. Delete contexts
  3. Shift between contexts
  4. Renew tokens in the context (good to have)

Once a context is set by the user, the individual commands having parameters about above 3 (git, k8s, argocd) can be treated as optional. If present, they override the set context.

Commands can be see as follows:

  1. Create new context
    arlon context add <new_context_name> --argocd-server <argocd_addr> --gitrepo .....

  2. Delete context
    arlon context delete <context_name>

  3. Shift between context
    arlon context set <context_name>

  4. Impact of other commands because of context. Below given is an example command:
    arlon create clusterspec [--context <context_to_use>] [--gitrepo <repo url>]..
    Notice in above command that git repo and context are optional parameters. Individual command to retrieve the git repo in following order:
    a. overridden param in command
    b. context present in the command
    c. command set globally
    Similarly do the same for argocd server & mgmt cluster also.

Aha! Link: https://pf9.aha.io/features/ARLON-164

@cre8minus1 cre8minus1 added this to the 0.9.0 milestone Jun 3, 2022
@cre8minus1
Copy link
Member

@bcle who can scope this work?

@cruizen
Copy link
Member

cruizen commented Jul 6, 2022

@jayanth-tjvrr has implemented this (context management) in ArlonCtl (closed source CLI) as part of the PMK integration in v0.3 since it's especially useful when switching between multiple PMK DUs.

@bcle bcle modified the milestones: 0.9.0, 0.10.0 Jul 6, 2022
@bcle
Copy link
Collaborator

bcle commented Jul 7, 2022

Can you label this with a t-shirt size?

@jayanth-tjvrr jayanth-tjvrr removed their assignment Sep 27, 2022
@cruizen cruizen modified the milestones: 0.10.0, 0.11.0 Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Needs Review For all new issues that are unplanned, have no milestone or project. size:L UX
Projects
Status: No status
Development

No branches or pull requests

5 participants