Skip to content

Commit b38f42d

Browse files
nihussmannThomasMichael1811
authored andcommitted
changed to Typed Config, renamed Schema to Config, removed Config Provider
1 parent 1f6b889 commit b38f42d

File tree

80 files changed

+1721
-1659
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1721
-1659
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ RUN cp /tmp/.gitconfig /dist/home/.gitconfig
9898
COPY scripts/jenkins/plugins /jenkins
9999
RUN /jenkins/download-plugins.sh /dist/gitops/jenkins-plugins
100100

101-
COPY src/main/groovy/com/cloudogu/gitops/config/schema/Schema.groovy /tmp/
101+
COPY src/main/groovy/com/cloudogu/gitops/config/Config.groovy /tmp/
102102
COPY scripts/downloadHelmCharts.sh /tmp/
103-
RUN cd /dist/gitops && /tmp/downloadHelmCharts.sh /tmp/Schema.groovy
103+
RUN cd /dist/gitops && /tmp/downloadHelmCharts.sh /tmp/Config.groovy
104104

105105
WORKDIR /tmp
106106
# Prepare local files for later stages
@@ -178,9 +178,9 @@ COPY --from=maven-build /app/gitops-playground.jar /app/
178178
# Create Graal native image config
179179
RUN java -agentlib:native-image-agent=config-output-dir=conf/ -jar gitops-playground.jar || true
180180
# Run again with different params in order to avoid NoSuchMethodException with config file
181-
RUN printf 'features:\n exampleApps:\n petclinic:\n baseDomain: "base"' > config.yaml && \
181+
RUN printf 'application:\n \"yes\": true\nfeatures:\n secrets:\n vault:\n mode: "dev"\n exampleApps:\n petclinic:\n baseDomain: ""' > config.yaml && \
182182
java -agentlib:native-image-agent=config-merge-dir=conf/ -jar gitops-playground.jar \
183-
--yes --config-file=config.yaml || true
183+
--trace --config-file=config.yaml || true
184184
# Run again with different params in order to avoid NoSuchMethodException with output-config file
185185
RUN java -agentlib:native-image-agent=config-merge-dir=conf/ -jar gitops-playground.jar \
186186
--yes --output-config-file || true

applications/cluster-resources/monitoring/prometheus-stack-helm-values.ftl.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ grafana:
201201
repository: ${sidecarImageObject.repository}
202202
tag: ${sidecarImageObject.tag}
203203
</#if>
204-
<#if mail.active??>
204+
<#if mail.active?? && mail.active>
205205
notifiers:
206206
notifiers.yaml:
207207
notifiers:
@@ -244,7 +244,7 @@ grafana:
244244
env:
245245
GF_SMTP_ENABLED: true
246246
GF_SMTP_FROM_ADDRESS: ${monitoring.grafanaEmailFrom}
247-
GF_SMTP_HOST: ${mail.smtpAddress}<#if mail.smtpPort?has_content>:${mail.smtpPort}</#if>
247+
GF_SMTP_HOST: ${mail.smtpAddress}<#if mail.smtpPort?has_content>:${mail.smtpPort?c}</#if>
248248
<#else>
249249
env:
250250
GF_SMTP_ENABLED: true

argocd/argocd/applications/argocd.ftl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
annotations:
77
# Only app with the sync-status-unknown alert, so that we only get one alert when SCM is not reachable.
88
# Otherwise, there would be a spam wave by every application everytime the SCM is not reachable.
9-
<#if mail.active??>
9+
<#if mail.active?? && mail.active>
1010
notifications.argoproj.io/subscribe.on-sync-status-unknown.email: ${argocd.emailToAdmin}
1111
</#if>
1212
# finalizer disabled, because otherwise everything under this Application would be deleted as well, if this Application is deleted by accident

argocd/argocd/argocd/values.ftl.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ argo-cd:
125125
# secrets are created dynamically in groovy, so they are not stored in git
126126
secret:
127127
create: false
128-
enabled: <#if mail.active??>true<#else>false</#if>
128+
enabled: <#if mail.active == true>true<#else>false</#if>
129129
argocdUrl: https://localhost:9092
130-
<#if mail.active??>
130+
<#if mail.active?? && mail.active>
131131
notifiers:
132132
service.email: |
133133
<#if mail.smtpAddress?has_content>
134134
host: ${mail.smtpAddress}
135-
<#if mail.smtpPort?has_content>port: ${mail.smtpPort}</#if>
135+
<#if mail.smtpPort??>port: ${mail.smtpPort?c}</#if>
136136
<#if mail.smtpUser?has_content>username: $email-username</#if>
137137
<#if mail.smtpPassword?has_content>password: $email-password</#if>
138138
<#else>

