Skip to content

Implement MVP for content repos #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

schnatterer
Copy link
Member

@schnatterer schnatterer commented Jun 4, 2025

Provide content.repos in config that allows for configuring additional repos into GOP.
This allows for

  • adding new applications/cluster-resources
  • adding tenants
  • deploying GOP with specific turnkey gitops-pipelines
  • changing existing content

In the long run, we can remove our hard-coded example apps from the content and make them into a configuration.

content:
  repos:
    - url: 'https://example.org'
      username: xyz
      password: abc
      templating: true
      folderBased: true # target not needed
    - url: https://github.com/cloudogu/spring-petclinic
      target: example-tenant/petclinic
      ref: b0738b2
        ref: feature/gitops_ready
      - url: https://github.com/cloudogu/gitops-build-lib
        target: 3rd-party-dependencies/gitops-build-lib
      - url: https://github.com/cloudogu/ces-build-lib
        target: 3rd-party-dependencies/ces-build-lib
      - url: https://github.com/cloudogu/spring-boot-helm-chart
        target: 3rd-party-dependencies/spring-boot-helm-chart
        ref: 0.4.0 
  namespaces: 
    - example-tenant-staging
    - example-tenant-production
  examples: true

@schnatterer schnatterer force-pushed the feature/contentRepos branch 2 times, most recently from 704ed42 to e7d1dae Compare June 5, 2025 16:27
@ThomasMichael1811 ThomasMichael1811 force-pushed the feature/contentRepos branch 2 times, most recently from 352fe53 to adffe7c Compare June 18, 2025 13:55
@ThomasMichael1811 ThomasMichael1811 marked this pull request as ready for review June 18, 2025 13:57
schnatterer and others added 6 commits June 19, 2025 16:46
Migrate from AirGappedUtils for reuse in Content.

Unfortunately, even though an SCM abstraction is right around the
corner,
it is not there, yet.
So I'll have to continue making SCM-Manager-only implementations,
that require refactoring soon 😐️
Start removing unused templating params in ArgoCD.groovy.
For better UX in content repo templating, these will all have to go!
Creates image pull secrets
and adds to config.activeNamespaces
that are used for Prometheus, for example.

Also makes ArgoCD.groovy use config.application.activeNamespaces as
NS list, instead of using hard-coded list.
This allows for only creating the namespaces that are active and also
adding dynamic NS via config.content.namespaces.
…tory

create tests for INIT, UPDATE and RESET behavior
Co-authored-by: Thomas <thomas@thomasmichael.de>
@schnatterer schnatterer force-pushed the feature/contentRepos branch 5 times, most recently from 1bf2b9d to 307ee31 Compare June 20, 2025 15:13
Thomas Michael and others added 4 commits June 23, 2025 15:23
fix empty petclinic,
fix switch remote branch
Add skipPlugins and skipRestart flags for Jenkins and SCM-Manager.

- Update config schema and CLI options
- Add env var support to feature classes
- Skip plugin install and restart in init scripts
- Extract SCM plugin install logic to installScmmPlugins
- Add tests to verify skipping behavior

Co-authored-by: Johannes Schnatterer <johannes.schnatterer@cloudogu.com>
This is the right thing to do in regard to GOP modularity.

It also reduces the risk of running into this notorious error:

java.lang.RuntimeException: Cannot enable authentication for prometheus: groovy.lang.MissingPropertyException: No such property: PrometheusConfiguration for class: Script1

Caused by running the Config Script on Jenkins that fails because the
Prometheus APIs are missing there.
* feat: add multi-tenancy support for argocd-operator

- Template service account and resource namespaces using `namePrefix`
- Add batch/Job permissions to all RBAC roles
- Set argocd.yaml `.spec.server.insecure` when `--insecure` is enabled
- Conditionally generate ingress.yaml for insecure mode (non-OpenShift), because argocd-operator always enforces https
- Include `batch/Job` in resourceInclusions for operator CR
- Prevent creation of empty rendered files when templates are fully conditional
- Add tests covering all new conditional and templated logic

* feat: add multi-tenancy support for argocd-operator

- Cast doc and metadata to Map to satisfy Groovy static type checking
- Ensure metadata.namespace is treated as String for AssertJ compatibility

---------

Co-authored-by: Niklas Hußmann <niklas.hussmann-extern@cloudogu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants