initial commit

This commit is contained in:
allard
2025-11-23 18:58:51 +01:00
commit 376a944abc
1553 changed files with 314731 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: default
namespace: argocd
spec:
description: Default project
destinations:
- namespace: '*'
server: https://kubernetes.default.svc
sourceRepos:
- '*'
clusterResourceWhitelist:
- group: '*'
kind: '*'
namespaceResourceBlacklist:
- group: backstage.io
kind: Component

View File

@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-env-configmap
namespace: default
data:
ARGOCD_SERVER: argocd-dev.allarddcs.nl

View File

@@ -0,0 +1,10 @@
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: argocd-pipeline-run-
spec:
pipelineRef:
name: argocd-pipeline-test
params:
- name: sonar-project-key
value: olproperties

View File

@@ -0,0 +1,19 @@
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: argocd-pipeline-test
spec:
description: |
This pipeline tests argocd
params:
- name: sonar-project-key
type: string
tasks:
- name: deploy-with-argocd
taskref:
name: argocd-task-sync-and-wait
params:
- name: application-name
value: $(params.sonar-project-key)

View File

@@ -0,0 +1,43 @@
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: argocd-task-sync-and-wait
namespace: default
spec:
description: |-
This task syncs (deploys) an Argo CD application and waits for it to be healthy.
To do so, it requires the address of the Argo CD server and some form of authentication either a username/password or an authentication token.
params:
- description: name of the application to sync
name: application-name
type: string
- default: HEAD
description: the revision to sync to
name: revision
type: string
- default: --
name: flags
type: string
- default: v2.2.2
name: argocd-version
type: string
stepTemplate:
computeResources: {}
envFrom:
- configMapRef:
name: argocd-env-configmap
- secretRef:
name: argocd-env-secret
steps:
- computeResources: {}
image: argoproj/argocd
name: login
script: |
echo "ARGOCD_SERVER = " $ARGOCD_SERVER
echo "ARGOCD_USERNAME = " $ARGOCD_USERNAME
echo "ARGOCD_PASSWORD = " $ARGOCD_PASSWORD
if [ -z "$ARGOCD_AUTH_TOKEN" ]; then
yes | argocd login "$ARGOCD_SERVER" --username="$ARGOCD_USERNAME" --password="$ARGOCD_PASSWORD";
fi
argocd app sync "$(params.application-name)" --revision "$(params.revision)" "$(params.flags)"
argocd app wait "$(params.application-name)" --health "$(params.flags)"

View File

@@ -0,0 +1,3 @@
microk8s kubectl create secret generic argocd-env-secret \
--from-literal=ARGOCD_USERNAME=admin \
--from-literal=ARGOCD_PASSWORD='Argocd01@'

View File

@@ -0,0 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: default
namespace: argocd
spec:
description: Default project
destinations:
- namespace: '*' # Allow all namespaces
server: https://kubernetes.default.svc
sourceRepos:
- '*' # Allow all repositories
clusterResourceWhitelist:
- group: '*' # Allow all cluster-scoped resources
kind: '*'
namespaceResourceBlacklist:
- group: backstage.io # Exclude all Backstage API group
kind: Component # Exclude Component kind