Skip to content

Commit

Permalink
Use istio/envoy-gateway for provider namespace
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Cattermole <[email protected]>
  • Loading branch information
adam-cattermole committed Sep 3, 2024
1 parent f28b2b0 commit 7819f2f
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/verify-dashboards-alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
kind create cluster
# Install Istio
kubectl apply -k config/dependencies/istio/sail
kubectl -n gateway-system wait --for=condition=Available deployment istio-operator --timeout=300s
kubectl -n istio-system wait --for=condition=Available deployment istio-operator --timeout=300s
kubectl apply -f config/dependencies/istio/sail/istio.yaml
# Install Observability Stack (Grafana and Prometheus)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
# Adds namespace to all resources.
namespace: gateway-system
resources:
- namespace.yaml
- gateway-class.yaml
- gateway.yaml
5 changes: 5 additions & 0 deletions config/dependencies/envoy-gateway/gateway/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: gateway-system
1 change: 1 addition & 0 deletions config/dependencies/istio/gateway/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
# Adds namespace to all resources.
namespace: gateway-system
resources:
- namespace.yaml
- gateway.yaml
5 changes: 5 additions & 0 deletions config/dependencies/istio/gateway/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: gateway-system
6 changes: 3 additions & 3 deletions config/dependencies/istio/istio-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
namespace: gateway-system
namespace: istio-system
name: istiocontrolplane
spec:
profile: default
namespace: gateway-system
namespace: istio-system
components:
base:
enabled: true
Expand All @@ -28,4 +28,4 @@ spec:
pilot:
autoscaleEnabled: false
global:
istioNamespace: gateway-system
istioNamespace: istio-system
4 changes: 2 additions & 2 deletions config/dependencies/istio/sail/istio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ metadata:
name: default
spec:
version: v1.20.0
namespace: gateway-system
namespace: istio-system
# Disable autoscaling to reduce dev resources
values:
pilot:
autoscaleEnabled: false
rawValues:
gateways:
kuadrant-ingressgateway:
istio-ingressgateway:
autoscaleEnabled: false
2 changes: 1 addition & 1 deletion config/dependencies/istio/sail/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
namespace: gateway-system
namespace: istio-system
resources:
- github.com/maistra/istio-operator/config/default?ref=b7f5286be0bc25cb257bc439e7c18acb99dce26f
# commit sha from prior to removal of kustomize manifests
Expand Down
2 changes: 1 addition & 1 deletion controllers/kuadrant_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func controlPlaneConfigMapName() string {
}

func controlPlaneProviderNamespace() string {
return env.GetString("ISTIOOPERATOR_NAMESPACE", "gateway-system")
return env.GetString("ISTIOOPERATOR_NAMESPACE", "istio-system")
}

func controlPlaneProviderName() string {
Expand Down
4 changes: 2 additions & 2 deletions hack/quickstart-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -402,15 +402,15 @@ info "Installing Istio as a Gateway API provider... 🛫"
if [ "$ISTIO_INSTALL_SAIL" = true ]; then
info "Installing Istio via Sail"
kubectl apply -k ${KUADRANT_ISTIO_KUSTOMIZATION}
kubectl -n gateway-system wait --for=condition=Available deployment istio-operator --timeout=300s
kubectl -n istio-system wait --for=condition=Available deployment istio-operator --timeout=300s
kubectl apply -f ${KUADRANT_REPO_RAW}/config/dependencies/istio/sail/istio.yaml
else
# Create CRD first to prevent race condition with creating CR
info "Generating Istio configuration... 🛠️"
kubectl kustomize ${MGC_ISTIO_KUSTOMIZATION} >${TMP_DIR}/doctmp
success "Istio configuration generated."
${YQ_BIN} 'select(.kind == "CustomResourceDefinition")' ${TMP_DIR}/doctmp | kubectl apply -f -
kubectl -n gateway-system wait --for=condition=established crd/istiooperators.install.istio.io --timeout=60s
kubectl -n istio-system wait --for=condition=established crd/istiooperators.install.istio.io --timeout=60s
cat ${TMP_DIR}/doctmp | kubectl apply -f -
kubectl -n istio-operator wait --for=condition=Available deployment istio-operator --timeout=300s
fi
Expand Down
6 changes: 3 additions & 3 deletions make/development-environments.mk
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ istio-env-setup: ## Install Istio, istio gateway and gatewayapi-env-setup
$(MAKE) deploy-istio-gateway
@echo
@echo "Now you can open local access to the istio gateway by doing:"
@echo "kubectl port-forward -n $(ISTIO_NAMESPACE) service/kuadrant-ingressgateway-istio 9080:80 &"
@echo "kubectl port-forward -n gateway-system service/kuadrant-ingressgateway-istio 9080:80 &"
@echo "export GATEWAY_URL=localhost:9080"
@echo "after that, you can curl -H \"Host: myhost.com\" \$$GATEWAY_URL"
@echo "-- Linux only -- Ingress gateway is exported using loadbalancer service in port 80"
@echo "export INGRESS_HOST=\$$(kubectl get gtw kuadrant-ingressgateway -n $(ISTIO_NAMESPACE) -o jsonpath='{.status.addresses[0].value}')"
@echo "export INGRESS_PORT=\$$(kubectl get gtw kuadrant-ingressgateway -n $(ISTIO_NAMESPACE) -o jsonpath='{.spec.listeners[?(@.name==\"http\")].port}')"
@echo "export INGRESS_HOST=\$$(kubectl get gtw kuadrant-ingressgateway -n gateway-system -o jsonpath='{.status.addresses[0].value}')"
@echo "export INGRESS_PORT=\$$(kubectl get gtw kuadrant-ingressgateway -n gateway-system -o jsonpath='{.spec.listeners[?(@.name==\"http\")].port}')"
@echo "export GATEWAY_URL=\$$INGRESS_HOST:\$$INGRESS_PORT"
@echo "curl -H \"Host: myhost.com\" \$$GATEWAY_URL"
@echo
Expand Down
2 changes: 1 addition & 1 deletion make/envoy-gateway.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Targets to help install and configure EG

EG_CONFIG_DIR = config/dependencies/envoy-gateway
EG_NAMESPACE = gateway-system
EG_NAMESPACE = envoy-gateway-system

# egctl tool
EGCTL=$(PROJECT_PATH)/bin/egctl
Expand Down
2 changes: 1 addition & 1 deletion make/istio.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Targets to help install and configure istio

ISTIO_INSTALL_DIR = config/dependencies/istio
ISTIO_NAMESPACE = gateway-system
ISTIO_NAMESPACE = istio-system
## installs project sail vs istioctl install
ISTIO_INSTALL_SAIL ?= false
ifeq (true,$(ISTIO_INSTALL_SAIL))
Expand Down

0 comments on commit 7819f2f

Please sign in to comment.