Skip to content

Commit 6836a23

Browse files
committed
feat: add k8s dev env deployment with kgateway
Signed-off-by: Shane Utt <shaneutt@linux.com>
1 parent 5e758de commit 6836a23

File tree

5 files changed

+91
-3
lines changed

5 files changed

+91
-3
lines changed

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ clean.environment.dev.kind:
721721
environment.dev.kubernetes.infrastructure:
722722
ifeq ($(strip $(INFRASTRUCTURE_OVERRIDE)),true)
723723
@echo "Deploying OpenShift Infrastructure Components"
724-
kustomize build deploy/environments/dev/kubernetes-istio-infra | kubectl apply --server-side --force-conflicts -f -
724+
kustomize build deploy/environments/dev/kubernetes-kgateway-infra | kubectl apply --server-side --force-conflicts -f -
725725
else
726726
$(error "Error: The environment variable INFRASTRUCTURE_OVERRIDE must be set to true in order to run this target.")
727727
endif
@@ -743,7 +743,7 @@ ifeq ($(strip $(INFRASTRUCTURE_OVERRIDE)),true)
743743
@echo "This is extremely destructive. We'll provide 5 seconds before starting to give you a chance to cancel."
744744
sleep 5
745745
@echo "Tearing Down OpenShift Infrastructure Components"
746-
kustomize build deploy/environments/dev/kubernetes-istio-infra | kubectl delete -f - || true
746+
kustomize build deploy/environments/dev/kubernetes-kgateway-infra | kubectl delete -f - || true
747747
else
748748
$(error "Error: The environment variable INFRASTRUCTURE_OVERRIDE must be set to true in order to run this target.")
749749
endif
@@ -776,7 +776,7 @@ endif
776776
@echo "INFO: Creating namespace (if needed) and setting context to $(NAMESPACE)..."
777777
kubectl create namespace $(NAMESPACE) 2>/dev/null || true
778778
@echo "INFO: Deploying Development Environment in namespace $(NAMESPACE)"
779-
kustomize build deploy/environments/dev/kubernetes-istio | envsubst | kubectl -n $(NAMESPACE) apply -f -
779+
kustomize build deploy/environments/dev/kubernetes-kgateway | envsubst | kubectl -n $(NAMESPACE) apply -f -
780780
@echo "INFO: Waiting for Pods in namespace $(NAMESPACE) to become ready"
781781
kubectl -n $(NAMESPACE) wait --for=condition=Ready --all pods --timeout=300s
782782
@echo "INFO: Waiting for Gateway in namespace $(NAMESPACE) to become ready"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: gateway.kgateway.dev/v1alpha1
2+
kind: GatewayParameters
3+
metadata:
4+
name: custom-gw-params
5+
spec:
6+
kube:
7+
envoyContainer:
8+
securityContext:
9+
allowPrivilegeEscalation: false
10+
readOnlyRootFilesystem: true
11+
runAsNonRoot: true
12+
runAsUser: "${PROXY_UID}"
13+
service:
14+
type: NodePort
15+
extraLabels:
16+
gateway: custom
17+
podTemplate:
18+
extraLabels:
19+
gateway: custom
20+
securityContext:
21+
seccompProfile:
22+
type: RuntimeDefault
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
namespace: ${NAMESPACE}
5+
6+
resources:
7+
- ../../../components/vllm-sim/
8+
- ../../../components/inference-gateway/
9+
- gateway-parameters.yaml
10+
11+
images:
12+
- name: quay.io/vllm-d/vllm-sim
13+
newName: ${VLLM_SIM_IMAGE}
14+
newTag: ${VLLM_SIM_TAG}
15+
- name: quay.io/vllm-d/gateway-api-inference-extension/epp
16+
newName: ${EPP_IMAGE}
17+
newTag: ${EPP_TAG}
18+
19+
patches:
20+
- path: patch-deployments.yaml
21+
- path: patch-gateways.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: endpoint-picker
5+
spec:
6+
template:
7+
spec:
8+
imagePullSecrets:
9+
- name: ${REGISTRY_SECRET}
10+
containers:
11+
- name: epp
12+
args:
13+
- -poolName
14+
- "vllm-llama3-8b-instruct"
15+
- -poolNamespace
16+
- ${NAMESPACE}
17+
- -v
18+
- "4"
19+
- --zap-encoder
20+
- "json"
21+
- -grpcPort
22+
- "9002"
23+
- -grpcHealthPort
24+
- "9003"
25+
---
26+
apiVersion: apps/v1
27+
kind: Deployment
28+
metadata:
29+
name: vllm-sim
30+
spec:
31+
template:
32+
spec:
33+
imagePullSecrets:
34+
- name: ${REGISTRY_SECRET}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: gateway.networking.k8s.io/v1
2+
kind: Gateway
3+
metadata:
4+
name: inference-gateway
5+
spec:
6+
gatewayClassName: kgateway
7+
infrastructure:
8+
parametersRef:
9+
name: custom-gw-params
10+
group: gateway.kgateway.dev
11+
kind: GatewayParameters

0 commit comments

Comments
 (0)