Commit f579d901 authored by Geoff Simmons's avatar Geoff Simmons

Add examples for self-sharding by key, url & digest for helm.

parent 0a8e08d7
...@@ -42,6 +42,18 @@ deploy-primary-only-helm: ...@@ -42,6 +42,18 @@ deploy-primary-only-helm:
@helm install viking-ingress-primary-only $(CHARTDIR)/viking-test-app \ @helm install viking-ingress-primary-only $(CHARTDIR)/viking-test-app \
--values values-primary-only.yaml --values values-primary-only.yaml
deploy-shard-by-digest-helm:
@helm install viking-ingress-shard-by-digest $(CHARTDIR)/viking-test-app \
--values values-shard-by-digest.yaml
deploy-shard-by-url-helm:
@helm install viking-ingress-shard-by-url $(CHARTDIR)/viking-test-app \
--values values-shard-by-url.yaml
deploy-shard-by-key-helm:
@helm install viking-ingress-shard-by-key $(CHARTDIR)/viking-test-app \
--values values-shard-by-key.yaml
deploy-cafe-kubectl: deploy-cafe-kubectl:
@kubectl apply -f $(mkdir)/../hello/cafe.yaml @kubectl apply -f $(mkdir)/../hello/cafe.yaml
@kubectl apply -f $(mkdir)/../hello/cafe-ingress.yaml @kubectl apply -f $(mkdir)/../hello/cafe-ingress.yaml
...@@ -77,6 +89,18 @@ undeploy-primary-only-helm: ...@@ -77,6 +89,18 @@ undeploy-primary-only-helm:
@helm uninstall viking-ingress-primary-only @helm uninstall viking-ingress-primary-only
$(MAKE) wait $(MAKE) wait
undeploy-shard-by-digest-helm:
@helm uninstall viking-ingress-shard-by-digest
$(MAKE) wait
undeploy-shard-by-url-helm:
@helm uninstall viking-ingress-shard-by-url
$(MAKE) wait
undeploy-shard-by-key-helm:
@helm uninstall viking-ingress-shard-by-key
$(MAKE) wait
undeploy-cafe-kubectl: undeploy-cafe-kubectl:
@kubectl delete -f $(mkdir)/../hello/cafe-ingress.yaml @kubectl delete -f $(mkdir)/../hello/cafe-ingress.yaml
@kubectl delete -f $(mkdir)/../hello/cafe.yaml @kubectl delete -f $(mkdir)/../hello/cafe.yaml
...@@ -122,6 +146,12 @@ deploy-self-sharding: deploy-self-sharding-helm ...@@ -122,6 +146,12 @@ deploy-self-sharding: deploy-self-sharding-helm
undeploy-self-sharding: undeploy-self-sharding-helm undeploy-self-sharding: undeploy-self-sharding-helm
deploy-primary-only: deploy-primary-only-helm deploy-primary-only: deploy-primary-only-helm
undeploy-primary-only: undeploy-primary-only-helm undeploy-primary-only: undeploy-primary-only-helm
deploy-shard-by-digest: deploy-shard-by-digest-helm
undeploy-shard-by-digest: undeploy-shard-by-digest-helm
deploy-shard-by-url: deploy-shard-by-url-helm
undeploy-shard-by-url: undeploy-shard-by-url-helm
deploy-shard-by-key: deploy-shard-by-key-helm
undeploy-shard-by-key: undeploy-shard-by-key-helm
endif endif
ifeq ($(EXAMPLE),self-sharding) ifeq ($(EXAMPLE),self-sharding)
...@@ -141,7 +171,7 @@ deploy: deploy-shard-by-key ...@@ -141,7 +171,7 @@ deploy: deploy-shard-by-key
undeploy: undeploy-shard-by-key undeploy: undeploy-shard-by-key
else else
deploy undeploy: deploy undeploy:
$(error EXAMPLE must be set to self-sharding or primary-only) $(error EXAMPLE must be set to self-sharding, primary-only, or shard-by-[digest|url|key])
endif endif
.PHONY: all $(MAKECMDGOALS) .PHONY: all $(MAKECMDGOALS)
apps:
coffee:
image: nginxdemos/hello:plain-text
replicas: 2
tea:
image: nginxdemos/hello:plain-text
replicas: 3
ingress:
name: cafe-ingress
rules:
- host: cafe.example.com
paths:
- path: /tea
app: tea
- path: /coffee
app: coffee
vikingAdmSvc: varnish-ingress-admin
selfSharding:
primaryOnly: true
key: req.http.Host
digest: SHA3_512
apps:
coffee:
image: nginxdemos/hello:plain-text
replicas: 2
tea:
image: nginxdemos/hello:plain-text
replicas: 3
ingress:
name: cafe-ingress
rules:
- host: cafe.example.com
paths:
- path: /tea
app: tea
- path: /coffee
app: coffee
vikingAdmSvc: varnish-ingress-admin
selfSharding:
primaryOnly: true
key: req.http.Host
apps:
coffee:
image: nginxdemos/hello:plain-text
replicas: 2
tea:
image: nginxdemos/hello:plain-text
replicas: 3
ingress:
name: cafe-ingress
rules:
- host: cafe.example.com
paths:
- path: /tea
app: tea
- path: /coffee
app: coffee
vikingAdmSvc: varnish-ingress-admin
selfSharding:
primaryOnly: true
key: req.url
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment