From 69fb33c6d2cf032d17a8dc505ba2782f01277d49 Mon Sep 17 00:00:00 2001 From: Sebastian Becker Date: Thu, 19 Dec 2024 11:27:11 +0100 Subject: [PATCH] chore(service/chart): address PR review findings Signed-off-by: Sebastian Becker --- charts/ephemeral/templates/discovery.yaml | 8 ++++---- charts/ephemeral/templates/ephemeral.yaml | 4 ++-- charts/ephemeral/templates/network-controller.yaml | 4 ++-- charts/ephemeral/values.yaml | 13 ++++--------- cmd/discovery/main.go | 2 +- cmd/discovery/main_test.go | 2 +- pkg/discovery/transport/client/client.go | 2 +- pkg/ephemeral/spdz.go | 2 +- 8 files changed, 16 insertions(+), 21 deletions(-) diff --git a/charts/ephemeral/templates/discovery.yaml b/charts/ephemeral/templates/discovery.yaml index 7eb99566..a7664e5d 100644 --- a/charts/ephemeral/templates/discovery.yaml +++ b/charts/ephemeral/templates/discovery.yaml @@ -48,7 +48,7 @@ spec: name: discovery-config - name: tls-secret-volume secret: - secretName: {{ .Values.discovery.tls.secret }} + secretName: {{ .Values.tls.secret }} serviceAccountName: discovery --- kind: Service @@ -80,7 +80,7 @@ data: "frontendURL": "{{ .Values.discovery.frontendUrl }}", "masterHost": "{{ .Values.discovery.master.host }}", "masterPort": "{{ .Values.discovery.master.port }}", - "tlsEnabled": {{ .Values.discovery.tls.enabled }}, + "tlsEnabled": {{ .Values.tls.enabled }}, "slave": {{ if .Values.discovery.isMaster }}false{{ else }}true{{ end }}, "playerCount": {{ .Values.playerCount }}, "stateTimeout": "{{ .Values.discovery.stateTimeout }}", @@ -96,14 +96,14 @@ spec: selector: istio: ingressgateway # use istio default controller servers: -{{- if .Values.discovery.tls.enabled }} +{{- if .Values.tls.enabled }} - port: number: 31400 name: cs-grpc protocol: HTTPS tls: mode: MUTUAL # enables mTLS on the Gateway - credentialName: {{ .Values.discovery.tls.secret }} # the name of the Secret that holds the TLS certs and CA certificate + credentialName: {{ .Values.tls.secret }} # the name of the Secret that holds the TLS certs and CA certificate hosts: - "*" {{- else }} diff --git a/charts/ephemeral/templates/ephemeral.yaml b/charts/ephemeral/templates/ephemeral.yaml index db24954b..6581882b 100644 --- a/charts/ephemeral/templates/ephemeral.yaml +++ b/charts/ephemeral/templates/ephemeral.yaml @@ -73,7 +73,7 @@ spec: name: {{ include "ephemeral.fullname" . }}-config1 - name: tls-secret-volume secret: - secretName: {{ .Values.ephemeral.tls.secret }} + secretName: {{ .Values.tls.secret }} serviceAccountName: knative-serving --- apiVersion: v1 @@ -108,7 +108,7 @@ data: "tupleStock": {{ .Values.ephemeral.castor.tupleStock }} }, "frontendURL": "{{ .Values.ephemeral.frontendUrl }}", - "tlsEnabled": {{ .Values.ephemeral.tls.enabled }}, + "tlsEnabled": {{ .Values.tls.enabled }}, "discoveryConfig": { "host": "{{ .Values.ephemeral.discovery.host }}", "port": "{{ .Values.ephemeral.discovery.port }}", diff --git a/charts/ephemeral/templates/network-controller.yaml b/charts/ephemeral/templates/network-controller.yaml index 773cb181..820324ac 100644 --- a/charts/ephemeral/templates/network-controller.yaml +++ b/charts/ephemeral/templates/network-controller.yaml @@ -58,6 +58,6 @@ metadata: data: config.json: |- { - "tlsEnabled": {{ .Values.networkController.tls.enabled }}, - "tlsSecret": "{{ .Values.networkController.tls.secret }}" + "tlsEnabled": {{ .Values.tls.enabled }}, + "tlsSecret": "{{ .Values.tls.secret }}" } diff --git a/charts/ephemeral/values.yaml b/charts/ephemeral/values.yaml index 0e47c18e..5398f23e 100644 --- a/charts/ephemeral/values.yaml +++ b/charts/ephemeral/values.yaml @@ -8,6 +8,10 @@ # This file defines the default values for all variables used in the Ephemeral Helm Chart. playerCount: 2 +tls: + enabled: false + secret: + discovery: service: annotations: [] @@ -26,9 +30,6 @@ discovery: computationTimeout : "600s" slave: connectTimeout: "60s" - tls: - enabled: false - secret: ephemeral: service: @@ -64,9 +65,6 @@ ephemeral: path: "/" tupleStock: 1000 frontendUrl: - tls: - enabled: false - secret: discovery: host: discovery.default.svc.cluster.local port: 8080 @@ -92,6 +90,3 @@ networkController: tag: latest pullPolicy: "IfNotPresent" pullSecrets: [] - tls: - enabled: false - secret: diff --git a/cmd/discovery/main.go b/cmd/discovery/main.go index 0c5c35d9..9c80e4f2 100644 --- a/cmd/discovery/main.go +++ b/cmd/discovery/main.go @@ -1,4 +1,4 @@ -// Copyright (c) 2021-2023 - for information on the respective copyright owner +// Copyright (c) 2021-2024 - for information on the respective copyright owner // see the NOTICE file and/or the repository https://github.com/carbynestack/ephemeral. // // SPDX-License-Identifier: Apache-2.0 diff --git a/cmd/discovery/main_test.go b/cmd/discovery/main_test.go index b20b1d6d..f3109f95 100644 --- a/cmd/discovery/main_test.go +++ b/cmd/discovery/main_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2021-2023 - for information on the respective copyright owner +// Copyright (c) 2021-2024 - for information on the respective copyright owner // see the NOTICE file and/or the repository https://github.com/carbynestack/ephemeral. // // SPDX-License-Identifier: Apache-2.0 diff --git a/pkg/discovery/transport/client/client.go b/pkg/discovery/transport/client/client.go index ffb7d3cc..b190d387 100644 --- a/pkg/discovery/transport/client/client.go +++ b/pkg/discovery/transport/client/client.go @@ -1,4 +1,4 @@ -// Copyright (c) 2021-2023 - for information on the respective copyright owner +// Copyright (c) 2021-2024 - for information on the respective copyright owner // see the NOTICE file and/or the repository https://github.com/carbynestack/ephemeral. // // SPDX-License-Identifier: Apache-2.0 diff --git a/pkg/ephemeral/spdz.go b/pkg/ephemeral/spdz.go index 44a1e633..1d16a3b4 100644 --- a/pkg/ephemeral/spdz.go +++ b/pkg/ephemeral/spdz.go @@ -1,4 +1,4 @@ -// Copyright (c) 2021-2023 - for information on the respective copyright owner +// Copyright (c) 2021-2024 - for information on the respective copyright owner // see the NOTICE file and/or the repository https://github.com/carbynestack/ephemeral. // // SPDX-License-Identifier: Apache-2.0