Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Add git directory generator #7

Merged
merged 19 commits into from Sep 8, 2020
Merged

Conversation

OmerKahani
Copy link
Contributor

@OmerKahani OmerKahani commented Jul 3, 2020

closes #12

Copy link
Contributor

@dgoodwin dgoodwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to me, but I am not familiar with the use of the argo git repo apiclient yet.

pkg/generators/git.go Outdated Show resolved Hide resolved
@OmerKahani OmerKahani mentioned this pull request Jul 13, 2020
@rtnpro
Copy link
Contributor

rtnpro commented Aug 25, 2020

What's the status with this pull request? Can I lend a hand here? cc @OmerKahani @dgoodwin

@OmerKahani
Copy link
Contributor Author

Hi @rtnpro, I stopped working on it because of #12 , give me a few more days to implement the solution and push it.
And then I could use your help, thanks for patience

@OmerKahani OmerKahani changed the title [WIP] add git directory generator Add git directory generator Sep 1, 2020
Copy link
Contributor

@dgoodwin dgoodwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, I had hoped to test but having some troubles just getting the appset controller running now.

pkg/generators/git.go Show resolved Hide resolved
pkg/generators/git_test.go Outdated Show resolved Hide resolved
pkg/generators/git_test.go Outdated Show resolved Hide resolved
pkg/generators/git.go Show resolved Hide resolved
pkg/generators/git_test.go Outdated Show resolved Hide resolved
pkg/services/repo_service.go Show resolved Hide resolved
Copy link
Contributor

@dgoodwin dgoodwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could I get a peek at the repo and ApplicationSet you're using for testing? I'm having some trouble getting this to work. After adding ConfigMap RBAC locally I keep getting no results from the g.repos.GetApps call:

time="2020-09-08T11:35:26Z" level=info msg="applications result from the repo service" allAps="[]" repoURL="https://github.com/dgoodwin/kube-gitops-apps.git" revision=master total=0
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: gitdirgen
spec:
  generators:
  - git:
      repoURL: https://github.com/dgoodwin/kube-gitops-apps.git
      revision: master
      directories:
      - path: generators/git/dirs/*
  template:
    metadata:
      name: '{{path.basename}}'
    spec:
      project: ""
      source:
        repoURL: https://github.com/dgoodwin/kube-gitops-apps.git
        targetRevision: HEAD
        path: '{{path}}'
      destination:
        server: SNIP
        namespace: kube-system

pkg/services/repo_service.go Show resolved Hide resolved
@OmerKahani
Copy link
Contributor Author

Could I get a peek at the repo and ApplicationSet you're using for testing? I'm having some trouble getting this to work. After adding ConfigMap RBAC locally I keep getting no results from the g.repos.GetApps call:

time="2020-09-08T11:35:26Z" level=info msg="applications result from the repo service" allAps="[]" repoURL="https://github.com/dgoodwin/kube-gitops-apps.git" revision=master total=0
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: gitdirgen
spec:
  generators:
  - git:
      repoURL: https://github.com/dgoodwin/kube-gitops-apps.git
      revision: master
      directories:
      - path: generators/git/dirs/*
  template:
    metadata:
      name: '{{path.basename}}'
    spec:
      project: ""
      source:
        repoURL: https://github.com/dgoodwin/kube-gitops-apps.git
        targetRevision: HEAD
        path: '{{path}}'
      destination:
        server: SNIP
        namespace: kube-system

I am using an helm application. ListApp only support helm / Ksonnet / Kustomize :(
https://github.com/argoproj/argo-cd/blob/aa2762a9b70edcc55756d20466a2dea21b2344b6/util/app/discovery/discovery.go#L11

@dgoodwin
Copy link
Contributor

dgoodwin commented Sep 8, 2020

Ahhh that is unfortunate. I will file an issue, it seems like something we should eventually try to support given the spec document.

Copy link
Contributor

@dgoodwin dgoodwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work.

@dgoodwin dgoodwin merged commit 11c59c0 into argoproj:master Sep 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling repo service
3 participants