Skip to content

Commit

Permalink
Install sail-operator 0.1.0 (#944)
Browse files Browse the repository at this point in the history
* Re-enable sail integration test

Add back fail-fast removal

Signed-off-by: Adam Cattermole <[email protected]>

* Install sail-operator v0.1.0

Signed-off-by: Adam Cattermole <[email protected]>

* Istio installed using Sail operator added to integration tests (#954)

Additionally, istio default intallation tool in dev environments now it is Sail Operator

Signed-off-by: Eguzki Astiz Lezaun <[email protected]>

* Use sail as default for quickstart

Signed-off-by: Adam Cattermole <[email protected]>

* Update quickstart sail installation

Signed-off-by: Adam Cattermole <[email protected]>

* Add helm to development doc

Signed-off-by: Adam Cattermole <[email protected]>

---------

Signed-off-by: Adam Cattermole <[email protected]>
Signed-off-by: Eguzki Astiz Lezaun <[email protected]>
Co-authored-by: Eguzki Astiz Lezaun <[email protected]>
  • Loading branch information
2 people authored and maleck13 committed Nov 13, 2024
1 parent cb75a5f commit bd1978e
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 46 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
include:
- gatewayapi-provider: istio
istio-type: istioctl
# - gatewayapi-provider: istio
# istio-type: sail
- gatewayapi-provider: istio
istio-type: sail
- gatewayapi-provider: envoygateway
fail-fast: false
runs-on: ubuntu-latest
Expand Down Expand Up @@ -203,7 +203,12 @@ jobs:
name: Integration Tests for kuadrant-operator/tests/[gatewayapi-provider]
strategy:
matrix:
gatewayapi-provider: [istio, envoygateway]
include:
- gatewayapi-provider: istio
istio-type: istioctl
- gatewayapi-provider: istio
istio-type: sail
- gatewayapi-provider: envoygateway
fail-fast: false
runs-on: ubuntu-latest
env:
Expand All @@ -230,9 +235,9 @@ jobs:
- name: Check cluster info
run: |
kubectl cluster-info dump
- name: Run make ${{ matrix.gatewayapi-provider }}-env-setup
- name: Run make ${{ matrix.gatewayapi-provider }}-env-setup ISTIO_INSTALL_SAIL=${{ matrix.istio-type == 'sail' && true || false }}
run: |
make ${{ matrix.gatewayapi-provider }}-env-setup
make ${{ matrix.gatewayapi-provider }}-env-setup ISTIO_INSTALL_SAIL=${{ matrix.istio-type == 'sail' && true || false }}
- name: Run integration tests
run: |
make test-${{ matrix.gatewayapi-provider }}-env-integration
Expand Down
11 changes: 0 additions & 11 deletions config/dependencies/istio/sail/deployment_patch.yaml

This file was deleted.

9 changes: 3 additions & 6 deletions config/dependencies/istio/sail/istio.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
apiVersion: operator.istio.io/v1alpha1
apiVersion: sailoperator.io/v1alpha1
kind: Istio
metadata:
name: default
spec:
version: v1.20.0
# Supported values for sail-operator v0.1.0 are [v1.22.4,v1.23.0]
version: v1.23.0
namespace: istio-system
# Disable autoscaling to reduce dev resources
values:
pilot:
autoscaleEnabled: false
rawValues:
gateways:
istio-ingressgateway:
autoscaleEnabled: false
10 changes: 0 additions & 10 deletions config/dependencies/istio/sail/kustomization.yaml

This file was deleted.

6 changes: 4 additions & 2 deletions doc/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* [go] version 1.22+
* [kubernetes] version v1.19+
* [kubectl] version v1.19+
* [helm]

## Build

Expand Down Expand Up @@ -253,8 +254,8 @@ Multiple controller integration tests are defined
| --- | --- | --- | --- |
| `github.com/kuadrant/kuadrant-operator/tests/bare_k8s` | no gateway provider, no GatewayAPI CRDs. Just Kuadrant API and Kuadrant dependencies. | `make local-k8s-env-setup` | `make test-bare-k8s-integration` |
| `github.com/kuadrant/kuadrant-operator/tests/gatewayapi` | no gateway provider. GatewayAPI CRDs, Kuadrant API and Kuadrant dependencies. | `make local-gatewayapi-env-setup` | `make test-gatewayapi-env-integration` |
| `github.com/kuadrant/kuadrant-operator/controllers` | at least one gatewayapi provider. It can be any: istio, envoygateway, ... | `make local-env-setup GATEWAYAPI_PROVIDER=[istio \| envoygateway]` (Default *istio*) | `make test-integration GATEWAYAPI_PROVIDER=[istio \| envoygateway]` (Default *istio*) |
| `github.com/kuadrant/kuadrant-operator/tests/istio` | GatewayAPI CRDs, Istio, Kuadrant API and Kuadrant dependencies. | `make local-env-setup GATEWAYAPI_PROVIDER=istio` | `make test-istio-env-integration` |
| `github.com/kuadrant/kuadrant-operator/controllers` | at least one gatewayapi provider. It can be any: istio, envoygateway, ... | `make local-env-setup GATEWAYAPI_PROVIDER=[istio \| envoygateway] [ISTIO_INSTALL_SAIL=false]` (Default *istio*) | `make test-integration GATEWAYAPI_PROVIDER=[istio \| envoygateway]` (Default *istio*) |
| `github.com/kuadrant/kuadrant-operator/tests/istio` | GatewayAPI CRDs, Istio, Kuadrant API and Kuadrant dependencies. | `make local-env-setup GATEWAYAPI_PROVIDER=istio [ISTIO_INSTALL_SAIL=false]` | `make test-istio-env-integration` |
| `github.com/kuadrant/kuadrant-operator/tests/envoygateway` | GatewayAPI CRDs, EnvoyGateway, Kuadrant API and Kuadrant dependencies. | `make local-env-setup GATEWAYAPI_PROVIDER=envoygateway` | `make test-envoygateway-env-integration` |

### Lint tests
Expand All @@ -279,3 +280,4 @@ make uninstall
[kind]:https://kind.sigs.k8s.io/
[kubernetes]:https://kubernetes.io/
[kubectl]:https://kubernetes.io/docs/tasks/tools/#kubectl
[helm]:https://helm.sh/
11 changes: 8 additions & 3 deletions hack/quickstart-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ if [ -z $MGC_REF ]; then
fi

if [ -z $ISTIO_INSTALL_SAIL ]; then
ISTIO_INSTALL_SAIL=${ISTIO_INSTALL_SAIL:=false}
ISTIO_INSTALL_SAIL=${ISTIO_INSTALL_SAIL:=true}
SAIL_VERSION=${SAIL_VERSION:="0.1.0"}
fi

export TOOLS_IMAGE=quay.io/kuadrant/mgc-tools:latest
Expand Down Expand Up @@ -402,8 +403,12 @@ success "Gateway API installed successfully."
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 istio-system wait --for=condition=Available deployment istio-operator --timeout=300s
${HELM_BIN} install sail-operator \
--create-namespace \
--namespace istio-system \
--wait \
--timeout=300s \
https://github.com/istio-ecosystem/sail-operator/releases/download/${SAIL_VERSION}/sail-operator-${SAIL_VERSION}.tgz
kubectl apply -f ${KUADRANT_REPO_RAW}/config/dependencies/istio/sail/istio.yaml
else
# Create CRD first to prevent race condition with creating CR
Expand Down
23 changes: 14 additions & 9 deletions make/istio.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
ISTIO_INSTALL_DIR = config/dependencies/istio
ISTIO_NAMESPACE = istio-system
## installs project sail vs istioctl install
ISTIO_INSTALL_SAIL ?= false
ifeq (true,$(ISTIO_INSTALL_SAIL))
INSTALL_COMMAND=sail-install
else
ISTIO_INSTALL_SAIL ?= true
ifeq (false,$(ISTIO_INSTALL_SAIL))
INSTALL_COMMAND=istioctl-install
else
INSTALL_COMMAND=sail-install
endif

# istioctl tool
Expand Down Expand Up @@ -39,16 +39,21 @@ istioctl-uninstall: istioctl ## Uninstall istio.
istioctl-verify-install: istioctl ## Verify istio installation.
$(ISTIOCTL) verify-install -i $(ISTIO_NAMESPACE)

SAIL_VERSION = 0.1.0
.PHONY: sail-install
sail-install: kustomize
$(KUSTOMIZE) build $(ISTIO_INSTALL_DIR)/sail | kubectl apply -f -
kubectl -n $(ISTIO_NAMESPACE) wait --for=condition=Available deployment istio-operator --timeout=300s
sail-install: helm
$(HELM) install sail-operator \
--create-namespace \
--namespace $(ISTIO_NAMESPACE) \
--wait \
--timeout=300s \
https://github.com/istio-ecosystem/sail-operator/releases/download/$(SAIL_VERSION)/sail-operator-$(SAIL_VERSION).tgz
kubectl apply -f $(ISTIO_INSTALL_DIR)/sail/istio.yaml

.PHONY: sail-uninstall
sail-uninstall: kustomize
sail-uninstall: helm
kubectl delete -f $(ISTIO_INSTALL_DIR)/sail/istio.yaml
$(KUSTOMIZE) build $(ISTIO_INSTALL_DIR)/sail | kubectl delete -f -
$(HELM) uninstall sail-operator

.PHONY: istio-install
istio-install:
Expand Down

0 comments on commit bd1978e

Please sign in to comment.