Skip to content

Commit 72a42eb

Browse files
committed
fix makefilke
1 parent 775fccb commit 72a42eb

File tree

10 files changed

+120
-310
lines changed

10 files changed

+120
-310
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ARG BASE_IMAGE=gcr.io/distroless/static:nonroot
2-
ARG BUILDER_IMAGE=golang:1.23.0
2+
ARG BUILDER_IMAGE=golang:1.24.0
3+
34

45
# Build the manager binary
56
FROM ${BUILDER_IMAGE} AS builder

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ IMAGE_NAME ?= llmaz
6767
IMAGE_REPO := $(IMAGE_REGISTRY)/$(IMAGE_NAME)
6868
GIT_TAG ?= $(shell git describe --tags --dirty --always)
6969
GOPROXY=${GOPROXY:-""}
70+
ifeq ($(origin GOPROXY), undefined)
71+
unexport GOPROXY
72+
endif
7073
IMG ?= $(IMAGE_REPO):$(GIT_TAG)
7174
BUILDER_IMAGE ?= golang:$(GO_VERSION)
7275
KIND_CLUSTER_NAME ?= kind
@@ -177,7 +180,6 @@ run: manifests generate fmt vet ## Run a controller from your host.
177180
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
178181
.PHONY: docker-buildx
179182
docker-buildx: ## Build and push docker image for the manager for cross-platform support
180-
[ -n "$(GOPROXY)" ] && export GOPROXY=$(GOPROXY)
181183
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
182184
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
183185
- $(CONTAINER_TOOL) buildx create --name project-v3-builder
@@ -226,7 +228,7 @@ endif
226228

227229
.PHONY: install
228230
install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
229-
$(KUSTOMIZE) build config/crd | $(KUBECTL) apply -f -
231+
$(KUSTOMIZE) build config/crd | $(KUBECTL) apply --server-side --force-conflicts -f -
230232

231233
.PHONY: uninstall
232234
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.
Lines changed: 67 additions & 277 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.envoyAIGateway.enable -}}
1+
{{- if .Values.envoyAIGateway.enabled -}}
22
# source : https://github.com/envoyproxy/ai-gateway/blob/main/examples/basic/basic.yaml
33

