copy from idpbuilder example dir (#3)

Signed-off-by: Manabu McCloskey <manabu.mccloskey@gmail.com>
This commit is contained in:
Manabu McCloskey 2024-06-04 14:43:36 -07:00 committed by GitHub
parent d147e84b3f
commit 388a1b5b4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
86 changed files with 14817 additions and 0 deletions

18
basic/README.md Normal file
View file

@ -0,0 +1,18 @@
## Basic Example
This directory contains basic examples of using the custom package feature.
### Local manifests
The [package1 directory](./package1) is an example of a custom package that you have developed locally, and you want test.
This configuration instructs idpbuilder to:
1. Create a Gitea repository.
2. Sync the contents of the [manifests](./package1/manifests) directory to the repository.
3. Replace the `spec.Source(s).repoURL` field with the Gitea repository URL.
### Remote manifests
The [package2 directory](./package2) is an example for packages available remotely. This is applied directly to the cluster.

24
basic/package1/app.yaml Normal file
View file

@ -0,0 +1,24 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-app
namespace: argocd
labels:
example: basic
spec:
destination:
namespace: my-app
server: "https://kubernetes.default.svc"
source:
# cnoe:// indicates we want to sync from a local directory.
# values after cnoe:// is treated as a relative path from this file.
repoURL: cnoe://manifests
targetRevision: HEAD
# with path set to '.' and cnoe://manifests. we are wanting ArgoCD to sync from the ./manifests directory.
path: "."
project: default
syncPolicy:
automated:
selfHeal: true
syncOptions:
- CreateNamespace=true

View file

@ -0,0 +1,17 @@
apiVersion: v1
kind: Pod
metadata:
name: busybox
namespace: argocd
labels:
abc: ded
notused: remove-me
spec:
containers:
- image: alpine:3.18
command:
- sleep
- "3600"
imagePullPolicy: IfNotPresent
name: busybox
restartPolicy: Always

22
basic/package2/app.yaml Normal file
View file

@ -0,0 +1,22 @@
# this is an ordinary ArgoCD application file
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: guestbook
namespace: argocd
labels:
example: basic
spec:
project: default
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: guestbook
destination:
server: https://kubernetes.default.svc
namespace: guestbook
syncPolicy:
automated:
selfHeal: true
syncOptions:
- CreateNamespace=true

22
basic/package2/app2.yaml Normal file
View file

@ -0,0 +1,22 @@
# this is an ordinary ArgoCD application file
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: guestbook2
namespace: argocd
labels:
example: basic
spec:
project: default
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: guestbook
destination:
server: https://kubernetes.default.svc
namespace: guestbook2
syncPolicy:
automated:
selfHeal: true
syncOptions:
- CreateNamespace=true