Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# Allowlist
!applications/
!examples/
!exercises/
!argocd/
!docker-registry/
Expand Down
27 changes: 24 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ ENV HOME=/home \
GITOPS_BUILD_LIB_REPO=/gitops/repos/gitops-build-lib.git \
CES_BUILD_LIB_REPO=/gitops/repos/ces-build-lib.git \
JENKINS_PLUGIN_FOLDER=/gitops/jenkins-plugins/ \
LOCAL_HELM_CHART_FOLDER=/gitops/charts/
LOCAL_HELM_CHART_FOLDER=/gitops/charts/ \
EXAMPLE_APPS_CONTENT_REPO=/app/examples/example-apps-via-content-loader

WORKDIR /app

Expand All @@ -177,10 +178,30 @@ RUN apk update --no-cache && apk upgrade --no-cache && \
git \
unzip

USER 1000:0

COPY --from=downloader /dist /

# Set example apps config to use the repos from the image
RUN sed -i \
-e "s|url: https://github.com/cloudogu/gitops-build-lib|url: 'file://$GITOPS_BUILD_LIB_REPO'|g" \
-e "s|url: https://github.com/cloudogu/ces-build-lib|url: 'file://$CES_BUILD_LIB_REPO'|g" \
-e "s|url: https://github.com/cloudogu/spring-boot-helm-chart|url: 'file://$SPRING_BOOT_HELM_CHART_REPO'|g" \
-e "s|url: https://github.com/cloudogu/spring-petclinic|url: 'file://$SPRING_PETCLINIC_REPO'|g" \
-e "s|url: https://github.com/cloudogu/gitops-playground|url: 'file://$EXAMPLE_APPS_CONTENT_REPO'|g" \
-e "/^[[:space:]]*path: examples\/example-apps-via-content-loader\//d" \
/app/examples/example-apps-via-content-loader/config.yaml

# Initialize example apps folder with git, so we can use it with content-loader
# we need safe.directory setting because of: fatal: detected dubious ownership in repository at '/app/examples/example-apps-via-content-loader'
RUN git -C /app/examples/example-apps-via-content-loader init -b main && \
git -C /app/examples/example-apps-via-content-loader config user.email "[email protected]" && \
git -C /app/examples/example-apps-via-content-loader config user.name "Container" && \
git -C /app/examples/example-apps-via-content-loader add -A && \
git -C /app/examples/example-apps-via-content-loader commit -m "initial commit" && \
git config --global --add safe.directory /app/examples/example-apps-via-content-loader


USER 1000:0

ARG VCS_REF
ARG BUILD_DATE
LABEL org.opencontainers.image.title="gitops-playground" \
Expand Down
6 changes: 0 additions & 6 deletions applications/argocd/nginx/helm-jenkins/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions applications/argocd/nginx/helm-jenkins/index.html

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions applications/argocd/nginx/helm-umbrella/README.md

This file was deleted.

This file was deleted.

17 changes: 0 additions & 17 deletions applications/argocd/petclinic/helm/k8s/staging/configMap.ftl.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions applications/argocd/petclinic/helm/k8s/values-production.ftl.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions applications/argocd/petclinic/helm/k8s/values-staging.ftl.yaml

This file was deleted.