44
# Copyright Envoy AI Gateway Authors
@@ -38,280 +38,70 @@ spec:
3838
kind: Gateway
3939
group: gateway.networking.k8s.io
4040
rules:
41-
- matches:
42-
- headers:
43-
- type: Exact
44-
name: x-ai-eg-model
45-
value: gpt-4o-mini
46-
backendRefs:
47-
- name: envoy-ai-gateway-basic-openai
48-
- matches:
49-
- headers:
50-
- type: Exact
51-
name: x-ai-eg-model
52-
value: us.meta.llama3-2-1b-instruct-v1:0
53-
backendRefs:
54-
- name: envoy-ai-gateway-basic-aws
55-
- matches:
56-
- headers:
57-
- type: Exact
58-
name: x-ai-eg-model
59-
value: some-cool-self-hosted-model
60-
backendRefs:
61-
- name: envoy-ai-gateway-basic-testupstream
62-
---
63-
apiVersion: aigateway.envoyproxy.io/v1alpha1
64-
kind: AIServiceBackend
65-
metadata:
66-
name: envoy-ai-gateway-basic-openai
67-
namespace: default
68-
spec:
69-
schema:
70-
name: OpenAI
71-
backendRef:
72-
name: envoy-ai-gateway-basic-openai
73-
kind: Backend
74-
group: gateway.envoyproxy.io
75-
backendSecurityPolicyRef:
76-
name: envoy-ai-gateway-basic-openai-apikey
77-
kind: BackendSecurityPolicy
78-
group: aigateway.envoyproxy.io
79-
---
80-
apiVersion: aigateway.envoyproxy.io/v1alpha1
81-
kind: AIServiceBackend
82-
metadata:
83-
name: envoy-ai-gateway-basic-aws
84-
namespace: default
85-
spec:
86-
schema:
87-
name: AWSBedrock
88-
backendRef:
89-
name: envoy-ai-gateway-basic-aws
90-
kind: Backend
91-
group: gateway.envoyproxy.io
92-
backendSecurityPolicyRef:
93-
name: envoy-ai-gateway-basic-aws-credentials
94-
kind: BackendSecurityPolicy
95-
group: aigateway.envoyproxy.io
96-
---
97-
apiVersion: aigateway.envoyproxy.io/v1alpha1
98-
kind: AIServiceBackend
99-
metadata:
100-
name: envoy-ai-gateway-basic-azure
101-
namespace: default
102-
spec:
103-
schema:
104-
name: AzureOpenAI
105-
version: 2025-01-01-preview
106-
backendRef:
107-
name: envoy-ai-gateway-basic-azure
108-
kind: Backend
109-
group: gateway.envoyproxy.io
110-
backendSecurityPolicyRef:
111-
name: envoy-ai-gateway-basic-azure-credentials
112-
kind: BackendSecurityPolicy
113-
group: aigateway.envoyproxy.io
114-
---
115-
apiVersion: aigateway.envoyproxy.io/v1alpha1
116-
kind: BackendSecurityPolicy
117-
metadata:
118-
name: envoy-ai-gateway-basic-openai-apikey
119-
namespace: default
120-
spec:
121-
type: APIKey
122-
apiKey:
123-
secretRef:
124-
name: envoy-ai-gateway-basic-openai-apikey
125-
namespace: default
126-
---
127-
apiVersion: aigateway.envoyproxy.io/v1alpha1
128-
kind: BackendSecurityPolicy
129-
metadata:
130-
name: envoy-ai-gateway-basic-azure-credentials
131-
namespace: default
132-
spec:
133-
type: AzureCredentials
134-
azureCredentials:
135-
clientID: AZURE_CLIENT_ID # Replace with your Azure Client ID.
136-
tenantID: AZURE_TENANT_ID # Replace with your Azure Tenant ID.
137-
clientSecretRef:
138-
name: envoy-ai-gateway-basic-azure-client-secret
139-
namespace: default
140-
---
141-
apiVersion: aigateway.envoyproxy.io/v1alpha1
142-
kind: BackendSecurityPolicy
143-
metadata:
144-
name: envoy-ai-gateway-basic-aws-credentials
145-
namespace: default
146-
spec:
147-
type: AWSCredentials
148-
awsCredentials:
149-
region: us-east-1
150-
credentialsFile:
151-
secretRef:
152-
name: envoy-ai-gateway-basic-aws-credentials
153-
---
154-
apiVersion: gateway.envoyproxy.io/v1alpha1
155-
kind: Backend
156-
metadata:
157-
name: envoy-ai-gateway-basic-openai
158-
namespace: default
159-
spec:
160-
endpoints:
161-
- fqdn:
162-
hostname: api.openai.com
163-
port: 443
164-
---
165-
apiVersion: gateway.envoyproxy.io/v1alpha1
166-
kind: Backend
167-
metadata:
168-
name: envoy-ai-gateway-basic-aws
169-
namespace: default
170-
spec:
171-
endpoints:
172-
- fqdn:
173-
hostname: bedrock-runtime.us-east-1.amazonaws.com
174-
port: 443
175-
---
176-
apiVersion: gateway.envoyproxy.io/v1alpha1
177-
kind: Backend
178-
metadata:
179-
name: envoy-ai-gateway-basic-azure
180-
namespace: default
181-
spec:
182-
endpoints:
183-
- fqdn:
184-
hostname: dummy-azure-resource.openai.azure.com # Replace "dummy-azure-resource" with your Azure OpenAI resource e.g. <azure_resource_name>.openai.azure.com
185-
port: 443
186-
---
187-
apiVersion: gateway.networking.k8s.io/v1alpha3
188-
kind: BackendTLSPolicy
189-
metadata:
190-
name: envoy-ai-gateway-basic-openai-tls
191-
namespace: default
192-
spec:
193-
targetRefs:
194-
- group: 'gateway.envoyproxy.io'
195-
kind: Backend
196-
name: envoy-ai-gateway-basic-openai
197-
validation:
198-
wellKnownCACertificates: "System"
199-
hostname: api.openai.com
200-
---
201-
apiVersion: gateway.networking.k8s.io/v1alpha3
202-
kind: BackendTLSPolicy
203-
metadata:
204-
name: envoy-ai-gateway-basic-aws-tls
205-
namespace: default
206-
spec:
207-
targetRefs:
208-
- group: 'gateway.envoyproxy.io'
209-
kind: Backend
210-
name: envoy-ai-gateway-basic-aws
211-
validation:
212-
wellKnownCACertificates: "System"
213-
hostname: bedrock-runtime.us-east-1.amazonaws.com
214-
---
215-
apiVersion: gateway.networking.k8s.io/v1alpha3
216-
kind: BackendTLSPolicy
217-
metadata:
218-
name: envoy-ai-gateway-basic-azure-tls
219-
namespace: default
220-
spec:
221-
targetRefs:
222-
- group: 'gateway.envoyproxy.io'
223-
kind: Backend
224-
name: envoy-ai-gateway-basic-azure
225-
validation:
226-
wellKnownCACertificates: "System"
227-
hostname: dummy-azure-resource.openai.azure.com # Replace "dummy-azure-resource" with your Azure OpenAI resource e.g. <azure_resource_name>.openai.azure.com
228-
---
229-
apiVersion: v1
230-
kind: Secret
231-
metadata:
232-
name: envoy-ai-gateway-basic-openai-apikey
233-
namespace: default
234-
type: Opaque
235-
stringData:
236-
apiKey: OPENAI_API_KEY # Replace with your OpenAI API key.
237-
---
238-
apiVersion: v1
239-
kind: Secret
240-
metadata:
241-
name: envoy-ai-gateway-basic-azure-client-secret
242-
namespace: default
243-
type: Opaque
244-
stringData:
245-
client-secret: AZURE_CLIENT_SECRET # Replace with your Azure client secret for authentication.
246-
---
247-
apiVersion: v1
248-
kind: Secret
249-
metadata:
250-
name: envoy-ai-gateway-basic-aws-credentials
251-
namespace: default
252-
type: Opaque
253-
stringData:
254-
# Replace with your AWS credentials.
255-
credentials: |
256-
[default]
257-
aws_access_key_id = AWS_ACCESS_KEY_ID
258-
aws_secret_access_key = AWS_SECRET_ACCESS_KEY
259-
---
260-
apiVersion: aigateway.envoyproxy.io/v1alpha1
261-
kind: AIServiceBackend
262-
metadata:
263-
name: envoy-ai-gateway-basic-testupstream
264-
namespace: default
265-
spec:
266-
schema:
267-
name: OpenAI
268-
backendRef:
269-
name: envoy-ai-gateway-basic-testupstream
270-
kind: Service
271-
port: 80
272-
---
273-
apiVersion: apps/v1
274-
kind: Deployment
275-
metadata:
276-
name: envoy-ai-gateway-basic-testupstream
277-
namespace: default
278-
spec:
279-
replicas: 1
280-
selector:
281-
matchLabels:
282-
app: envoy-ai-gateway-basic-testupstream
283-
template:
284-
metadata:
285-
labels:
286-
app: envoy-ai-gateway-basic-testupstream
287-
spec:
288-
containers:
289-
- name: testupstream
290-
image: docker.io/envoyproxy/ai-gateway-testupstream:latest
291-
imagePullPolicy: IfNotPresent
292-
ports:
293-
- containerPort: 8080
294-
env:
295-
- name: TESTUPSTREAM_ID
296-
value: test
297-
readinessProbe:
298-
httpGet:
299-
path: /health
300-
port: 8080
301-
initialDelaySeconds: 1
302-
periodSeconds: 1
303-
---
304-
apiVersion: v1
305-
kind: Service
306-
metadata:
307-
name: envoy-ai-gateway-basic-testupstream
308-
namespace: default
309-
spec:
310-
selector:
311-
app: envoy-ai-gateway-basic-testupstream
312-
ports:
313-
- protocol: TCP
314-
port: 80
315-
targetPort: 8080
316-
type: ClusterIP
41+
# - matches:
42+
# - headers:
43+
# - type: Exact
44+
# name: x-ai-eg-model
45+
# value: some-cool-self-hosted-model
46+
# backendRefs:
47+
# - name: envoy-ai-gateway-basic-testupstream
48+
# Below is a testupstream service that can be used to test the AI Gateway
49+
# ---
50+
# apiVersion: aigateway.envoyproxy.io/v1alpha1
51+
# kind: AIServiceBackend
52+
# metadata:
53+
# name: envoy-ai-gateway-basic-testupstream
54+
# namespace: default
55+
# spec:
56+
# schema:
57+
# name: OpenAI
58+
# backendRef:
59+
# name: envoy-ai-gateway-basic-testupstream
60+
# kind: Service
61+
# port: 80
62+
# ---
63+
# apiVersion: apps/v1
64+
# kind: Deployment
65+
# metadata:
66+
# name: envoy-ai-gateway-basic-testupstream
67+
# namespace: default
68+
# spec:
69+
# replicas: 1
70+
# selector:
71+
# matchLabels:
72+
# app: envoy-ai-gateway-basic-testupstream
73+
# template:
74+
# metadata:
75+
# labels:
76+
# app: envoy-ai-gateway-basic-testupstream
77+
# spec:
78+
# containers:
79+
# - name: testupstream
80+
# image: docker.io/envoyproxy/ai-gateway-testupstream:latest
81+
# imagePullPolicy: IfNotPresent
82+
# ports:
83+
# - containerPort: 8080
84+
# env:
85+
# - name: TESTUPSTREAM_ID
86+
# value: test
87+
# readinessProbe:
88+
# httpGet:
89+
# path: /health
90+
# port: 8080
91+
# initialDelaySeconds: 1
92+
# periodSeconds: 1
93+
# ---
94+
# apiVersion: v1
95+
# kind: Service
96+
# metadata:
97+
# name: envoy-ai-gateway-basic-testupstream
98+
# namespace: default
99+
# spec:
100+
# selector:
101+
# app: envoy-ai-gateway-basic-testupstream
102+
# ports:
103+
# - protocol: TCP
104+
# port: 80
105+
# targetPort: 8080
106+
# type: ClusterIP
317107
{{- end }}

0 commit comments

Comments
 (0)