Skip to content

Commit

Permalink
chore: fix auto-generated golden values
Browse files Browse the repository at this point in the history
  • Loading branch information
aabouzaid committed Jun 10, 2024
1 parent 198378c commit 90b1417
Show file tree
Hide file tree
Showing 47 changed files with 127 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (s *deploymentTemplateTest) TestContainerOverwriteGlobalImageTag() {
// given
options := &helm.Options{
SetValues: map[string]string{
"global.image.tag": "a.b.c",
"global.image.tag": "a.b.c",
"operate.image.tag": "",
},
KubectlOptions: k8s.NewKubectlOptions("", "", s.namespace),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ func TestGoldenDefaultsTemplateSecrets(t *testing.T) {
Release: "camunda-platform-test",
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
IgnoredLines: []string{`\s+.*-secret:\s+.*`}, // secrets are auto-generated and need to be ignored.
Templates: []string{"templates/camunda/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
"connectors.ingress.enabled": "true",
"connectors.serviceAccount.enabled": "true",
},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ spec:
app.kubernetes.io/version: "8.3.12"
app.kubernetes.io/component: identity
annotations:
checksum/configmap-env-vars: 6c7ef0fa2711107bd9ddbc1bf38a6a288d33a245938705b6bc491d259e25dda1
spec:
imagePullSecrets:
[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
Templates: []string{"charts/identity/templates/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ spec:
app.kubernetes.io/version: "8.3.12"
app.kubernetes.io/component: operate
annotations:
checksum/config: bde67447bdbca7a7a4150d94d3bbc25e7d0d895acf449212e396d359748fdcbe
spec:
imagePullSecrets:
[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
Templates: []string{"templates/operate/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
Templates: []string{"templates/optimize/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ spec:
app.kubernetes.io/version: "8.3.12"
app.kubernetes.io/component: tasklist
annotations:
checksum/config: 03c5340155f4923f819495fa345f4ca73b6b85caeb40444e4c9df530c1006703
spec:
imagePullSecrets:
[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
Templates: []string{"templates/tasklist/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,18 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
Release: "camunda-platform-test",
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
IgnoredLines: []string{`\s+pusher-app-key:\s+.*`, `\s+pusher-app-secret:\s+.*`}, // secrets are auto-generated and need to be ignored
Templates: []string{"templates/web-modeler/" + name + ".yaml"},
SetValues: map[string]string{
"webModeler.enabled": "true",
"webModeler.restapi.mail.fromAddress": "example@example.com",
"postgresql.enabled": "true",
},
IgnoredLines: []string{
`\s+pusher-app-key:\s+.*`, // auto-generated and need to be ignored.
`\s+pusher-app-secret:\s+.*`, // auto-generated and need to be ignored.
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
Templates: []string{"templates/zeebe-gateway/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
Templates: []string{"templates/zeebe/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ func TestGoldenDefaultsTemplateSecrets(t *testing.T) {
Release: "camunda-platform-test",
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
IgnoredLines: []string{`\s+.*-secret:\s+.*`}, // secrets are auto-generated and need to be ignored.
Templates: []string{"templates/camunda/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
"connectors.ingress.enabled": "true",
"connectors.serviceAccount.enabled": "true",
},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,50 +22,41 @@ data:
releases:
- name: camunda-platform-test
namespace: camunda-platform
version: 9.3.5
components:
- name: Console
id: console
version: 8.4.60
url:
readiness: http://camunda-platform-test-console.camunda-platform:9100/health/readiness
metrics: http://camunda-platform-test-console.camunda-platform:9100/prometheus
- name: Keycloak
id: keycloak
version: 22.0.5
url: http:///auth
- name: Identity
id: identity
version: 8.4.8
url:
readiness: http://camunda-platform-test.camunda-platform:82/actuator/health
metrics: http://camunda-platform-test.camunda-platform:82/actuator/prometheus
- name: Operate
id: operate
version: 8.4.9
url:
readiness: http://camunda-platform-test-operate.camunda-platform:80/actuator/health/readiness
metrics: http://camunda-platform-test-operate.camunda-platform:80/actuator/prometheus
- name: Optimize
id: optimize
version: 8.4.5
url:
readiness: http://camunda-platform-test-optimize.camunda-platform:80/api/readyz
metrics: http://camunda-platform-test-optimize.camunda-platform:8092/actuator/prometheus
- name: Tasklist
id: tasklist
version: 8.4.8
url:
readiness: http://camunda-platform-test-tasklist.camunda-platform:80/actuator/health/readiness
metrics: http://camunda-platform-test-tasklist.camunda-platform:80/actuator/prometheus
- name: Zeebe Gateway
id: zeebeGateway
version: 8.4.8
url: grpc://
readiness: http://camunda-platform-test-zeebe-gateway.camunda-platform:9600/actuator/health/readiness
metrics: http://camunda-platform-test-zeebe-gateway.camunda-platform:9600/actuator/prometheus
- name: Zeebe
id: zeebe
version: 8.4.8
readiness: http://camunda-platform-test-zeebe.camunda-platform:9600/actuator/health/readiness
metrics: http://camunda-platform-test-zeebe.camunda-platform:9600/actuator/prometheus
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
SetValues: map[string]string{
"console.enabled": "true",
},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
`\s+version:\s+.*`, // ignore release version in console config.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ spec:
app.kubernetes.io/version: "8.4.8"
app.kubernetes.io/component: identity
annotations:
checksum/configmap-env-vars: 702d88fa1b3ad2380ef0ac28cbd05ea166d457ece20fb94ff0f97c5438cdfb28
spec:
imagePullSecrets:
[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
Templates: []string{"charts/identity/templates/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ spec:
app.kubernetes.io/version: "8.4.8"
app.kubernetes.io/component: operate
annotations:
checksum/config: c677453ef2facee65e51e8d7202133f3117fcc609bbc7d85acb8d8aac035a119
spec:
imagePullSecrets:
[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
Templates: []string{"templates/operate/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
Templates: []string{"templates/optimize/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ spec:
app.kubernetes.io/version: "8.4.8"
app.kubernetes.io/component: tasklist
annotations:
checksum/config: 330b5f9fd849adec522bfb1ab4eeac8ee63270cb767cf88a799756ecc3d5e3b0
spec:
imagePullSecrets:
[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
Templates: []string{"templates/tasklist/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,18 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
Release: "camunda-platform-test",
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
IgnoredLines: []string{`\s+pusher-app-key:\s+.*`, `\s+pusher-app-secret:\s+.*`}, // secrets are auto-generated and need to be ignored
Templates: []string{"templates/web-modeler/" + name + ".yaml"},
SetValues: map[string]string{
"webModeler.enabled": "true",
"webModeler.restapi.mail.fromAddress": "example@example.com",
"postgresql.enabled": "true",
},
IgnoredLines: []string{
`\s+pusher-app-key:\s+.*`, // auto-generated and need to be ignored.
`\s+pusher-app-secret:\s+.*`, // auto-generated and need to be ignored.
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
Templates: []string{"templates/zeebe-gateway/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
Templates: []string{"templates/zeebe/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ func TestGoldenDefaultsTemplateSecrets(t *testing.T) {
Release: "camunda-platform-test",
Namespace: "camunda-platform-" + strings.ToLower(random.UniqueId()),
GoldenFileName: name,
IgnoredLines: []string{`\s+.*-secret:\s+.*`}, // secrets are auto-generated and need to be ignored.
Templates: []string{"templates/camunda/" + name + ".yaml"},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ func TestGoldenKeycloakDefaults(t *testing.T) {
Release: "camunda-platform-test",
Namespace: "camunda",
GoldenFileName: "keycloak-statefulset",
// secrets are auto-generated and need to be ignored.
IgnoredLines: []string{
`\s+checksum/configmap-env-vars:\s+.*`,
`\s+checksum/secrets:\s+.*`,
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
// ExtraHelmArgs is used instead of Templates here because Keycloak is a dependency chart.
ExtraHelmArgs: []string{"--show-only", "charts/identityKeycloak/templates/statefulset.yaml"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ spec:
app.kubernetes.io/component: connectors
app.kubernetes.io/version: "8.5.3"
annotations:
checksum/config: 7b71d45df3fbf369b3ee7daf19401d44957b31fd1167aaf20ee383733395d7c6
spec:
imagePullSecrets:
[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ func TestGoldenDefaultsTemplate(t *testing.T) {
"connectors.ingress.enabled": "true",
"connectors.serviceAccount.enabled": "true",
},
IgnoredLines: []string{
`\s+.*-secret:\s+.*`, // secrets are auto-generated and need to be ignored.
`\s+checksum/.+?:\s+.*`, // ignore configmap checksum.
},
})
}
}
Loading

0 comments on commit 90b1417

Please sign in to comment.