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

chore: add skaffold dev configuration #11980

Conversation

blakepettersson
Copy link
Member

@blakepettersson blakepettersson commented Jan 13, 2023

This adds a Skaffold configuration for quickly standing up an Argo CD for development purposes.

Signed-off-by: Blake Pettersson [email protected]

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • [ ] I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • [ ] I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.46%. Comparing base (f87897c) to head (732ac0e).
Report is 113 commits behind head on master.

❗ Current head 732ac0e differs from pull request most recent head 083ede0. Consider uploading reports for the commit 083ede0 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11980      +/-   ##
==========================================
- Coverage   49.73%   49.46%   -0.28%     
==========================================
  Files         274      274              
  Lines       48948    48771     -177     
==========================================
- Hits        24343    24123     -220     
- Misses      22230    22285      +55     
+ Partials     2375     2363      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@drpaneas drpaneas left a comment

Choose a reason for hiding this comment

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

I've tested it out and it works great. However, I did run into one small issue. It seems that the argocd namespace needs to be created before running Skaffold.

#41 DONE 2.7s
Build [quay.io/argoproj/argocd] succeeded
Tags used in deployment:
 - quay.io/argoproj/argocd -> quay.io/argoproj/argocd:d137b2680f58f7794c3aad39421cd62f49e55fe5ec3cf3e033f954d0be7c3924
Starting deploy...
Loading images into kind cluster nodes...
 - quay.io/argoproj/argocd:d137b2680f58f7794c3aad39421cd62f49e55fe5ec3cf3e033f954d0be7c3924 -> Loaded
Images loaded in 26.848 seconds
 - customresourcedefinition.apiextensions.k8s.io/applications.argoproj.io created
 - customresourcedefinition.apiextensions.k8s.io/applicationsets.argoproj.io created
 - customresourcedefinition.apiextensions.k8s.io/appprojects.argoproj.io created
 - clusterrole.rbac.authorization.k8s.io/argocd-application-controller created
 - clusterrolebinding.rbac.authorization.k8s.io/argocd-application-controller created
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
 - Error from server (NotFound): error when creating "STDIN": namespaces "argocd" not found
Cleaning up...
 - customresourcedefinition.apiextensions.k8s.io "applications.argoproj.io" deleted
 - customresourcedefinition.apiextensions.k8s.io "applicationsets.argoproj.io" deleted
 - customresourcedefinition.apiextensions.k8s.io "appprojects.argoproj.io" deleted
 - clusterrole.rbac.authorization.k8s.io "argocd-application-controller" deleted
 - clusterrolebinding.rbac.authorization.k8s.io "argocd-application-controller" deleted
kubectl apply: exit status 1

To make things even easier, you could either add this information to the documentation or include the creation of the argocd namespace as part of the Skaffold configuration.

Overall, this is fantastic work and I'm excited to see this get merged in. Great job!

docs/developer-guide/running-locally.md Outdated Show resolved Hide resolved
@blakepettersson
Copy link
Member Author

blakepettersson commented Feb 27, 2023

@drpaneas I added a make skaffold task which creates the argocd namespace if it doesn't already exist, WDYT?

@drpaneas
Copy link
Contributor

@drpaneas I added a make skaffold task which creates the argocd if it doesn't already exist, WDYT?

Good thinking. The next step would be to automate the installation of Skaffold as a binary, but I don't think this is required for this PR. It's already good enough in my opinion.

Copy link
Contributor

@drpaneas drpaneas left a comment

Choose a reason for hiding this comment

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

/lgtm

@drpaneas
Copy link
Contributor

@blakepettersson is there anything else needed here or can we merge? I like using this workflow and I think others will benefit as well. It's not breaking anything (no regressions) just adding additional (ease) functionality.

@blakepettersson
Copy link
Member Author

In the contributors meeting two weeks ago, @crenshaw-dev and @jannfis were concerned about having yet another way of running Argo CD in dev. Before merging the core committers would like to be aligned on how to run Argo in dev, and then commit to it. It could very well be Skaffold; I had promised to give a demo on one of these contributor meetings to show the other committers how nice it is to run but I haven't had the time.

I could potentially give a demo tomorrow but I don't think it'll be too likely I'll have the time. If not then, I'll set time for next week's contributor meeting to give this a spin.

@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch from 2ec741f to c9975db Compare March 22, 2023 18:26
@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch 2 times, most recently from 4121a26 to 533824f Compare May 8, 2023 13:53
@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch 2 times, most recently from d6ef7bb to 23eac50 Compare May 30, 2023 16:10
@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch from 23eac50 to 31dcaa9 Compare June 2, 2023 12:19
@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch from 31dcaa9 to c95fe13 Compare June 14, 2023 18:59
@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch 2 times, most recently from b48f95a to 98dc48c Compare June 27, 2023 19:37
@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch from 98dc48c to f80c369 Compare July 18, 2023 14:53
@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch from f80c369 to 8735f5b Compare July 27, 2023 20:37
@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch 2 times, most recently from 7140df4 to 0d4c415 Compare September 2, 2023 13:41
@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch from 0d4c415 to 32cbf82 Compare September 25, 2023 15:13
@blakepettersson blakepettersson requested review from a team as code owners September 25, 2023 15:13
@blakepettersson blakepettersson marked this pull request as draft December 5, 2023 11:26
@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch from 32cbf82 to d8b8b54 Compare December 5, 2023 11:29
@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch 2 times, most recently from cfd1938 to d5794f8 Compare January 25, 2024 11:45
@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch from d5794f8 to 993169f Compare February 16, 2024 23:46
@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch from 94562a6 to a93f05d Compare March 1, 2024 17:38
@blakepettersson blakepettersson force-pushed the chore/add-skaffold-config branch 2 times, most recently from a97c383 to 732ac0e Compare March 25, 2024 10:50
blakepettersson and others added 7 commits April 30, 2024 13:13
This adds a Skaffold configuration for quickly standing up an Argo CD for
development purposes.

Signed-off-by: Blake Pettersson <[email protected]>
This makes sure the argocd-server is running in insecure mode locally.

Signed-off-by: Blake Pettersson <[email protected]>
Co-authored-by: Panagiotis Georgiadis <[email protected]>
Signed-off-by: Blake Pettersson <[email protected]>
Kustomize doesn't currently (or at least smoothly) create namespaces
if one doesn't already exist, so let's add a make task to wrap
`skaffold dev` along with creating a namespace if one doesn't already
exist.

Signed-off-by: Blake Pettersson <[email protected]>
Signed-off-by: Blake Pettersson <[email protected]>
Signed-off-by: Blake Pettersson <[email protected]>
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.

2 participants