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 gitops & metaphor repository names as flags for create #2193

Closed
1 of 2 tasks
alechp opened this issue Jun 9, 2024 · 4 comments
Closed
1 of 2 tasks

Add gitops & metaphor repository names as flags for create #2193

alechp opened this issue Jun 9, 2024 · 4 comments
Labels
feature Something new

Comments

@alechp
Copy link

alechp commented Jun 9, 2024

What is your feature idea?

Problem:

Gitops & metaphor repository names are hard-coded

Screenshot:
Screenshot 2024-06-09 at 3 39 23 PM

Solution:

  • Add --gitopsRepoName flag
  • Add --metaphorRepoName flag
  • Keep "gitops" & "metaphor" as sane defaults

Impacted files:

There might be more, just what I found off initial search

Why is it needed?

Why:

  • maintaining multiple gitops repos for different clouds/regions
  • maintaining associated metaphor repos for different clouds/regions
  • mitigating risk of deletion when working with deletes (eg. spinning up a gitops directory on my local github to test something and then stressing that cleanup commands could nuke something on organization's github if I'm not careful)

Is this missing feature preventing you from using kubefirst?

  • Yes

Code of Conduct

  • I agree to follow this project's Code of Conduct
@alechp alechp added the feature Something new label Jun 9, 2024
@alechp
Copy link
Author

alechp commented Jun 10, 2024

Started fork: https://github.com/alechp/kubefirst/tree/feat/repository-name-flags-for-digitalocean


Still failing here:
Screenshot 2024-06-09 at 5 42 50 PM

Happy to keep exploring. Pointers to save time would be nice

Inside gitShim/init.go I see Repositories[] being referenced & looped through to check whether the repositories exist:
Screenshot 2024-06-09 at 5 45 59 PM

Updated the newRepositories here:
Screenshot 2024-06-09 at 5 47 08 PM

Noticed that the success message has a hard-coded gitops/metaphor. Which makes sense, but don't think that would impact create
Screenshot 2024-06-09 at 5 49 46 PM

I am not setting the flag with Viper in flags.go, but from what I can tell that's not necessary...? Perhaps I'm wrong
Screenshot 2024-06-09 at 5 51 27 PM

I didn't define it in apiTypes.ClusterDefinition which might be the issue (not sure how this impacts gitShim, but maybe the check that throws is being done elsewhere):
Screenshot 2024-06-09 at 5 54 13 PM

@fharper
Copy link
Member

fharper commented Jun 25, 2024

Thanks for this feature suggestion @alechp. Could you split those in two issues please as they will need different work in different places. Mainly, the gitops one will require a lot more work since it's hardcoded in multiples places.

@alechp
Copy link
Author

alechp commented Jun 26, 2024

@fharper
Copy link
Member

fharper commented Jun 26, 2024

Thanks a lot, and sorry for the additional work 😅

Will close this one now.

@fharper fharper closed this as completed Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something new
Projects
Status: Done
Development

No branches or pull requests

2 participants