Skip to content

Commit

Permalink
feat(Cleaning): Add new workflow for cleaning service module on build
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiodmota committed Sep 19, 2023
1 parent c8b4917 commit ea520d7
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 56 deletions.
1 change: 0 additions & 1 deletion charts/bpdm/charts/bpdm-cleaning-service-dummy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ description: A Helm chart for deploying the BPDM bridge dummy service
home: https://eclipse-tractusx.github.io/docs/kits/Business%20Partner%20Kit/Adoption%20View
sources:
- https://github.com/eclipse-tractusx/bpdm

maintainers:
- name: Nico Koprowski
- name: Fabio D. Mota
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{- define "bpdm-cleaning-service-dummy.poolServiceName" -}}
{{- define "bpdm-bridge.poolServiceName" -}}
{{- $config := .Values.applicationConfig -}}
{{- if and $config (not (empty $config.bpdm)) -}}
{{- $bpdm := $config.bpdm -}}
Expand All @@ -80,7 +80,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{- end }}

{{- define "bpdm-cleaning-service-dummy.gateServiceName" -}}
{{- define "bpdm-bridge.gateServiceName" -}}
{{- $config := .Values.applicationConfig -}}
{{- if and $config (not (empty $config.bpdm)) -}}
{{- $bpdm := $config.bpdm -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ data:
deployment.yml: |-
# Place for putting standard deployment configuration
# which can be overwritten by external.yml
# bpdm:
# datasource:
# host: {{ include "bpdm.postgresDependency" . }}
# pool:
# base-url: {{include "bpdm-bridge.poolServiceName" .}}
# gate:
# base-url: {{include "bpdm-bridge.gateServiceName" .}}
external.yml: |-
# External properties for overwriting application config
{{- if .Values.applicationConfig }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,40 +58,40 @@ spec:
value: {{.Values.springProfiles | join "," }}
- name: SPRING_CONFIG_IMPORT
value: "/etc/conf/deployment.yml,/etc/conf/external.yml,/etc/conf/secrets.yml"
ports:
- name: http
containerPort: 8084
protocol: TCP
# @url: https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-setting-up-health-checks-with-readiness-and-liveness-probes
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12}}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12}}
startupProbe:
{{- toYaml .Values.startupProbe | nindent 12}}
resources:
{{- toYaml .Values.resources | nindent 12}}
volumeMounts:
- mountPath: /etc/conf
name: config
readOnly: true
{{- with .Values.nodeSelector}}
nodeSelector:
{{- toYaml . | nindent 8}}
{{- end}}
{{- with .Values.affinity}}
affinity:
{{- toYaml . | nindent 8}}
{{- end}}
{{- with .Values.tolerations}}
tolerations:
{{- toYaml . | nindent 8}}
{{- end}}
volumes:
- name: config
projected:
sources:
- configMap:
name: {{include "bpdm.fullname" .}}
- secret:
name: {{include "bpdm.fullname" .}}
ports:
- name: http
containerPort: 8084
protocol: TCP
# @url: https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-setting-up-health-checks-with-readiness-and-liveness-probes
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12}}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12}}
startupProbe:
{{- toYaml .Values.startupProbe | nindent 12}}
resources:
{{- toYaml .Values.resources | nindent 12}}
volumeMounts:
- mountPath: /etc/conf
name: config
readOnly: true
{{- with .Values.nodeSelector}}
nodeSelector:
{{- toYaml . | nindent 8}}
{{- end}}
{{- with .Values.affinity}}
affinity:
{{- toYaml . | nindent 8}}
{{- end}}
{{- with .Values.tolerations}}
tolerations:
{{- toYaml . | nindent 8}}
{{- end}}
volumes:
- name: config
projected:
sources:
- configMap:
name: {{include "bpdm.fullname" .}}
- secret:
name: {{include "bpdm.fullname" .}}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ apiVersion: networking.k8s.io/v1
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
{{- end}}
kind: Ingress
metadata:
name: {{$fullName}}
Expand Down
25 changes: 10 additions & 15 deletions charts/bpdm/charts/bpdm-cleaning-service-dummy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,29 +89,28 @@ livenessProbe:
port: 8084
scheme: HTTP
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 10
initialDelaySeconds: 5
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 10
timeoutSeconds: 1
readinessProbe:
httpGet:
path: "/actuator/health/readiness"
port: 8084
scheme: HTTP
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 5
successThreshold: 1
initialDelaySeconds: 30
periodSeconds: 20
timeoutSeconds: 10
timeoutSeconds: 1
startupProbe:
httpGet:
path: "/actuator/health/readiness"
port: 8084
scheme: HTTP
initialDelaySeconds: 300
periodSeconds: 20
timeoutSeconds: 10

initialDelaySeconds: 60
failureThreshold: 20
periodSeconds: 15


# Used to overwrite the default property values of the application configuration
Expand All @@ -128,8 +127,4 @@ applicationSecrets:
# saas:
# api-key: ...

#postgres:
# enabled: true
# auth:
# database: bpdm
# username: bpdm

0 comments on commit ea520d7

Please sign in to comment.