Skip to content

Commit 67dfc5a

Browse files
mauriciovasquezbernalMrFreezeex
authored andcommitted
cilium-cli/clustermesh: Fix bad type for service type
Helm expects /clustermesh/apiserver/service/type to be a string according to install/kubernetes/cilium/values.schema.json:1404, but it was passed as a v1.ServiceType causing the following error: ``` cilium clustermesh enable --context cluster1 🔮 Auto-exposing service within Azure VPC (service.beta.kubernetes.io/azure-load-balancer-internal) Error: Unable to enable ClusterMesh: values don't meet the specifications of the schema(s) in the following chart(s): cilium: - at '/clustermesh/apiserver/service/type': invalid jsonType v1.ServiceType ``` This is fixed by casting it to a string. Fixes: 112e08d ("clustermesh: fix hardcode at service type") Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
1 parent 52b2145 commit 67dfc5a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cilium-cli/clustermesh/clustermesh.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ func generateEnableHelmValues(params Parameters, flavor k8s.Flavor) (map[string]
10051005
log("🔮 Auto-exposing service within GCP VPC (networking.gke.io/load-balancer-type=Internal)")
10061006
helmVals["clustermesh"].(map[string]any)["apiserver"] = map[string]any{
10071007
"service": map[string]any{
1008-
"type": corev1.ServiceTypeLoadBalancer,
1008+
"type": string(corev1.ServiceTypeLoadBalancer),
10091009
"annotations": map[string]any{
10101010
"networking.gke.io/load-balancer-type": "Internal",
10111011
// Allows cross-region access
@@ -1017,7 +1017,7 @@ func generateEnableHelmValues(params Parameters, flavor k8s.Flavor) (map[string]
10171017
log("🔮 Auto-exposing service within Azure VPC (service.beta.kubernetes.io/azure-load-balancer-internal)")
10181018
helmVals["clustermesh"].(map[string]any)["apiserver"] = map[string]any{
10191019
"service": map[string]any{
1020-
"type": corev1.ServiceTypeLoadBalancer,
1020+
"type": string(corev1.ServiceTypeLoadBalancer),
10211021
"annotations": map[string]any{
10221022
"service.beta.kubernetes.io/azure-load-balancer-internal": "true",
10231023
},
@@ -1027,7 +1027,7 @@ func generateEnableHelmValues(params Parameters, flavor k8s.Flavor) (map[string]
10271027
log("🔮 Auto-exposing service within AWS VPC (service.beta.kubernetes.io/aws-load-balancer-scheme: internal")
10281028
helmVals["clustermesh"].(map[string]any)["apiserver"] = map[string]any{
10291029
"service": map[string]any{
1030-
"type": corev1.ServiceTypeLoadBalancer,
1030+
"type": string(corev1.ServiceTypeLoadBalancer),
10311031
"annotations": map[string]any{
10321032
"service.beta.kubernetes.io/aws-load-balancer-scheme": "internal",
10331033
},

0 commit comments

Comments
 (0)