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

Kustomization migration assumes git creds is needed #6

Open
christianh814 opened this issue Jul 14, 2023 · 3 comments
Open

Kustomization migration assumes git creds is needed #6

christianh814 opened this issue Jul 14, 2023 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@christianh814
Copy link
Member

christianh814 commented Jul 14, 2023

Given the following GitRepository and Kustomization...

---
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
  name: gitops-examples
  namespace: flux-system
spec:
  interval: 1m0s
  ref:
    branch: main
  url: https://github.com/christianh814/gitops-examples
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: welcome-app
  namespace: flux-system
spec:
  interval: 10m0s
  path: ./welcome-k8s/overlays/default
  prune: true
  sourceRef:
    kind: GitRepository
    name: gitops-examples

The following command will fail

$ mta kustomization --name welcome-app
FATA[0000] gitrepositories.source.toolkit.fluxcd.io "welcome-app" not found 

This is because mta currently assumes that all repos require authentication

This should be changed to check to see if the Kustomization is using a public repo.

@MateSousa
Copy link

@christianh814 can you review #7 ??

@christianh814
Copy link
Member Author

Another issue with this type of config is that ApplicationSet is used for migration and that's not always the case. Probably need #4 in as well.

@christianh814
Copy link
Member Author

Possible solution is to use IsNotFound from k8s.io/apimachinery/pkg/api/errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants