Skip to content

Commit

Permalink
fix: enable resource config & remove unnecessary configs from helm-ch…
Browse files Browse the repository at this point in the history
…arts (#1277)

* fix: enable resource config & remove unnecessary configs from helm-charts

* remove duplicate line in migration guide

* streamline services regarding labels & annotations

* add missing network policy to azure chart

* Update values documentations

* Remove value `businessPartnerValidation.log.agreementValidation`

* Remove helm-docs version from README.md footer

Removing this avoids changing README.md files if someone uses a different version.

* Remove unnecessary values from memory chart

* fix merge conflict left overs

* fix broken indentations

* add documentation about control api

* fix missing empty line at EOF

* update copyright

* update test deployment values

* remove usage of `businessPartnerValidation.log.agreementValidation`

* update dependency file

* fix wrong require

* Remove unnecessary if statement for required value

* Use similar memory values for control and dataplane

* Regenerate README.md's
  • Loading branch information
florianrusch-zf authored Jun 13, 2024
1 parent b68a379 commit 356f507
Show file tree
Hide file tree
Showing 24 changed files with 618 additions and 445 deletions.
132 changes: 68 additions & 64 deletions charts/tractusx-connector-azure-vault/README.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion charts/tractusx-connector-azure-vault/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ helm install my-release tractusx-edc/tractusx-connector-azure-vault --version {{

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
----------------------------------------------
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs/)
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ spec:
## IATP / STS / DIM CONFIG ##
#############################
- name: "EDC_IAM_STS_OAUTH_TOKEN_URL"
value: {{ .Values.iatp.sts.oauth.token_url | required ".Values.iatp.oauth.token_url is required" | quote}}
value: {{ .Values.iatp.sts.oauth.token_url | required ".Values.iatp.sts.oauth.token_url is required" | quote}}
- name: "EDC_IAM_STS_OAUTH_CLIENT_ID"
value: {{ .Values.iatp.sts.oauth.client.id | required ".Values.iatp.sts.oauth.client.id is required" | quote}}
- name: "EDC_IAM_STS_OAUTH_CLIENT_SECRET_ALIAS"
Expand All @@ -289,10 +289,8 @@ spec:
## BDRS CLIENT ##
#################

{{- if .Values.controlplane.bdrs.server.url }}
- name: "TX_IAM_IATP_BDRS_SERVER_URL"
value: {{ .Values.controlplane.bdrs.server.url | required ".Values.controlplane.bdrs.server.url is required" | quote }}
{{- end }}
{{- if .Values.controlplane.bdrs.cache_validity_seconds }}
- name: "TX_IAM_IATP_BDRS_CACHE_VALIDITY"
value: {{ .Values.controlplane.bdrs.cache_validity_seconds | quote}}
Expand Down Expand Up @@ -322,14 +320,6 @@ spec:
value: {{ .Values.vault.azure.certificate | quote }}
{{- end }}



###########################
## BUSINESS PARTNER NUMBER VALIDATION EXTENSION ##
###########################
- name: "TRACTUSX_BUSINESSPARTNERVALIDATION_LOG_AGREEMENT_VALIDATION"
value: {{ .Values.controlplane.businessPartnerValidation.log.agreementValidation | quote }}

######################################
## Additional environment variables ##
######################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ spec:
## IATP / STS / DIM CONFIG ##
#############################
- name: "EDC_IAM_STS_OAUTH_TOKEN_URL"
value: {{ .Values.iatp.sts.oauth.token_url | required ".Values.iatp.oauth.token_url is required" | quote}}
value: {{ .Values.iatp.sts.oauth.token_url | required ".Values.iatp.sts.oauth.token_url is required" | quote}}
- name: "EDC_IAM_STS_OAUTH_CLIENT_ID"
value: {{ .Values.iatp.sts.oauth.client.id | required ".Values.iatp.sts.oauth.client.id is required" | quote}}
- name: "EDC_IAM_STS_OAUTH_CLIENT_SECRET_ALIAS"
Expand Down
46 changes: 46 additions & 0 deletions charts/tractusx-connector-azure-vault/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#################################################################################
# Copyright (c) 2024 ZF Friedrichshafen AG
# Copyright (c) 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 eq (.Values.networkPolicy.enabled | toString) "true" }}
{{- range tuple "controlplane" "dataplane" }}
{{- $name := . }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "txdc.fullname" $ }}-{{ $name }}
labels:
{{- include (printf "txdc.%s.labels" $name) $ | nindent 4 }}
spec:
podSelector:
matchLabels:
{{- include (printf "txdc.%s.selectorLabels" $name) $ | nindent 6 }}
ingress:
- from:
{{- toYaml (index $.Values.networkPolicy $name "from") | nindent 6 }}
ports:
{{- range $key,$value := (index $.Values $name "endpoints") }}
- port: {{ $value.port }}
protocol: TCP
{{- end }}
policyTypes:
- Ingress
---
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#################################################################################
# Copyright (c) 2023 ZF Friedrichshafen AG
# Copyright (c) 2023,2024 ZF Friedrichshafen AG
# Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH
# Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# Copyright (c) 2021,2023 Contributors to the Eclipse Foundation
# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -26,9 +26,16 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "txdc.fullname" . }}-controlplane
namespace: {{ .Release.Namespace | default "default" | quote }}
namespace: {{ .Release.Namespace }}
{{- with .Values.controlplane.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "txdc.controlplane.labels" . | nindent 4 }}
{{- with .Values.controlplane.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.controlplane.service.type }}
ports:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
#################################################################################
# Copyright (c) 2024 ZF Friedrichshafen AG
# Copyright (c) 2023,2024 Contributors to the Eclipse Foundation
#
# Copyright (c) 2023 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
#
# 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: v1
kind: Service
metadata:
name: {{ include "txdc.fullname" . }}-dataplane
namespace: {{ .Release.Namespace | default "default" | quote }}
namespace: {{ .Release.Namespace }}
{{- with .Values.dataplane.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "txdc.dataplane.labels" . | nindent 4 }}
{{- with .Values.dataplane.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.dataplane.service.type }}
ports:
Expand Down
Loading

0 comments on commit 356f507

Please sign in to comment.