111 changes: 0 additions & 111 deletions docs/configuration.schema.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
{
"$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {
"ExampleAppSchema-nullable" : {
"type" : [ "object", "null" ],
"properties" : {
"baseDomain" : {
"type" : [ "string", "null" ],
"description" : "The domain under which a subdomain these applications will be made available"
}
},
"additionalProperties" : false
},
"HelmConfigWithValues-nullable" : {
"type" : [ "object", "null" ],
"properties" : {
Expand Down Expand Up @@ -42,30 +32,6 @@
"type" : "string"
}
},
"RepositorySchema-nullable" : {
"type" : [ "object", "null" ],
"properties" : {
"url" : {
"type" : [ "string", "null" ],
"description" : "HTTP URL of the repo"
}
},
"additionalProperties" : false
},
"RepositorySchemaWithRef-nullable" : {
"type" : [ "object", "null" ],
"properties" : {
"ref" : {
"type" : [ "string", "null" ],
"description" : "Ref of the repo to use, e.g. a tag, commit or branch"
},
"url" : {
"type" : [ "string", "null" ],
"description" : "HTTP URL of the repo"
}
},
"additionalProperties" : false
},
"ScmProviderType-nullable" : {
"anyOf" : [ {
"type" : "null"
Expand Down Expand Up @@ -355,21 +321,6 @@
"additionalProperties" : false,
"description" : "Config parameters for the Cert Manager"
},
"exampleApps" : {
"type" : [ "object", "null" ],
"properties" : {
"nginx" : {
"$ref" : "#/$defs/ExampleAppSchema-nullable",
"description" : "Config parameters for the NGINX example apps apps and exercises"
},
"petclinic" : {
"$ref" : "#/$defs/ExampleAppSchema-nullable",
"description" : "Config parameters for the petclinic example apps apps and exercises"
}
},
"additionalProperties" : false,
"description" : "Config parameters for the example apps and exercises"
},
"ingressNginx" : {
"type" : [ "object", "null" ],
"properties" : {
Expand Down Expand Up @@ -632,45 +583,6 @@
"additionalProperties" : false,
"description" : "Config parameters for features or tools"
},
"images" : {
"type" : [ "object", "null" ],
"properties" : {
"helm" : {
"type" : [ "string", "null" ],
"description" : "Sets image for helm"
},
"helmKubeval" : {
"type" : [ "string", "null" ],
"description" : "Sets image for helmkubeval"
},
"kubectl" : {
"type" : [ "string", "null" ],
"description" : "Sets image for kubectl"
},
"kubeval" : {
"type" : [ "string", "null" ],
"description" : "Sets image for kubeval"
},
"maven" : {
"type" : [ "string", "null" ],
"description" : "Sets image for maven"
},
"nginx" : {
"type" : [ "string", "null" ],
"description" : "Sets image for nginx used in various applications"
},
"petclinic" : {
"type" : [ "string", "null" ],
"description" : "Sets image for petclinic used in various applications"
},
"yamllint" : {
"type" : [ "string", "null" ],
"description" : "Sets image for yamllint"
}
},
"additionalProperties" : false,
"description" : "Config params for images that do not belong to specific features"
},
"jenkins" : {
"type" : [ "object", "null" ],
"properties" : {
Expand Down Expand Up @@ -861,29 +773,6 @@
"additionalProperties" : false,
"description" : "Config parameters for Registry"
},
"repositories" : {
"type" : [ "object", "null" ],
"properties" : {
"cesBuildLib" : {
"$ref" : "#/$defs/RepositorySchema-nullable",
"description" : "Repo to pull the ces-build-lib, used in examples and exercises as depedency of the gitops-build-lib"
},
"gitopsBuildLib" : {
"$ref" : "#/$defs/RepositorySchema-nullable",
"description" : "Repo to pull the gitops-build-lib, used in examples and exercises"
},
"springBootHelmChart" : {
"$ref" : "#/$defs/RepositorySchemaWithRef-nullable",
"description" : "Repo to pull the generic Spring Boot Helm chart, used in examples and exercises"
},
"springPetclinic" : {
"$ref" : "#/$defs/RepositorySchemaWithRef-nullable",
"description" : "Repo to pull the Spring Petclinic, used in examples and exercises"
}
},
"additionalProperties" : false,
"description" : "Config params for repositories used within GOP"
},
"scm" : {
"type" : [ "object", "null" ],
"properties" : {
Expand Down
3 changes: 3 additions & 0 deletions docs/content-loader/content-loader.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Example for a GOP content repository:

This document will use the short for "repo" from here on, for brevity.

In case for two registries or airgapped mode, you have to specify the registry sources via own config.yaml settings
unter the content.variables.images section.

# Table of contents
<!-- Update with `doctoc --notitle docs/content-loader/content-loader.md --maxlevel 2`. See https://github.com/thlorenz/doctoc -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: example-apps
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
project: argocd
source:
path: argocd/
repoURL: "http://scmm.${config.application.namePrefix}scm-manager.svc.cluster.local/scm/repo/${config.application.namePrefix}argocd/example-apps"
targetRevision: main
directory:
recurse: true
syncPolicy:
automated:
prune: false # is set to false to prevent projects to be deleted by accident
selfHeal: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# this misc-Application manages all resources in the misc folder in the gitops repository
# use the misc folder to deploy resources, which are needed for multiple other apps such as ServiceAccounts or shared ConfigMaps
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: misc-example-apps-production
namespace: ${config.application.namePrefix}argocd
spec:
project: example-apps
destination:
server: https://kubernetes.default.svc
# a namespace must be specified here, because teams are not allowed to deploy cluster-wide.
# You can specify a different namespace in the ressource YAMLs, if you are permitted to deploy in them
namespace: ${config.application.namePrefix}example-apps-production
source:
path: misc/
repoURL: "http://scmm.${config.application.namePrefix}scm-manager.svc.cluster.local/scm/repo/${config.application.namePrefix}argocd/example-apps"
targetRevision: main
directory:
recurse: true
syncPolicy:
automated:
prune: true
selfHeal: true
Loading