Skip to content

Commit

Permalink
Consolidates Quickstart Manifests (#511)
Browse files Browse the repository at this point in the history
Signed-off-by: danehans <daneyonhansen@gmail.com>

Signed-off-by: danehans <daneyonhansen@gmail.com>
  • Loading branch information
danehans authored Oct 11, 2022
1 parent 6ad3c0c commit 03be9f4
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 87 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ jobs:
with:
files: |
release-artifacts/install.yaml
release-artifacts/quickstart.yaml
10 changes: 0 additions & 10 deletions examples/kubernetes/gateway.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions examples/kubernetes/gatewayclass.yaml

This file was deleted.

43 changes: 0 additions & 43 deletions examples/kubernetes/httpbin.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions examples/kubernetes/httproute.yaml

This file was deleted.

82 changes: 82 additions & 0 deletions examples/kubernetes/quickstart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: GatewayClass
metadata:
name: eg
spec:
controllerName: gateway.envoyproxy.io/gatewayclass-controller
---
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
metadata:
name: eg
spec:
gatewayClassName: eg
listeners:
- name: http
protocol: HTTP
port: 8080
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: httpbin
---
apiVersion: v1
kind: Service
metadata:
name: httpbin
labels:
app: httpbin
service: httpbin
spec:
ports:
- name: http
port: 80
targetPort: 80
selector:
app: httpbin
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: httpbin
spec:
replicas: 1
selector:
matchLabels:
app: httpbin
version: v1
template:
metadata:
labels:
app: httpbin
version: v1
spec:
serviceAccountName: httpbin
containers:
- image: docker.io/kennethreitz/httpbin
imagePullPolicy: IfNotPresent
name: httpbin
ports:
- containerPort: 80
---
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: HTTPRoute
metadata:
name: httpbin
spec:
parentRefs:
- name: eg
hostnames:
- "www.example.com"
rules:
- backendRefs:
- group: ""
kind: Service
name: httpbin
port: 80
weight: 1
matches:
- path:
type: PathPrefix
value: /
3 changes: 3 additions & 0 deletions tools/hack/release-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ ${KUSTOMIZE} build > release-artifacts/install.yaml

echo "Generated:" release-artifacts/install.yaml

# Copy the quickstart manifest
cp examples/kubernetes/quickstart.yaml release-artifacts/quickstart.yaml

# Update the image in the Envoy Gateway deployment manifest.
[[ -n "${TAG}" ]] && run::sed \
"-es|image: envoyproxy/gateway-dev:.*$|image: envoyproxy/gateway:${TAG}|" \
Expand Down
10 changes: 2 additions & 8 deletions tools/make/kube.mk
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,15 @@ kube-undeploy: kube-uninstall ## Uninstall the Envoy Gateway controller into the

.PHONY: kube-demo
kube-demo: ## Deploy a demo backend service, gatewayclass, gateway and httproute resource and test the configuration.
kubectl apply -f examples/kubernetes/httpbin.yaml
kubectl apply -f examples/kubernetes/gatewayclass.yaml
kubectl apply -f examples/kubernetes/gateway.yaml
kubectl apply -f examples/kubernetes/httproute.yaml
kubectl apply -f examples/kubernetes/quickstart.yaml
@echo "\nPort forward to the Envoy service using the command below"
@echo "kubectl -n envoy-gateway-system port-forward service/envoy-default-eg 8888:8080 &"
@echo "\nCurl the app through Envoy proxy using the command below"
@echo "curl --verbose --header \"Host: www.example.com\" http://localhost:8888/get\n"

.PHONY: kube-demo-undeploy
kube-demo-undeploy: ## Uninstall the Kubernetes resources installed from the `make kube-demo` command.
kubectl delete -f examples/kubernetes/httproute.yaml
kubectl delete -f examples/kubernetes/gateway.yaml
kubectl delete -f examples/kubernetes/gatewayclass.yaml
kubectl delete -f examples/kubernetes/httpbin.yaml
kubectl delete -f examples/kubernetes/quickstart.yaml

.PHONY: run-kube-local
run-kube-local: build kube-install ## Run Envoy Gateway locally.
Expand Down

0 comments on commit 03be9f4

Please sign in to comment.