Skip to content

Commit

Permalink
refactor: update Tasklist with monorepo configuration (#1718)
Browse files Browse the repository at this point in the history
  • Loading branch information
houssain-barouni authored Jun 20, 2024
1 parent 427d71b commit c47e4cd
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ metadata:
{{- include "tasklist.labels" . | nindent 4 }}
data:
{{- if .Values.tasklist.configuration }}
application.yml: |
application.yaml: |
{{ .Values.tasklist.configuration | indent 4 | trim }}
{{- else }}
application.yml: |
application.yaml: |
{{- if .Values.tasklist.contextPath }}
server:
servlet:
Expand Down Expand Up @@ -104,8 +104,8 @@ data:
{{- end }}
# Zeebe instance
zeebe:
# Broker contact point
brokerContactPoint: "{{ tpl .Values.global.zeebeClusterName . }}-gateway:{{ .Values.zeebeGateway.service.grpcPort }}"
# Gateway address
gatewayAddress: "{{ tpl .Values.global.zeebeClusterName . }}-gateway:{{ .Values.zeebeGateway.service.grpcPort }}"
restAddress: "http://{{ tpl .Values.global.zeebeClusterName . }}-gateway:{{ .Values.zeebeGateway.service.restPort }}"
{{- if .Values.tasklist.retention.enabled }}
archiver:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,8 @@ spec:
{{- end }}
volumeMounts:
- name: config
mountPath: /app/resources/application.yml
subPath: application.yml
- name: config
mountPath: /usr/local/tasklist/config/application.yml
subPath: application.yml
mountPath: /usr/local/tasklist/config/application.yaml
subPath: application.yaml
- mountPath: /tmp
name: tmp
- mountPath: /camunda
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (s *configMapTemplateTest) TestContainerShouldAddContextPath() {
var configmapApplication TasklistConfigYAML
helm.UnmarshalK8SYaml(s.T(), output, &configmap)

err := yaml.Unmarshal([]byte(configmap.Data["application.yml"]), &configmapApplication)
err := yaml.Unmarshal([]byte(configmap.Data["application.yaml"]), &configmapApplication)
if err != nil {
s.Fail("Failed to unmarshal yaml. error=", err)
}
Expand All @@ -90,7 +90,7 @@ func (s *configMapTemplateTest) TestContainerShouldDisableOperateIntegration() {
var configmapApplication TasklistConfigYAML
helm.UnmarshalK8SYaml(s.T(), output, &configmap)

err := yaml.Unmarshal([]byte(configmap.Data["application.yml"]), &configmapApplication)
err := yaml.Unmarshal([]byte(configmap.Data["application.yaml"]), &configmapApplication)
if err != nil {
s.Fail("Failed to unmarshal yaml. error=", err)
}
Expand All @@ -117,7 +117,7 @@ func (s *configMapTemplateTest) TestRedirectRootUrlTrimsComplexSuffixes() {
var configmapApplication TasklistConfigYAML
helm.UnmarshalK8SYaml(s.T(), output, &configmap)

err := yaml.Unmarshal([]byte(configmap.Data["application.yml"]), &configmapApplication)
err := yaml.Unmarshal([]byte(configmap.Data["application.yaml"]), &configmapApplication)
if err != nil {
s.Fail("Failed to unmarshal yaml. error=", err)
}
Expand All @@ -141,7 +141,7 @@ func (s *configMapTemplateTest) TestTasklistMultiTenancyEnabled() {
var configmapApplication TasklistConfigYAML
helm.UnmarshalK8SYaml(s.T(), output, &configmap)

err := yaml.Unmarshal([]byte(configmap.Data["application.yml"]), &configmapApplication)
err := yaml.Unmarshal([]byte(configmap.Data["application.yaml"]), &configmapApplication)
if err != nil {
s.Fail("Failed to unmarshal yaml. error=", err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,8 @@ camunda.tasklist:
}
}
s.Require().Equal("config", volumeMount.Name)
s.Require().Equal("/usr/local/tasklist/config/application.yml", volumeMount.MountPath)
s.Require().Equal("application.yml", volumeMount.SubPath)
s.Require().Equal("/usr/local/tasklist/config/application.yaml", volumeMount.MountPath)
s.Require().Equal("application.yaml", volumeMount.SubPath)

s.Require().Equal("config", volume.Name)
s.Require().Equal("camunda-platform-test-tasklist-configuration", volume.ConfigMap.Name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
app.kubernetes.io/component: tasklist
app.kubernetes.io/version: "8.6.0-alpha2"
data:
application.yml: |
application.yaml: |
spring:
profiles:
active: identity-auth
Expand Down Expand Up @@ -66,8 +66,8 @@ data:
url: "http://camunda-platform-test-elasticsearch:9200"
# Zeebe instance
zeebe:
# Broker contact point
brokerContactPoint: "camunda-platform-test-zeebe-gateway:26500"
# Gateway address
gatewayAddress: "camunda-platform-test-zeebe-gateway:26500"
restAddress: "http://camunda-platform-test-zeebe-gateway:8080"
#Spring Boot Actuator endpoints to be exposed
management.endpoints.web.exposure.include: health,info,conditions,configprops,prometheus,loggers,usage-metrics,backups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,8 @@ spec:
timeoutSeconds: 1
volumeMounts:
- name: config
mountPath: /app/resources/application.yml
subPath: application.yml
- name: config
mountPath: /usr/local/tasklist/config/application.yml
subPath: application.yml
mountPath: /usr/local/tasklist/config/application.yaml
subPath: application.yaml
- mountPath: /tmp
name: tmp
- mountPath: /camunda
Expand Down

0 comments on commit c47e4cd

Please sign in to comment.