argocd/argocd/projects/argocd.ftl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: argocd
55
namespace: ${namePrefix}argocd
66
annotations:
7-
<#if mail.active??>
7+
<#if mail.active?? && mail.active>
88
notifications.argoproj.io/subscribe.email: ${argocd.emailToAdmin}
99
</#if>
1010
spec:

argocd/argocd/projects/cluster-resources.ftl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
# In a real-world scenario these might to into a separate namespace
66
namespace: ${namePrefix}argocd
77
annotations:
8-
<#if mail.active??>
8+
<#if mail.active?? && mail.active>
99
notifications.argoproj.io/subscribe.email: ${argocd.emailToAdmin}
1010
</#if>
1111
spec:

argocd/argocd/projects/default.ftl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: default
55
namespace: ${namePrefix}argocd
66
annotations:
7-
<#if mail.active??>
7+
<#if mail.active?? && mail.active>
88
notifications.argoproj.io/subscribe.email: ${argocd.emailToAdmin}
99
</#if>
1010
spec:

argocd/argocd/projects/example-apps.ftl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: example-apps
55
namespace: ${namePrefix}argocd
66
annotations:
7-
<#if mail.active??>
7+
<#if mail.active?? && mail.active>
88
notifications.argoproj.io/subscribe.email: ${argocd.emailToUser}
99
</#if>
1010
spec:

docs/configuration.schema.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -166,52 +166,52 @@
166166
}
167167
},
168168
"additionalProperties" : false,
169-
"description" : "Configuration Parameter for the ArgoCD Operator"
169+
"description" : "Config Parameter for the ArgoCD Operator"
170170
},
171171
"certManager" : {
172-
"type" : "object",
172+
"type" : [ "object", "null" ],
173173
"properties" : {
174174
"active" : {
175-
"type" : "boolean",
175+
"type" : [ "boolean", "null" ],
176176
"description" : "Sets and enables Cert Manager"
177177
},
178178
"helm" : {
179-
"type" : "object",
179+
"type" : [ "object", "null" ],
180180
"properties" : {
181181
"acmeSolverImage" : {
182-
"type" : "string",
182+
"type" : [ "string", "null" ],
183183
"description" : "Sets acmeSolver Image for Cert Manager"
184184
},
185185
"cainjectorImage" : {
186-
"type" : "string",
186+
"type" : [ "string", "null" ],
187187
"description" : "Sets cainjector Image for Cert Manager"
188188
},
189189
"chart" : {
190-
"type" : "string",
190+
"type" : [ "string", "null" ],
191191
"description" : "Name of the Helm chart"
192192
},
193193
"image" : {
194-
"type" : "string",
194+
"type" : [ "string", "null" ],
195195
"description" : "Sets image for Cert Manager"
196196
},
197197
"repoURL" : {
198-
"type" : "string",
198+
"type" : [ "string", "null" ],
199199
"description" : "Repository url from which the Helm chart should be obtained"
200200
},
201201
"startupAPICheckImage" : {
202-
"type" : "string",
202+
"type" : [ "string", "null" ],
203203
"description" : "Sets startupAPICheck Image for Cert Manager"
204204
},
205205
"values" : {
206-
"$ref" : "#/$defs/Map(String,Object)",
206+
"$ref" : "#/$defs/Map(String,Object)-nullable",
207207
"description" : "Helm values of the chart, allows overriding defaults and setting values that are not exposed as explicit configuration"
208208
},
209209
"version" : {
210-
"type" : "string",
210+
"type" : [ "string", "null" ],
211211
"description" : "The version of the Helm chart to be installed"
212212
},
213213
"webhookImage" : {
214-
"type" : "string",
214+
"type" : [ "string", "null" ],
215215
"description" : "Sets webhook Image for Cert Manager"
216216
}
217217
},

scm-manager/values.ftl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ extraEnv: |
77
- name: SCM_WEBAPP_INITIALPASSWORD
88
value: "${password}"
99
10-
<#if !remote>
10+
<#if remote?? && !remote>
1111
service:
1212
nodePort: 9091
1313
type: NodePort

0 commit comments

Comments
 (0)