Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects

Release

Merged Ionut Beti requested to merge release into main
54 files
+ 2624
0
Compare changes
  • Side-by-side
  • Inline

Files

 
apiVersion: v1
 
kind: ConfigMap
 
metadata:
 
name: {{ .Release.Name }}-postinstall-configmap
 
data:
 
setup-gitea.sh: |
 
set -euo pipefail
 
apk add --no-cache curl
 
GITEA_HEALTH="http://{{ .Release.Name }}-gitea-http.{{ .Release.Namespace }}.svc.cluster.local:3000/api/healthz"
 
curl -v "$GITEA_HEALTH"
 
 
git config --global user.email "setup@helm-hook.kube";
 
git config --global user.name "${GIT_USER}";
 
 
DIR1="management-repo"
 
MGMT_REPO="http://${GIT_USER}:${GIT_PASSWORD}@{{ .Release.Name }}-gitea-http.{{ .Release.Namespace }}.svc.cluster.local:3000/gitops_test/management-repo.git"
 
echo "Creating directory: $DIR1"
 
mkdir -p "$DIR1"
 
cd "$DIR1"
 
git init
 
cp /postconfig/data-application-template.yaml .
 
mkdir applications
 
touch applications/.empty
 
git add data-application-template.yaml
 
git add applications
 
git commit -m "initialized $DIR1"
 
git remote add origin "$MGMT_REPO"
 
git branch -M master
 
git push -u origin master
 
cd ..
 
 
DIR2="data-repo"
 
DATA_REPO="http://${GIT_USER}:${GIT_PASSWORD}@{{ .Release.Name }}-gitea-http.{{ .Release.Namespace }}.svc.cluster.local:3000/gitops_test/data-repo.git"
 
echo "Creating directory: $DIR2"
 
mkdir -p "$DIR2"
 
cd "$DIR2"
 
git init
 
mkdir claims
 
touch claims/.empty
 
git add claims
 
git commit -m "initialized $DIR2"
 
git remote add origin "$DATA_REPO"
 
git branch -M master
 
git push -u origin master
 
data-application-template.yaml: |
 
apiVersion: argoproj.io/v1alpha1
 
kind: Application
 
metadata:
 
name: crossplane-claim-{UUID}
 
namespace: {{ .Release.Namespace }}
 
finalizers:
 
- resources-finalizer.argocd.argoproj.io
 
labels:
 
track-events: claim-application
 
claim-uuid: "{UUID}"
 
claim-kind: "{KIND}"
 
spec:
 
project: default
 
source:
 
repoURL: http://{{ .Release.Name }}-gitea-http.{{ .Release.Namespace }}.svc.cluster.local:3000/gitops_test/data-repo.git
 
path: claims/claim_{UUID}
 
targetRevision: master
 
destination:
 
server: https://kubernetes.default.svc
 
syncPolicy:
 
automated:
 
selfHeal: true
 
prune: true
 
allowEmpty: true
 
\ No newline at end of file
Loading