Skip to content

Commit e420e34

Browse files
flxebrtschnattererThomas Michael
authored
Add content loader docs (#305)
Co-authored-by: Johannes Schnatterer <johannes.schnatterer@cloudogu.com> Co-authored-by: Thomas Michael <thomas.michael@cloudogu.com>
1 parent 40a1615 commit e420e34

31 files changed

+1318
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Kubernetes clusters:
1010
* Pipelines: Example applications using [Jenkins](#jenkins) with the [gitops-build-lib](https://github.com/cloudogu/gitops-build-lib) and [SCM-Manager](#scm-manager)
1111
* Ingress Controller: [ingress-nginx](https://github.com/kubernetes/ingress-nginx/)
1212
* Certificate Management: [cert-manager](#certificate-management)
13+
* [Content Loader](docs/content-loader/content-loader.md): Completely customize what is pushed to Git during installation.
14+
This allows for adding your own end-user or IDP apps, creating repos, adding Argo CD tenants, etc.
1315
* Runs on:
1416
* local cluster (try it [with only one command](#tldr)),
1517
* in the public cloud,
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: example-tenant
5+
namespace: ${config.application.namePrefix}argocd
6+
# finalizer disabled, because otherwise everything under this Application would be deleted as well, if this Application is deleted by accident
7+
# finalizers:
8+
# - resources-finalizer.argocd.argoproj.io
9+
spec:
10+
destination:
11+
namespace: ${config.application.namePrefix}argocd
12+
server: https://kubernetes.default.svc
13+
project: argocd
14+
source:
15+
path: argocd/
16+
repoURL: "http://scmm.${config.application.namePrefix}scm-manager.svc.cluster.local/scm/repo/${config.application.namePrefix}example-tenant/gitops"
17+
targetRevision: main
18+
directory:
19+
recurse: true
20+
syncPolicy:
21+
automated:
22+
prune: false # is set to false to prevent projects to be deleted by accident
23+
selfHeal: true
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: AppProject
3+
metadata:
4+
name: example-tenant
5+
namespace: ${config.application.namePrefix}argocd
6+
annotations:
7+
<#if config.features.mail.active>
8+
notifications.argoproj.io/subscribe.email: ${config.features.argocd.emailToUser}
9+
</#if>
10+
spec:
11+
description: Contains examples of end-user applications
12+
destinations:
13+
- namespace: ${config.application.namePrefix}example-tenant-production
14+
server: https://kubernetes.default.svc
15+
- namespace: ${config.application.namePrefix}example-tenant-staging
16+
server: https://kubernetes.default.svc
17+
sourceRepos:
18+
- http://scmm.${config.application.namePrefix}scm-manager.svc.cluster.local/scm/repo/${config.application.namePrefix}example-tenant/gitops
19+
- http://scmm.${config.application.namePrefix}scm-manager.svc.cluster.local/scm/repo/${config.application.namePrefix}example-tenant/nginx-helm-umbrella
20+
- https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
21+
22+
# allow to only see application resources from the specified namespace
23+
sourceNamespaces:
24+
- '${config.application.namePrefix}example-tenant-staging'
25+
- '${config.application.namePrefix}example-tenant-production'
26+
27+
# Allow all namespaced-scoped resources to be created
28+
namespaceResourceWhitelist:
29+
- group: '*'
30+
kind: '*'
31+
32+
# Deny all cluster-scoped resources from being created. Least privilege.
33+
clusterResourceWhitelist:
458 KB
Loading
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# $schema: https://raw.githubusercontent.com/cloudogu/gitops-playground/main/docs/configuration.schema.json
2+
content:
3+
repos:
4+
- url: https://github.com/cloudogu/gitops-build-lib
5+
target: 3rd-party-dependencies/gitops-build-lib
6+
overwriteMode: RESET
7+
- url: https://github.com/cloudogu/ces-build-lib
8+
target: 3rd-party-dependencies/ces-build-lib
9+
overwriteMode: RESET
10+
- url: https://github.com/cloudogu/spring-boot-helm-chart
11+
target: 3rd-party-dependencies/spring-boot-helm-chart
12+
overwriteMode: RESET
13+
- url: https://github.com/cloudogu/spring-petclinic
14+
target: example-tenant/petclinic-plain
15+
ref: feature/gitops_ready
16+
targetRef: main
17+
# ref: b0738b2
18+
overwriteMode: UPGRADE
19+
createJenkinsJob: true
20+
- url: https://github.com/cloudogu/spring-petclinic
21+
target: example-tenant/petclinic-helm
22+
ref: feature/gitops_ready
23+
targetRef: main
24+
overwriteMode: UPGRADE
25+
createJenkinsJob: true
26+
- url: 'https://github.com/cloudogu/gitops-playground.git'
27+
path: 'docs/content-loader'
28+
ref: main
29+
templating: true
30+
type: FOLDER_BASED
31+
overwriteMode: UPGRADE
32+
33+
namespaces:
34+
# - ${config.application.namePrefix}example-tenant-production
35+
# - ${config.application.namePrefix}example-tenant-staging
36+
- example-tenant-production
37+
- example-tenant-staging
38+
variables:
39+
umbrella:
40+
nginxAnnotation: 'my value'
41+
some: other
42+
43+
application:
44+
yes: true
45+
baseUrl: http://localhost
46+
# namePrefix: customer-1
47+
jenkins:
48+
active: true
49+
registry:
50+
active: true
51+
features:
52+
argocd:
53+
active: true
54+
ingressNginx:
55+
active: true

0 commit comments

Comments
 (0)