From 022a454f1bd44cf9398393e445b0894cdc9b5309 Mon Sep 17 00:00:00 2001 From: louiseschmidtgen Date: Wed, 5 Jun 2024 08:45:04 +0200 Subject: [PATCH] minor fixes --- docs/src/snap/howto/networking/default-network.md | 5 +++-- src/k8s/pkg/k8sd/features/contour/gateway.go | 4 ++-- src/k8s/pkg/k8sd/features/contour/ingress.go | 6 ------ 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/docs/src/snap/howto/networking/default-network.md b/docs/src/snap/howto/networking/default-network.md index 54c6cf863..ef951c6d1 100644 --- a/docs/src/snap/howto/networking/default-network.md +++ b/docs/src/snap/howto/networking/default-network.md @@ -62,7 +62,8 @@ sudo k8s kubectl exec -it cilium-97vcw -n kube-system -c cilium-agent \ -- cilium status ``` -You should see a wide range of metrics and configuration values for your cluster. +You should see a wide range of metrics and configuration values for your +cluster. ## Disable Network @@ -75,7 +76,7 @@ You can `disable` the built-in network: disabling Network. ``` -If you currently have gateway enabled run `sudo k8s disable gateway` +If your underlying network is cilium you will have to run `sudo k8s disable gateway` before disabling network. ``` diff --git a/src/k8s/pkg/k8sd/features/contour/gateway.go b/src/k8s/pkg/k8sd/features/contour/gateway.go index 434a4ddf9..c17a1c603 100644 --- a/src/k8s/pkg/k8sd/features/contour/gateway.go +++ b/src/k8s/pkg/k8sd/features/contour/gateway.go @@ -39,14 +39,14 @@ func ApplyGateway(ctx context.Context, snap snap.Snap, gateway types.Gateway, ne } changed, err := m.Apply(ctx, chartContour, helm.StateUpgradeOnlyOrDeleted(network.GetEnabled()), values) if err != nil { - return fmt.Errorf("failed to apply Gateway API cilium configuration: %w", err) + return fmt.Errorf("failed to apply Gateway API contour configuration: %w", err) } if !changed || !gateway.GetEnabled() { return nil } if err := rolloutRestartContour(ctx, snap, 3); err != nil { - return fmt.Errorf("failed to rollout restart cilium to apply Gateway API: %w", err) + return fmt.Errorf("failed to rollout restart contour to apply Gateway API: %w", err) } return nil diff --git a/src/k8s/pkg/k8sd/features/contour/ingress.go b/src/k8s/pkg/k8sd/features/contour/ingress.go index 3cb71ab11..ae3ee9bf9 100644 --- a/src/k8s/pkg/k8sd/features/contour/ingress.go +++ b/src/k8s/pkg/k8sd/features/contour/ingress.go @@ -26,12 +26,6 @@ func ApplyIngress(ctx context.Context, snap snap.Snap, ingress types.Ingress, ne "tls": map[string]any{ "envoy-client-certificate": ingress.GetDefaultTLSSecret(), //TODO: I think this is wrong }, - "gateway": map[string]any{ - "gatewayRef": map[string]any{ - "name": "gateway", - "namespace": "project-contour", - }, - }, } }