Skip to content

docs #2

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

Merged
merged 1 commit into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ jobs:
with:
context: .
push: ${{ github.event_name == 'push' }}
tags: crenshaw-dev/argocd-executor-plugin:latest
tags: crenshawdotdev/argocd-executor-plugin:latest
- name: Install cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v1.13.0'
if: ${{ github.event_name == 'push' }}
- name: Sign latest image
run: |
cosign sign --key env://COSIGN_PRIVATE_KEY crenshaw-dev/argocd-executor-plugin:latest
cosign sign --key env://COSIGN_PRIVATE_KEY crenshawdotdev/argocd-executor-plugin:latest
# Displays the public key to share.
cosign public-key --key env://COSIGN_PRIVATE_KEY
env:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ setup:
.PHONY: build
build:
go mod tidy
docker build --load -t crenshaw-dev/argocd-executor-plugin:latest -f ./Dockerfile .
kind load docker-image crenshaw-dev/argocd-executor-plugin:latest --name argo-workflows-plugin-argocd
docker build --load -t crenshawdotdev/argocd-executor-plugin:latest -f ./Dockerfile .
kind load docker-image crenshawdotdev/argocd-executor-plugin:latest --name argo-workflows-plugin-argocd

.PHONY: manifests
manifests:
Expand Down
34 changes: 4 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<div align="center">
<h1 align="center">Argocd Executor Plugin</h1>
<p align="center">An <a href="https://github.com/argoproj/argo-workflows/blob/master/docs/executor_plugins.md">Executor Plugin</a> for <a href="https://argoproj.github.io/argo-workflows/">Argo Workflows</a> that lets you interact with Argo CD servers <br>
<b>In Active Development</b></p>
<h1 align="center">Argo CD Executor Plugin</h1>
<p align="center">An <a href="https://github.com/argoproj/argo-workflows/blob/master/docs/executor_plugins.md">Executor Plugin</a> for <a href="https://argoproj.github.io/argo-workflows/">Argo Workflows</a> that lets you interact with Argo CD servers.</p>
</div>

## Example Usage
Expand All @@ -26,43 +25,18 @@ spec:

## Getting Started

Head to the [scripts](CONTRIBUTING.md) directory to find out how to get the project up and running on your local machine for development and testing purposes.

### Prerequisites

You will need to have a working [Argo Workflows](https://argoproj.github.io/argo-workflows/) and [Argo CD](https://argo-cd.readthedocs.io/en/stable/) instances to be able to deploy the plugin and use it.

### Installing

```shell
kubectl apply -n argo -f https://raw.githubusercontent.com/UrielCohen456/argocd-executor-plugin/main/deployments/argocd-executor-plugin-configmap.yaml
kubectl apply -n argo -f https://raw.githubusercontent.com/crenshaw-dev/argocd-executor-plugin/main/manifests/argocd-executor-plugin-configmap.yaml
```

You will have to run the workflow using a service account with appropriate permissions. See [examples/rbac.yaml](examples/rbac.yaml) for an example.

## Contributing

Currently, I am developing this on my own as my interest in workflow plugins is growing. <br>
However, you are free to send me a message or create pull request or an issue if you have anything to suggest. <br>
To get started check the scripts directory for setting up the dev environment.

### Goals

The goals of this plugin is to enable native usage of argocd actions inside workflows for these purposes:

1. CI/CD + Testing - Steps that require a sync to an app and various e2e testing modules
2. Resource automation - Steps that require you to generate new resources and delete resources

### TODO:

- [x] Figure out how to get access to kubernetes resources from inside the pod
- [x] Figure out how to get access to argocd binary (Build image that has it)
- [x] Figure out how to get current namespace (not supported in client library in python)
- [x] Add argocd installation to the setup_cluster.sh script
- [x] Add a few different applications to argocd in the setup_cluster.sh script (More complexity over time)
- [x] Translate python server that works so far to go
- [ ] GitHub actions pipeline to automatically build and test
- [x] Find way to get arguments from template
- [ ] Build a simple json schema to validate inside the plugin
- [ ] Build classes to be able to separate concerns and test
- [ ] Build unit tests and integration tests
Head to the [scripts](CONTRIBUTING.md) directory to find out how to get the project up and running on your local machine for development and testing purposes.
2 changes: 1 addition & 1 deletion manifests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# argocd

* Needs: >= v3.3
* Image: crenshaw-dev/argocd-executor-plugin:latest
* Image: crenshawdotdev/argocd-executor-plugin:latest

This is an Argo CD plugin that allows you to interact with an argocd instance of your choice.
For examples visit https://github.com/UrielCohen456/argo-workflows-argocd-executor-plugin/examples
Expand Down
2 changes: 1 addition & 1 deletion manifests/argocd-executor-plugin-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ data:
name: argocd-sync-token
- name: ARGOCD_SERVER
value: argocd-server.argocd.svc.cluster.local
image: crenshaw-dev/argocd-executor-plugin:latest
image: crenshawdotdev/argocd-executor-plugin:latest
imagePullPolicy: Never
name: argocd
ports:
Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
sidecar:
container:
name: argocd
image: crenshaw-dev/argocd-executor-plugin:latest
image: crenshawdotdev/argocd-executor-plugin:latest
imagePullPolicy: Never
env:
- name: ARGOCD_AUTH_TOKEN
Expand Down