Skip to content

Commit c1439e8

Browse files
add starter-manual-sync (#532)
1 parent fd188b0 commit c1439e8

File tree

6 files changed

+234
-0
lines changed

6 files changed

+234
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changelog
2+
3+
## v0.0.1 (27.12.2023)
4+
5+
### starter-manual-sync
6+
7+
This Workflow Template is an example for post promotion workflow that sync, wait and send a slack message once the app is synced
8+
Lines changed: 39 additions & 0 deletions
Loading
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# starter manual sync
2+
3+
## Summary
4+
5+
This Workflow Template is an example for post promotion workflow that sync, wait and send a slack message once the app is synced
6+
## Templates
7+
8+
1. [starter-manual-sync](https://github.com/codefresh-io/argo-hub/blob/main/examples/starter-manual-sync/versions/0.0.1/docs/starter-manual-sync.md)
9+
10+
## Security
11+
12+
Minimal required permissions
13+
14+
[Full rbac permissions list](https://github.com/codefresh-io/argo-hub/blob/main/examples/starter-manual-sync/versions/0.0.1/rbac.yaml)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Starter manual sync
2+
3+
## Summary
4+
5+
This Workflow Template is an example for post promotion workflow that:
6+
- Sync an application in ArgoCD. See `argocd app sync --help` with the ArgoCD CLI for flags
7+
- Wait for an application in ArgoCD. See `argocd app wait --help` with the ArgoCD CLI for flags
8+
- send messages to a Slack channel using a webhook URL.
9+
10+
11+
## Inputs/Outputs
12+
13+
#### Parameters
14+
* APP_NAME (required)- The app to sync (if syncing by label, use flags).
15+
* APP_NAMESPACE - The app namespace.
16+
* SERVER_URL (required) - The address to reach ArgoCD
17+
(if in cluster, something like `argocd-server.<namespace>.svc.cluster.local` for cli based; `argo-cd-server.<namespace>.svc.cluster.local` for helm based.
18+
It's important to note that users have the flexibility to customize and modify these designations based on their specific preferences or requirements.)
19+
20+
### Outputs
21+
no outputs
22+
23+
## Examples
24+
25+
### task Example
26+
```
27+
apiVersion: argoproj.io/v1alpha1
28+
kind: Workflow
29+
metadata:
30+
generateName: starter-manual-sync-
31+
spec:
32+
entrypoint: main
33+
volumes:
34+
templates:
35+
- name: main
36+
dag:
37+
tasks:
38+
- name: starter-manual-sync
39+
templateRef:
40+
name: argo-hub.starter-manual-sync.0.0.1
41+
template: starter-manual-sync
42+
arguments:
43+
parameters:
44+
- name: APP_NAME
45+
value: 'my-app'
46+
- name: APP_NAMESPACE
47+
value: 'staging'
48+
- name: SERVER_URL
49+
value: 'argo-cd-server.staging.svc.cluster.local'
50+
```
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
name: argo-hub.starter-manual-sync.0.0.1
5+
annotations:
6+
argo-hub/version: '0.0.1'
7+
---
8+
apiVersion: rbac.authorization.k8s.io/v1
9+
kind: Role
10+
metadata:
11+
name: argo-hub.starter-manual-sync.0.0.1
12+
annotations:
13+
argo-hub/version: '0.0.1'
14+
rules:
15+
- apiGroups:
16+
- ""
17+
resources:
18+
- pods
19+
verbs:
20+
- get
21+
- watch
22+
- patch
23+
- apiGroups:
24+
- ""
25+
resources:
26+
- pods/log
27+
verbs:
28+
- get
29+
- watch
30+
---
31+
apiVersion: rbac.authorization.k8s.io/v1
32+
kind: RoleBinding
33+
metadata:
34+
name: argo-hub.starter-manual-sync.0.0.1
35+
annotations:
36+
argo-hub/version: '0.0.1'
37+
roleRef:
38+
apiGroup: rbac.authorization.k8s.io
39+
kind: Role
40+
name: argo-hub.starter-manual-sync.0.0.1
41+
subjects:
42+
- kind: ServiceAccount
43+
name: argo-hub.starter-manual-sync.0.0.1

0 commit comments

Comments
 (0)