Skip to content

Commit 9c88ae0

Browse files
authored
fix: fixed cors and template issues (#717)
* fixed persistence and changed formatting * release canidate for chart version 2.0.0
1 parent 24a002f commit 9c88ae0

31 files changed

Lines changed: 466 additions & 234 deletions

examples/cloud/Chart.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
name: aas-basyx-v2-full
33
description: Umbrella chart for the AAS Basyx v2 Environment
44
type: application
5-
version: 0.0.1
6-
appVersion: 0.0.1
5+
version: 2.0.0
6+
appVersion: 2.0.0
77

88
dependencies:
99
# Contains frontend, backend and dashboard
@@ -36,8 +36,6 @@ dependencies:
3636
repository: https://charts.bitnami.com/bitnami
3737
alias: mongodb
3838
condition: mongodb.enabled
39-
# Isolation der MongoDB-Variablen durch eigenen Namespace
40-
namespace: project-factory-x
4139
- repository: https://charts.bitnami.com/bitnami
4240
name: keycloak
4341
version: 24.4.11

examples/cloud/dependency_charts/aas-discovery/templates/aas-discovery-apirule.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@ metadata:
77
name: {{ include "aas-discovery.fullname" . }}
88
spec:
99
gateway: kyma-system/kyma-gateway
10+
{{- if .Values.apirule.corsPolicy }}
11+
corsPolicy:
12+
{{- with .Values.apirule.corsPolicy }}
13+
{{- toYaml . | nindent 4 }}
14+
{{- end }}
15+
{{- end }}
1016
hosts:
11-
- {{ .Values.apirule.host }}
17+
- {{ .Values.apirule.host }}
1218
service:
1319
name: {{ include "aas-discovery.fullname" . }}
1420
port: {{ .Values.service.port }}
1521
timeout: 360
1622
rules:
17-
- path: /*
18-
methods: {{- toYaml .Values.apirule.methods | nindent 6 }}
19-
noAuth: true
23+
- path: /*
24+
methods: {{- toYaml .Values.apirule.methods | nindent 6 }}
25+
noAuth: true
2026
{{ end -}}

examples/cloud/dependency_charts/aas-discovery/templates/aas-discovery-deployment.yaml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,28 @@ spec:
2424
{{- toYaml . | nindent 8 }}
2525
{{- end }}
2626
containers:
27-
- name: {{ .Chart.Name }}
28-
image: {{ .Values.image.name }}
29-
imagePullPolicy: {{ .Values.image.pullPolicy }}
30-
ports:
31-
- name: http
32-
containerPort: {{ .Values.service.port }}
33-
protocol: TCP
34-
volumeMounts:
35-
- mountPath: /application/application.properties
36-
name: {{ template "aas-discovery.fullname" $ }}-config
37-
subPath: application.properties
38-
- mountPath: /application/rbac-rules.json
39-
name: {{ template "aas-discovery.fullname" $ }}-rbac-rules
40-
subPath: rbac-rules.json
27+
- name: {{ .Chart.Name }}
28+
image: {{ .Values.image.name }}
29+
imagePullPolicy: {{ .Values.image.pullPolicy }}
30+
env:
31+
- name: SERVER_PORT
32+
value: {{ .Values.service.port | quote }}
33+
ports:
34+
- name: http
35+
containerPort: {{ .Values.service.port }}
36+
protocol: TCP
37+
volumeMounts:
38+
- mountPath: /application/application.properties
39+
name: {{ template "aas-discovery.fullname" $ }}-config
40+
subPath: application.properties
41+
- mountPath: /application/rbac-rules.json
42+
name: {{ template "aas-discovery.fullname" $ }}-rbac-rules
43+
subPath: rbac-rules.json
4144
volumes:
42-
- name: {{ template "aas-discovery.fullname" $ }}-config
43-
configMap:
44-
name: {{ template "aas-discovery.fullname" $ }}-config
45-
- name: {{ template "aas-discovery.fullname" $ }}-rbac-rules
46-
configMap:
47-
name: {{ template "aas-discovery.fullname" $ }}-rbac-rules
45+
- name: {{ template "aas-discovery.fullname" $ }}-config
46+
configMap:
47+
name: {{ template "aas-discovery.fullname" $ }}-config
48+
- name: {{ template "aas-discovery.fullname" $ }}-rbac-rules
49+
configMap:
50+
name: {{ template "aas-discovery.fullname" $ }}-rbac-rules
4851
{{ end -}}

examples/cloud/dependency_charts/aas-discovery/templates/aas-discovery-ingress.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ metadata:
1010
cert-manager.io/cluster-issuer: letsencrypt-prod
1111
spec:
1212
tls:
13-
- hosts:
14-
- {{ .Values.ingress.host }}
15-
secretName: {{ include "aas-discovery.fullname" . }}-tls
13+
- hosts:
14+
- {{ .Values.ingress.host }}
15+
secretName: {{ include "aas-discovery.fullname" . }}-tls
1616
rules:
1717
- host: {{ .Values.ingress.host }}
1818
http:

examples/cloud/dependency_charts/aas-discovery/templates/aas-discovery-service.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ metadata:
88
spec:
99
type: {{ .Values.service.type }}
1010
ports:
11-
- port: {{ .Values.service.port }}
12-
targetPort: http
13-
protocol: TCP
14-
name: http
11+
- port: {{ .Values.service.port }}
12+
targetPort: http
13+
protocol: TCP
14+
name: http
1515
selector:
1616
{{- include "aas-discovery.selectorLabels" . | nindent 4 }}
1717
{{ end -}}

examples/cloud/dependency_charts/aas-discovery/values.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,22 @@ apirule:
3131
- "OPTIONS"
3232
- "TRACE"
3333
- "PATCH"
34+
# -- Allows configuring CORS headers sent with the response. If corsPolicy is not defined, the CORS headers are enforced to be empty.
35+
corsPolicy:
36+
allowMethods:
37+
- POST
38+
- GET
39+
- PUT
40+
- DELETE
41+
- PATCH
42+
- OPTIONS
43+
- HEAD
44+
allowOrigins:
45+
- regex: ".*" # allow all origins
46+
allowCredentials: true
3447

3548
# Content of application.properties
3649
config: |
37-
server.port=8080
3850
spring.application.name=AAS Discovery Service
3951
4052
basyx.aasdiscoveryservice.name=aas-discovery-service

examples/cloud/dependency_charts/aas-environment/templates/aas-environment-apirule.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@ metadata:
77
name: {{ include "aas-environment.fullname" . }}
88
spec:
99
gateway: kyma-system/kyma-gateway
10+
{{- if .Values.apirule.corsPolicy }}
11+
corsPolicy:
12+
{{- with .Values.apirule.corsPolicy }}
13+
{{- toYaml . | nindent 4 }}
14+
{{- end }}
15+
{{- end }}
1016
hosts:
11-
- {{ .Values.apirule.host }}
17+
- {{ .Values.apirule.host }}
1218
service:
1319
name: {{ include "aas-environment.fullname" . }}
1420
port: {{ .Values.service.port }}
1521
timeout: 360
1622
rules:
17-
- path: /*
18-
methods: {{- toYaml .Values.apirule.methods | nindent 6 }}
19-
noAuth: true
23+
- path: /*
24+
methods: {{- toYaml .Values.apirule.methods | nindent 6 }}
25+
noAuth: true
2026
{{ end -}}

examples/cloud/dependency_charts/aas-environment/templates/aas-environment-deployment.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ spec:
1919
{{- include "aas-environment.selectorLabels" . | nindent 8 }}
2020
spec:
2121
volumes:
22-
{{- if .Values.startup.enabled }}
23-
- name: startup
24-
emptyDir: {}
25-
{{- end }}
26-
- name: {{ template "aas-environment.fullname" $ }}-config
27-
configMap:
28-
name: {{ template "aas-environment.fullname" $ }}-config
22+
{{- if .Values.startup.enabled }}
23+
- name: startup
24+
emptyDir: {}
25+
{{- end }}
26+
- name: {{ template "aas-environment.fullname" $ }}-config
27+
configMap:
28+
name: {{ template "aas-environment.fullname" $ }}-config
2929
{{- with .Values.imagePullSecrets }}
3030
imagePullSecrets:
3131
{{- toYaml . | nindent 8 }}
@@ -49,6 +49,9 @@ spec:
4949
- name: {{ .Chart.Name }}
5050
image: {{ .Values.image.name }}
5151
imagePullPolicy: {{ .Values.image.pullPolicy }}
52+
env:
53+
- name: SERVER_PORT
54+
value: {{ .Values.service.port | quote }}
5255
ports:
5356
- name: http
5457
containerPort: {{ .Values.service.port }}

examples/cloud/dependency_charts/aas-environment/templates/aas-environment-ingress.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ metadata:
1010
cert-manager.io/cluster-issuer: letsencrypt-prod
1111
spec:
1212
tls:
13-
- hosts:
14-
- {{ .Values.ingress.host }}
15-
secretName: {{ include "aas-environment.fullname" . }}-tls
13+
- hosts:
14+
- {{ .Values.ingress.host }}
15+
secretName: {{ include "aas-environment.fullname" . }}-tls
1616
rules:
1717
- host: {{ .Values.ingress.host }}
1818
http:

examples/cloud/dependency_charts/aas-environment/templates/aas-environment-service.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ metadata:
77
spec:
88
type: {{ .Values.service.type }}
99
ports:
10-
- port: {{ .Values.service.port }}
11-
targetPort: http
12-
protocol: TCP
13-
name: http
10+
- port: {{ .Values.service.port }}
11+
targetPort: http
12+
protocol: TCP
13+
name: http
1414
selector:
1515
{{- include "aas-environment.selectorLabels" . | nindent 4 }}

0 commit comments

Comments
 (0)