Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install sail-operator 0.1.0 #944

Merged
merged 6 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Comment on lines +6 to +7
Copy link
Member Author

@adam-cattermole adam-cattermole Oct 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that whilst the supported versions listed here are the ones permitted by the CRD, the operator fails to configure the supported profile when set to v1.22.4 so in reality there's only the option of v1.23.0

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What version of GWAPI does that align with?

Copy link
Member Author

@adam-cattermole adam-cattermole Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe v1.23 is still GWAPI v1.1 and istio v1.24 will support GWAPI v1.2

# 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
Loading