Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crenshaw-dev/executor-plugins-demo
Demo of an Argo Workflows executor plugin diffing an Argo CD app and writing the diff as a GitHub PR comment
https://github.com/crenshaw-dev/executor-plugins-demo
Last synced: 25 days ago
JSON representation
Demo of an Argo Workflows executor plugin diffing an Argo CD app and writing the diff as a GitHub PR comment
- Host: GitHub
- URL: https://github.com/crenshaw-dev/executor-plugins-demo
- Owner: crenshaw-dev
- Created: 2022-11-06T18:27:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-16T18:33:41.000Z (almost 2 years ago)
- Last Synced: 2023-03-04T04:56:49.326Z (over 1 year ago)
- Size: 16.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Argo Workflows Executor Plugin Demo
Demo of an Argo Workflows executor plugin diffing an Argo CD app and writing the diff as a GitHub PR comment
## Setup
```shell
kubectl create namespace argocd
kubectl create namespace argo
kubectl create namespace argo-events
kubectl apply -k .
# Give it a few seconds to install, then get the initial admin password:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
```In a different terminal, start port-forwarding. Then open http://localhost:8080 in your browser.
Log in using the username `admin` and the password retrieved above.```shell
kubectl port-forward svc/argocd-server -n argocd 8080:443
```Create a GitHub API token. Grant it read/write access on pull requests and read access on webhooks.
Create a secret with the token:
```shell
# Copy your token to the clipboard, then write it to a file:
pbpaste > token
```Configure a webhook to point to `https:///push`.
* Use Content type `applicaton/json`
* Create a new, secure secret and write it to a file called `secret` (`pbpaste > secret`)
* Disable SSL verification - this is a demo, so we're not using a real certificate
* Only enable Pull request events```shell
kubectl create secret generic github-access --from-file secret -n argo-events
kubectl create secret generic github-token --from-file token -n argo
``````shell
argocd login localhost:8080
yq '.users[] | select(.name == "localhost:8080") | .["auth-token"]' ~/.argocd/config | tr -d '\n' > token
kubectl create secret generic argocd-token --from-file token --from-file secret -n argo
```