Skip to content

Commit

Permalink
chore(helm): update dpp helm chart, remove standalone backend chart
Browse files Browse the repository at this point in the history
  • Loading branch information
saudkhan116 committed Jun 24, 2024
1 parent bc259d6 commit 55b7175
Show file tree
Hide file tree
Showing 27 changed files with 65 additions and 1,586 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/helm-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ on:
node_image:
description: 'kindest/node image for k8s kind cluster'
# k8s version from 3.1 release as default
default: 'kindest/node:v1.27.3'
default: 'kindest/node:v1.30.0'
required: false
type: string
upgrade_from:
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
# upgrade version, default (v0.17.0) uses node image v1.21.1 and doesn't work with more recent node image versions
version: v0.19.0
# default value for event_name != workflow_dispatch
node_image: ${{ github.event.inputs.node_image || 'kindest/node:v1.27.3' }}
node_image: ${{ github.event.inputs.node_image || 'kindest/node:v1.30.0' }}

- name: Build image for frontend
id: build-frontend
Expand Down
5 changes: 3 additions & 2 deletions charts/digital-product-pass/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2022, 2024 BMW AG, Henkel AG & Co. KGaA
Copyright 2023, 2024 CGI Deutschland B.V. & Co. KG
Copyright 2022 BMW AG
Copyright 2022 Henkel AG & Co. KGaA
Copyright 2023 CGI Deutschland B.V. & Co. KG

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
18 changes: 17 additions & 1 deletion charts/digital-product-pass/templates/deployment-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,25 @@ spec:
volumeMounts:
{{- toYaml .Values.backend.volumeMounts | nindent 12 }}
ports:
- containerPort: 8888
- containerPort: {{ .Values.backend.service.port }}
name: http
protocol: TCP
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: {{ .Values.livenessProbe.path }}
port: {{ .Values.livenessProbe.port }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} # trigger initial livenessProbe after 60 seconds
periodSeconds: {{ .Values.livenessProbe.periodSeconds }} # check livenessProbe after every 5 minutes
{{- end }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: {{ .Values.readinessProbe.path }}
port: {{ .Values.readinessProbe.port }}
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} # trigger initial readinessProbe after 60 seconds
periodSeconds: {{ .Values.readinessProbe.periodSeconds }} # check readinessProbe after every 5 minutes
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
# SPDX-License-Identifier: Apache-2.0
#################################################################################

---

{{- if .Values.frontend.enabled -}}

apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -116,7 +120,7 @@ spec:
- name: "VERSION"
value: "{{ .Chart.AppVersion }}"
ports:
- containerPort: 8080
- containerPort: {{ .Values.frontend.service.port }}
name: http
protocol: TCP
resources:
Expand All @@ -133,3 +137,4 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/digital-product-pass/templates/ingress-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ spec:
service:
name: {{ $fullName }}
port:
number: 8888
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: 8888
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
10 changes: 8 additions & 2 deletions charts/digital-product-pass/templates/ingress-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
# SPDX-License-Identifier: Apache-2.0
#################################################################################

---

{{- if .Values.frontend.enabled -}}


{{- if .Values.frontend.ingress.enabled -}}
{{- $fullName := .Values.frontend.name -}}
{{- $svcPort := .Values.frontend.service.port -}}
Expand Down Expand Up @@ -79,11 +84,12 @@ spec:
service:
name: {{ $fullName }}
port:
number: 8080
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: 8080
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/digital-product-pass/templates/service-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ metadata:
spec:
type: {{ .Values.backend.service.type }}
ports:
- port: {{ .Values.backend.service.port }} # host port
targetPort: 8888 # container port
- port: {{ .Values.backend.service.port }} # host port
targetPort: {{ .Values.backend.service.port }} # container port
protocol: TCP
name: http
selector:
Expand Down
10 changes: 7 additions & 3 deletions charts/digital-product-pass/templates/service-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
# SPDX-License-Identifier: Apache-2.0
#################################################################################

---

{{- if .Values.frontend.enabled -}}

apiVersion: v1
kind: Service
metadata:
Expand All @@ -32,11 +36,11 @@ metadata:
spec:
type: {{ .Values.frontend.service.type }}
ports:
- port: {{ .Values.frontend.service.port }} # host port
targetPort: 8080 # container port
- port: {{ .Values.frontend.service.port }} # host port
targetPort: {{ .Values.frontend.service.port }} # container port
protocol: TCP
name: http
selector:
{{- include "chart.selectorLabels" . | nindent 4 }}
component: frontend

{{- end }}
1 change: 1 addition & 0 deletions charts/digital-product-pass/values-int.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ backend:


frontend:
enabled: true
image:
pullPolicy: Always
ingress:
Expand Down
21 changes: 16 additions & 5 deletions charts/digital-product-pass/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,8 @@ backend:

passport:
aspects:
- "urn:bamm:io.catenax.generic.digital_product_passport:1.0.0#DigitalProductPassport"
- "urn:bamm:io.catenax.battery.battery_pass:3.0.1#BatteryPass"
- urn:samm:io.catenax.battery.battery_pass:6.0.0#BatteryPass
- "urn:bamm:io.catenax.transmission.transmission_pass:1.0.0#TransmissionPass"
- urn:samm:io.catenax.transmission.transmission_pass:3.0.0#TransmissionPass
- "urn:samm:io.catenax.generic.digital_product_passport:2.0.0#DigitalProductPassport"
- urn:samm:io.catenax.generic.digital_product_passport:5.0.0#DigitalProductPassport
# -- configuration for policies to filter in the digital product pass asset negotiation
policyCheck:
Expand Down Expand Up @@ -265,6 +261,7 @@ backend:
delay: 1000

frontend:
enabled: true
name: "dpp-frontend"
image:
repository: docker.io/tractusx/digital-product-pass-frontend
Expand Down Expand Up @@ -298,7 +295,7 @@ frontend:
runAsUser: 1000
# -- Processes within a pod will belong to this guid
runAsGroup: 3000
# -- The owner for volumes and any files created within volumes will belong to this guid
# -- The owner for volumes and any files created within volumes will belong to this guide
fsGroup: 3000

# The [container security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) defines privilege and access control settings for a Container within a pod
Expand Down Expand Up @@ -390,6 +387,20 @@ resources:
cpu: 250m
memory: 512Mi

livenessProbe:
enabled: false
path: /health
port: 8888
initialDelaySeconds: 60 # trigger initial readinessProbe after 60 seconds
periodSeconds: 300 # check readinessProbe after every 5 minutes

readinessProbe:
enabled: false
path: /health
port: 8888
initialDelaySeconds: 60 # trigger initial readinessProbe after 60 seconds
periodSeconds: 300 # check readinessProbe after every 5 minutes

# [node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) to constrain pods to nodes
nodeSelector: {}

Expand Down
50 changes: 0 additions & 50 deletions dpp-backend/charts/digital-product-pass-backend/.helmignore

This file was deleted.

51 changes: 0 additions & 51 deletions dpp-backend/charts/digital-product-pass-backend/Chart.yaml

This file was deleted.

Loading

0 comments on commit 55b7175

Please sign in to comment.