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

36/wego add command #106

Merged
merged 74 commits into from
May 6, 2021
Merged

36/wego add command #106

merged 74 commits into from
May 6, 2021

Conversation

jrryjcksn
Copy link
Contributor

Provides a first cut of wego add.

  • Creates wego repo if not present
  • Installs Application CRD, source controller, kustomize controller, and GitHub secret for wego repo into cluster
  • Installs GitHub secret plus source and kustomize controllers into wego repo for newly added repo

`

// Will move into filesystem when we store wego infrastructure in git
const appCRD = `apiVersion: apiextensions.k8s.io/v1beta1
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you are creating a crd here, should we then create the story to start implementing the wego controller?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can, but I'm still not sure what to put in it yet. I had the choice to either tell flux to ignore app.yaml or turn it into a CRD so that flux wouldn't fail on it. I figured I'd go ahead and make the CRD now...

Copy link
Contributor

Choose a reason for hiding this comment

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

The way I see could be like: wego add only drops the app.yaml there and nothing more, it would be the controller's responsibility to create the source and kustomization|helm custom resources, as a default behavior. That way we kinda abstract away flux entirely. In case the user decides they want more control, we would allow them to override the flux crs, by dropping them into the repo.

for now, we can keep the command adding those flux crs so we have a working command, but as soon we have the controller in place we could let the controller manage them.

cc @palemtnrider

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense to me. In particular, we can consult the app.yaml to determine which controllers a particular app needs

@jrryjcksn jrryjcksn marked this pull request as ready for review May 5, 2021 13:46
Copy link
Contributor

@josecordaz josecordaz left a comment

Choose a reason for hiding this comment

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

LGTM

@jrryjcksn jrryjcksn merged commit 3e57137 into main May 6, 2021
@jrryjcksn jrryjcksn deleted the 36/wego-add-command branch May 6, 2021 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants