From 1a6bca42692c70f083649ff1c997f4f718e5d668 Mon Sep 17 00:00:00 2001 From: Starttoaster Date: Sat, 11 Jan 2025 12:47:19 -0600 Subject: [PATCH] Set datalayer http daemon port to not conflict with main chia container --- api/v1/chiadatalayer_types.go | 1 + config/crd/bases/k8s.chia.net_chiadatalayers.yaml | 1 - .../samples/{k8s_v1_chiadatalayer.yaml => chiadatalayer.yaml} | 0 internal/controller/chiadatalayer/assemblers.go | 4 ++++ 4 files changed, 5 insertions(+), 1 deletion(-) rename config/samples/{k8s_v1_chiadatalayer.yaml => chiadatalayer.yaml} (100%) diff --git a/api/v1/chiadatalayer_types.go b/api/v1/chiadatalayer_types.go index ee9a4c1..9857a7a 100644 --- a/api/v1/chiadatalayer_types.go +++ b/api/v1/chiadatalayer_types.go @@ -17,6 +17,7 @@ type ChiaDataLayerSpec struct { ChiaConfig ChiaDataLayerSpecChia `json:"chia"` // DataLayerHTTPConfig defines the desired state of an optional data_layer_http sidecar + // +optional DataLayerHTTPConfig ChiaDataLayerHTTPSpecChia `json:"dataLayerHTTP"` // Strategy describes how to replace existing pods with new ones. diff --git a/config/crd/bases/k8s.chia.net_chiadatalayers.yaml b/config/crd/bases/k8s.chia.net_chiadatalayers.yaml index 601d0e5..9e9bebb 100644 --- a/config/crd/bases/k8s.chia.net_chiadatalayers.yaml +++ b/config/crd/bases/k8s.chia.net_chiadatalayers.yaml @@ -10656,7 +10656,6 @@ spec: type: array required: - chia - - dataLayerHTTP type: object status: description: ChiaDataLayerStatus defines the observed state of ChiaDataLayer diff --git a/config/samples/k8s_v1_chiadatalayer.yaml b/config/samples/chiadatalayer.yaml similarity index 100% rename from config/samples/k8s_v1_chiadatalayer.yaml rename to config/samples/chiadatalayer.yaml diff --git a/internal/controller/chiadatalayer/assemblers.go b/internal/controller/chiadatalayer/assemblers.go index 4b5d555..1d7a8ff 100644 --- a/internal/controller/chiadatalayer/assemblers.go +++ b/internal/controller/chiadatalayer/assemblers.go @@ -399,6 +399,10 @@ func assembleDatalayerHTTPContainer(datalayer k8schianetv1.ChiaDataLayer) corev1 Name: "chia.data_layer.server_files_location", Value: "/datalayer/server", }, + { + Name: "chia.daemon_port", + Value: "55401", // Avoids port conflict with the main chia container + }, }, VolumeMounts: []corev1.VolumeMount{ {