Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add dataprovider charts #53

Merged
merged 38 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
57bf654
chore: add submodelservers chart
ds-jhartmann Feb 28, 2024
9530866
chore: add dataprovider chart with testdata seeding
ds-jhartmann Feb 28, 2024
d76b25a
chore: add tx-data-provider as provider and consumer to umbrella chart
ds-jhartmann Feb 28, 2024
42279c5
chore: fix issues with chart linting
ds-jhartmann Feb 28, 2024
ea0f4a8
chore: update umbrella chart version
ds-jhartmann Feb 28, 2024
0226a09
chore: fix issues with chart linting
ds-jhartmann Feb 28, 2024
7274844
chore: fix issues with chart linting
ds-jhartmann Feb 29, 2024
abb3f05
chore: fix issues with chart linting
ds-jhartmann Feb 29, 2024
ca05949
Merge remote-tracking branch 'origin/main' into chore/add-dataprovide…
ds-jhartmann Feb 29, 2024
dc6e36b
chore: minor config improvements
ds-jhartmann Mar 7, 2024
4ba8cd9
chore: remove submodelservers and switch to simple-data-backend
ds-jhartmann Mar 7, 2024
be81cc3
chore: remove submodelservers and switch to simple-data-backend
ds-jhartmann Mar 7, 2024
af1a901
chore: disable ingresses
ds-jhartmann Mar 19, 2024
c476539
chore: replace dedicated edc postgres with bundled postgres
ds-jhartmann Mar 19, 2024
7f16815
chore: radd templates for internal urls
ds-jhartmann Mar 19, 2024
b0d2d16
chore: add templating for configured urls
ds-jhartmann Mar 20, 2024
6d460ec
chore: cleanup values
ds-jhartmann Mar 20, 2024
943c830
Merge branch 'main' into chore/add-dataprovider-charts
ds-jhartmann Mar 20, 2024
bbf48a4
Merge remote-tracking branch 'origin/main' into chore/add-dataprovide…
ds-jhartmann Apr 4, 2024
3b81cdb
chore: fix linting
ds-jhartmann Apr 4, 2024
2ad3109
chore: add generated edc secrets
ds-jhartmann Apr 4, 2024
af6c95d
chore: fix image name
ds-jhartmann Apr 4, 2024
13be3b0
chore: reduce dtr name length
ds-jhartmann Apr 4, 2024
97d85b0
chore: disable provider component
ds-jhartmann Apr 5, 2024
c865a8b
Merge remote-tracking branch 'refs/remotes/origin/main' into chore/ad…
ds-jhartmann Apr 16, 2024
4939e2b
chore: bump chart version
ds-jhartmann Apr 16, 2024
3d85576
chore: add tx-data-provider to helm checks
evegufy Apr 16, 2024
a9768d7
Merge pull request #64 from eclipse-tractusx/chore/helm-checks-tx-dat…
ds-jhartmann Apr 16, 2024
d97bc35
chore: move vault to data provider chart
ds-jhartmann Apr 18, 2024
fff0739
chore: fix chart linting
ds-jhartmann Apr 18, 2024
08c05e7
chore: fix chart linting
ds-jhartmann Apr 18, 2024
eefb4f7
chore: fix chart linting
ds-jhartmann Apr 18, 2024
c741ae1
chore: fix chart linting
ds-jhartmann Apr 18, 2024
5a22457
chore: fix vault setup
ds-jhartmann Apr 18, 2024
b1d9c9f
chore: bump chart version
ds-jhartmann Apr 18, 2024
cebe057
Merge branch 'refs/heads/main' into chore/add-dataprovider-charts
ds-jhartmann Apr 18, 2024
30b8e2f
chore: enable dataprovider chart
ds-jhartmann Apr 18, 2024
c5fac71
chore: increase install timeout
ds-jhartmann Apr 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions charts/submodelservers/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# #############################################################################
# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
# #############################################################################

# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

# Ignore ENV specific values at release
values?*.yaml
values?*.yml
44 changes: 44 additions & 0 deletions charts/submodelservers/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# #############################################################################
# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
# #############################################################################
---
apiVersion: v2
name: submodelservers
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.0.1"
22 changes: 22 additions & 0 deletions charts/submodelservers/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "submodelservers.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "submodelservers.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "submodelservers.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "submodelservers.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}
83 changes: 83 additions & 0 deletions charts/submodelservers/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{{/*
*******************************************************************************
* Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
* Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
*******************************************************************************
*/}}
{{/*
Expand the name of the chart.
*/}}
{{- define "submodelservers.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "submodelservers.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "submodelservers.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "submodelservers.labels" -}}
helm.sh/chart: {{ include "submodelservers.chart" . }}
{{ include "submodelservers.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "submodelservers.selectorLabels" -}}
app.kubernetes.io/name: {{ include "submodelservers.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "submodelservers.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "submodelservers.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
76 changes: 76 additions & 0 deletions charts/submodelservers/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# #############################################################################
# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
# #############################################################################
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "submodelservers.fullname" . }}
labels:
{{- include "submodelservers.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "submodelservers.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "submodelservers.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "submodelservers.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: default
containerPort: {{ .Values.backend.endpoint.default.port }}
protocol: TCP
- name: metrics
containerPort: 8090
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
48 changes: 48 additions & 0 deletions charts/submodelservers/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# #############################################################################
# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
# #############################################################################
---
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "submodelservers.fullname" . }}
labels:
{{- include "submodelservers.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "submodelservers.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
Loading
Loading