Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1c8caaf
Move argocd folder into cluster-resources folder and adjust ArgoCD.gr…
avetgit Nov 28, 2025
d46931b
fix scm.repo url
avetgit Nov 28, 2025
cfad93c
Refactor ftl.yamls in order to roll out gop in normal scm-manager mode
avetgit Dec 1, 2025
af08b3f
Fix argocd per helm rollout
avetgit Dec 1, 2025
d591b8d
Fix argocd multitenancy rollout
avetgit Dec 1, 2025
8c98cf6
refactor example-apps files
avetgit Dec 2, 2025
86455b4
Remove argocdRepoInitializationAction because argocd folder is now wi…
avetgit Dec 3, 2025
e7d2efd
Remove hardcoded scmmUrlInternal in ArgoCD
avetgit Dec 3, 2025
40795c6
Remove argocdPath
avetgit Dec 3, 2025
ecd148e
Clean up ArgoCD:
avetgit Dec 3, 2025
b81b5c4
Clean up ArgoCD:
avetgit Dec 3, 2025
055a9b9
Refactor repo structure and extract folder-, files info into own clas…
avetgit Dec 3, 2025
538f8ff
Refactor repo structure for monitoring and refactor initLocalRepo() f…
avetgit Dec 8, 2025
30ba966
Refactor repo structure for all features and adjust initGitOpsRepos
avetgit Dec 8, 2025
fa18476
Rename apps/monitoring to apps/prometheusstack (prometheusstack is th…
avetgit Dec 10, 2025
bbcf472
Bug fix PrometheusStack: ignore copying templates within apps/<featur…
avetgit Dec 10, 2025
d37de10
Fix repo structure for all features
avetgit Dec 17, 2025
e05ec12
Fix docu by using the right path to Jenkinsfile for petclinic-helm an…
avetgit Dec 17, 2025
e83e53f
ignoring missing values files
nihussmann Dec 19, 2025
86de4a5
Fix ArgoCD unit tests
avetgit Dec 19, 2025
3cc393a
Merge remote-tracking branch 'origin/feature/optimize-repo-structure'…
avetgit Dec 19, 2025
50b17e0
Fix unit tests
avetgit Dec 19, 2025
10f1497
Merge remote-tracking branch 'origin/main' into feature/optimize-repo…
avetgit Dec 19, 2025
6f0d257
Fix unit tests
avetgit Dec 19, 2025
c9201fd
Move argocd to apps/argocd
avetgit Dec 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ terraform/account.json
**/.terraform/*
/.mvn/wrapper/maven-wrapper.jar
# Is created on "helm dep update ." but not needed in repo
/argocd/argocd/argocd/charts/
/argocd/cluster-resources/apps/argocd/argocd/charts/

gitops-playground.jar
jenkins-plugins
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ features:
In this Example we override the default `controller.replicaCount` (GOP's default is 2).

This config file is merged with precedence over the defaults set by
* [the GOP](applications/cluster-resources/ingress-nginx-helm-values.ftl.yaml) and
* [the GOP](argocd/cluster-resources/apps/ingress/templates/ingress-nginx-helm-values.ftl.yaml) and
* [the charts itself](https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/values.yaml).

##### Deploy Ingresses
Expand Down Expand Up @@ -1067,7 +1067,7 @@ From there, everything is managed via GitOps. This diagram shows how it works.
ingresses) via the `templates` folder. The actual ArgoCD chart is declared in the `Chart.yaml`
3. The `Chart.yaml` contains the Argo CD helm chart as `dependency`. It points to a deterministic version of the Chart
(pinned via `Chart.lock`) that is pulled from the Chart repository on the internet.
This mechanism can be used to upgrade Argo CD via GitOps. See the [Readme of the argocd repository](argocd/argocd/README.md)
This mechanism can be used to upgrade Argo CD via GitOps. See the [Readme of the argocd repository](argocd/cluster-resources/apps/argocd/README.md)
for details.
4. The `projects` application manages the `projects` folder, that contains the following `AppProjects`:
* the `argocd` project, used for bootstrapping
Expand Down Expand Up @@ -1098,7 +1098,7 @@ From there, everything is managed via GitOps. This diagram shows how it works.
* Two applications in the same YAML (implemented in the playground, see e.g. [`petclinic-plain.yaml`](argocd/example-apps/argocd/petclinic-plain.ftl.yaml))
* Two application with the same name in different namespaces, when ArgoCD is enabled to search for applications
within different namespaces (implemented in the playground, see
[Argo CD's values.yaml](argocd/argocd/argocd/values.ftl.yaml) - `application.namespaces` setting)
[Argo CD's values.yaml](argocd/cluster-resources/apps/argocd/argocd/values.ftl.yaml) - `application.namespaces` setting)
* One `ApplicationSet`, using the [`git` generator for directories](https://github.com/argoproj/argo-cd/blob/v2.7.1/docs/operator-manual/applicationset/Generators-Git.md#git-generator-directories)
(not used in GitOps playground, yet)

Expand Down Expand Up @@ -1348,15 +1348,15 @@ The `.petlinic.` part can be overridden using

#### PetClinic with plain k8s resources

[Jenkinsfile](applications/petclinic/argocd/plain-k8s/Jenkinsfile) for `plain` deployment
[Jenkinsfile](examples/example-apps-via-content-loader/argocd/petclinic-plain/Jenkinsfile) for `plain` deployment

* Staging: http://staging.petclinic-plain.petclinic.localhost/
* Production: http://production.petclinic-plain.petclinic.localhost/
Note that you have to accept a [pull request](http://scmm.localhost/scm/repo/argocd/example-apps/pull-requests/) for deployment

#### PetClinic with helm

[Jenkinsfile](applications/petclinic/argocd/helm/Jenkinsfile) for `helm` deployment
[Jenkinsfile](examples/example-apps-via-content-loader/argocd/petclinic-helm/Jenkinsfile) for `helm` deployment

* Staging: http://staging.petclinic-helm.petclinic.localhost/
* Production: http://production.petclinic-helm.petclinic.localhost/
Expand Down
23 changes: 0 additions & 23 deletions argocd/argocd/applications/projects.ftl.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions argocd/argocd/multiTenant/central/applications/projects.ftl.yaml

This file was deleted.

Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ spec:
namespace: ${config.application.namePrefix}argocd
project: argocd
source:
path: ${config.features.argocd.operator?string("operator/", "argocd/")}
repoURL: ${scm.repoUrl}argocd/argocd.git
path: apps/argocd/${config.features.argocd.operator?string("operator/", "argocd/")}
repoURL: ${scm.repoUrl}argocd/cluster-resources.git
targetRevision: main
# needed to sync the operator/rbac folder
<#if config.features.argocd.operator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ spec:
namespace: ${config.application.namePrefix}argocd
project: argocd
source:
path: applications/
repoURL: ${scm.repoUrl}argocd/argocd.git
path: apps/argocd/applications/
repoURL: ${scm.repoUrl}argocd/cluster-resources.git
targetRevision: main
directory:
recurse: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: cluster-resources
name: projects
namespace: ${config.application.namePrefix}argocd
# finalizer disabled, because otherwise everything under this Application would be deleted as well, if this Application is deleted by accident
# finalizers:
# - resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: ${config.application.namePrefix}argocd
server: https://kubernetes.default.svc
namespace: ${config.application.namePrefix}argocd
project: argocd
source:
path: argocd/
path: apps/argocd/projects/
repoURL: ${scm.repoUrl}argocd/cluster-resources.git
targetRevision: main
directory:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ spec:
namespace: ${config.application.namePrefix}argocd
project: ${tenantName}
source:
path: ${config.features.argocd.operator?string("operator/", "argocd/")}
repoURL: ${scm.centralScmUrl}argocd/argocd.git
path: apps/argocd/${config.features.argocd.operator?string("operator/", "argocd/")}
repoURL: ${scm.centralScmUrl}argocd/cluster-resources.git
targetRevision: main
# needed to sync the operator/rbac folder
<#if config.features.argocd.operator??>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ spec:
namespace: ${config.application.namePrefix}argocd
project: ${tenantName}
source:
path: multiTenant/central/applications/
repoURL: ${scm.centralScmUrl}argocd/argocd.git
path: apps/argocd/multiTenant/central/applications/
repoURL: ${scm.centralScmUrl}argocd/cluster-resources.git
targetRevision: main
directory:
recurse: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ${config.application.namePrefix}cluster-resources
name: ${config.application.namePrefix}projects
namespace: ${config.multiTenant.centralArgocdNamespace}
# finalizer disabled, because otherwise everything under this Application would be deleted as well, if this Application is deleted by accident
# finalizers:
# - resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: ${config.application.namePrefix}argocd
server: https://kubernetes.default.svc
namespace: ${config.application.namePrefix}argocd
project: ${tenantName}
source:
path: argocd/
path: apps/argocd/multiTenant/central/projects/
repoURL: ${scm.centralScmUrl}argocd/cluster-resources.git
targetRevision: main
directory:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ spec:
- namespace: '*'
server: https://kubernetes.default.svc
sourceRepos:
- ${scm.centralScmUrl}argocd/argocd.git
- ${scm.centralScmUrl}argocd/cluster-resources.git
<#if config.application.mirrorRepos>
- ${scm.repoUrl}3rd-party-dependencies/kube-prometheus-stack.git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ spec:
namespace: ${config.application.namePrefix}argocd
project: argocd
source:
path: applications/
repoURL: ${scm.repoUrl}argocd/argocd.git
path: apps/argocd/applications/
repoURL: ${scm.repoUrl}argocd/cluster-resources.git
targetRevision: main
directory:
recurse: true
Expand All @@ -38,8 +38,8 @@ spec:
namespace: ${config.application.namePrefix}argocd
project: argocd
source:
path: projects/
repoURL: ${scm.repoUrl}argocd/argocd.git
path: argocd/projects/
repoURL: ${scm.repoUrl}argocd/cluster-resources.git
targetRevision: main
directory:
recurse: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ spec:
initialRepositories: |
<#if !(scm.centralScmUrl?has_content)>
- name: argocd
url: ${scm.repoUrl}argocd/argocd.git
url: ${scm.repoUrl}argocd/cluster-resources.git
- name: cluster-resources
url: ${scm.repoUrl}argocd/cluster-resources.git
- name: prometheus-community
Expand Down
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

helm values directly in the applications root folder. Other features->using template folder.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ grafana:
adminPassword: ${config.application["password"]}
service:
type: <#if config.application.remote>LoadBalancer<#else>ClusterIP</#if>
<#if monitoring.grafana.host?has_content>
ingress:
<#if monitoring?? && monitoring?is_hash && monitoring.grafana?? && monitoring.grafana.host?has_content>
ingress:
enabled: true
hosts: [${monitoring.grafana.host}]
</#if>
Expand Down Expand Up @@ -341,7 +341,10 @@ prometheus:
- prometheus-metrics-creds-scmm
- prometheus-metrics-creds-jenkins
additionalScrapeConfigs:
<#if config.scm.scmProviderType?lower_case == "scm_manager">
<#if config.scm.scmProviderType?lower_case == "scm_manager"
&& scm.host?has_content
&& scm.protocol?has_content
&& scm.path?has_content>
- job_name: 'scm-manager'
static_configs:
- targets: [ '${scm.host}' ]
Expand All @@ -351,11 +354,13 @@ prometheus:
username: '${config.application.namePrefix}metrics'
password_file: '/etc/prometheus/secrets/prometheus-metrics-creds-scmm/password'
</#if>
<#if jenkins?? && jenkins?is_hash>
- job_name: 'jenkins'
static_configs:
- targets: [ '${jenkins.host}' ]
scheme: ${jenkins.protocol}
metrics_path: '${jenkins.path}'
basic_auth:
username: '${jenkins.metricsUsername}'
password_file: '/etc/prometheus/secrets/prometheus-metrics-creds-jenkins/password'
password_file: '/etc/prometheus/secrets/prometheus-metrics-creds-jenkins/password'
</#if>
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: kube-prometheus-stack-operator
namespace: ${namePrefix}monitoring
namespace: ${config.application.namePrefix}monitoring
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
Expand All @@ -150,7 +150,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: kube-prometheus-stack-prometheus
namespace: ${namePrefix}monitoring
namespace: ${config.application.namePrefix}monitoring
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
Expand Down Expand Up @@ -184,4 +184,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: kube-prometheus-stack-grafana
namespace: ${namePrefix}monitoring
namespace: ${config.application.namePrefix}monitoring
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ livenessProbe:
fullnameOverride : ${releaseName}

extraEnv: |
- name: SCM_WEBAPP_INITIALUSER
value: "${username}"
- name: SCM_WEBAPP_INITIALPASSWORD
value: "${password}"
- name: SCM_WEBAPP_INITIALUSER
value: "${username}"
- name: SCM_WEBAPP_INITIALPASSWORD
value: "${password}"
<#if remote?? && !remote>
service:
type: NodePort
</#if>

<#if host?has_content>
</#if>
<#if host?has_content>
ingress:
enabled: true
path: /
Expand Down
26 changes: 0 additions & 26 deletions argocd/cluster-resources/argocd/misc.ftl.yaml

This file was deleted.

Empty file.
2 changes: 1 addition & 1 deletion examples/example-apps-via-content-loader/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ content:
createJenkinsJob: true
- url: https://github.com/cloudogu/gitops-playground
path: examples/example-apps-via-content-loader/
ref: main
ref: feature/optimize-repo-structure
templating: true
type: FOLDER_BASED
overwriteMode: UPGRADE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ArgoCDDestructionHandler implements DestructionHandler {
@Override
void destroy() {

def repo = repoProvider.getRepo("argocd/argocd", gitHandler.resourcesScm)
def repo = repoProvider.getRepo("argocd/cloud-resources", gitHandler.resourcesScm)
repo.cloneRepo()

for (def app in k8sClient.getCustomResource("app")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import java.nio.file.Path
@Order(160)
class CertManager extends Feature implements FeatureWithImage {

static final String HELM_VALUES_PATH = "applications/cluster-resources/certManager-helm-values.ftl.yaml"
static final String HELM_VALUES_PATH = "argocd/cluster-resources/apps/cert-manager/templates/certManager-helm-values.ftl.yaml"

private FileSystemUtils fileSystemUtils
private DeploymentStrategy deployer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import java.nio.file.Path
@Order(400)
class ExternalSecretsOperator extends Feature implements FeatureWithImage {

static final String HELM_VALUES_PATH = 'applications/cluster-resources/secrets/external-secrets/values.ftl.yaml'
static final String HELM_VALUES_PATH = "argocd/cluster-resources/apps/external-secrets/templates/values.ftl.yaml"

String namespace = "${config.application.namePrefix}secrets"
Config config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import java.nio.file.Path
@Order(150)
class IngressNginx extends Feature implements FeatureWithImage {

static final String HELM_VALUES_PATH = "applications/cluster-resources/ingress-nginx-helm-values.ftl.yaml"
static final String HELM_VALUES_PATH = "argocd/cluster-resources/apps/ingress/templates/ingress-nginx-helm-values.ftl.yaml"

String namespace = "${config.application.namePrefix}ingress-nginx"
Config config
Expand Down
Loading