diff --git a/Makefile b/Makefile index 09e67599..d632ee4f 100644 --- a/Makefile +++ b/Makefile @@ -186,16 +186,13 @@ endif install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/crd | $(KUBECTL) apply -f - ## helm creates objects without aibrix prefix, hence deploying gateway components outside of kustomization - helm install eg oci://docker.io/envoyproxy/gateway-helm --version v1.1.0 -n aibrix-system - $(KUBECTL) wait --timeout=5m -n aibrix-system deployment/envoy-gateway --for=condition=Available - $(KUBECTL) apply -f config/gateway/gateway.yaml + $(KUBECTL) create -k config/dependency .PHONY: uninstall uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. $(KUSTOMIZE) build config/crd | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f - - $(KUBECTL) delete -f config/gateway/gateway.yaml - helm uninstall eg -n aibrix-system + $(KUBECTL) delete -k config/dependency .PHONY: deploy deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. diff --git a/config/dependency/envoy_config_patch.yaml b/config/dependency/envoy_config_patch.yaml new file mode 100644 index 00000000..a2cca8f9 --- /dev/null +++ b/config/dependency/envoy_config_patch.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: envoy-gateway-config + namespace: envoy-gateway-system +data: + envoy-gateway.yaml: | + apiVersion: gateway.envoyproxy.io/v1alpha1 + kind: EnvoyGateway + provider: + type: Kubernetes + gateway: + controllerName: gateway.envoyproxy.io/gatewayclass-controller + extensionApis: + enableEnvoyPatchPolicy: true \ No newline at end of file diff --git a/config/dependency/kustomization.yaml b/config/dependency/kustomization.yaml index 802a6c1e..f4eec957 100644 --- a/config/dependency/kustomization.yaml +++ b/config/dependency/kustomization.yaml @@ -1,3 +1,8 @@ +kind: Kustomization + resources: - https://github.com/envoyproxy/gateway/releases/download/v1.1.0/install.yaml + +patches: +- path: envoy_config_patch.yaml # potential kuberay ray cluster manifest here. \ No newline at end of file diff --git a/config/gateway/gateway.yaml b/config/gateway/gateway.yaml index d956bba5..ff4e4ba7 100644 --- a/config/gateway/gateway.yaml +++ b/config/gateway/gateway.yaml @@ -16,23 +16,7 @@ spec: listeners: - name: http protocol: HTTP - port: 80 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: envoy-gateway-config - namespace: aibrix-system -data: - envoy-gateway.yaml: | - apiVersion: gateway.envoyproxy.io/v1alpha1 - kind: EnvoyGateway - provider: - type: Kubernetes - gateway: - controllerName: gateway.envoyproxy.io/gatewayclass-controller - extensionApis: - enableEnvoyPatchPolicy: true + port: 80 --- apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyExtensionPolicy @@ -83,7 +67,7 @@ spec: cluster: original_destination_cluster timeout: 1000s # Increase route timeout typed_per_filter_config: - "envoy.filters.http.ext_proc/envoyextensionpolicy/aibrix-system/gateway-plugins-extension-policy/extproc/0": + "envoy.filters.http.ext_proc/envoyextensionpolicy/aibrix-system/aibrix-gateway-plugins-extension-policy/extproc/0": "@type": "type.googleapis.com/envoy.config.route.v3.FilterConfig" "config": {} - type: "type.googleapis.com/envoy.config.cluster.v3.Cluster" diff --git a/config/gateway/kustomization.yaml b/config/gateway/kustomization.yaml index 8a173119..973eca3f 100644 --- a/config/gateway/kustomization.yaml +++ b/config/gateway/kustomization.yaml @@ -1,4 +1,5 @@ resources: -- gateway-plugin.yaml -- redis.yaml - gateway.yaml +- redis.yaml +- gateway-plugin.yaml + diff --git a/docs/development/app/README.md b/docs/development/app/README.md index cec9567e..67e14259 100644 --- a/docs/development/app/README.md +++ b/docs/development/app/README.md @@ -50,12 +50,12 @@ helm get all eg -n envoy-gateway-system Port forward to the Envoy service: ```shell -kubectl -n aibrix-system port-forward service/envoy-aibrix-system-eg-95d1b654 8888:80 & +kubectl -n envoy-gateway-system port-forward service/envoy-aibrix-system-aibrix-eg-903790dc 8888:80 & ``` # Add rpm/tpm config ```shell -kubectl -n aibrix-system exec -it aibrix-redis-master- -- redis-cli +kubectl -n aibrix-system exec -it aibrix-redis-master-767bcb955d-qrlfc -- redis-cli set aibrix:your-user-name_TPM_LIMIT 100 set aibrix:your-user-name_RPM_LIMIT 10 diff --git a/docs/development/app/deployment.yaml b/docs/development/app/deployment.yaml index de71c72c..58f4a7de 100644 --- a/docs/development/app/deployment.yaml +++ b/docs/development/app/deployment.yaml @@ -59,9 +59,10 @@ spec: # kind: HTTPRoute # metadata: # name: llama2-70b-router +# namespace: aibrix-system # spec: # parentRefs: -# - name: eg +# - name: aibrix-eg # rules: # - matches: # - headers: