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:
@helm install viking-ingress-primary-only $(CHARTDIR)/viking-test-app \
--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:
@kubectl apply -f $(mkdir)/../hello/cafe.yaml
@kubectl apply -f $(mkdir)/../hello/cafe-ingress.yaml
......@@ -77,6 +89,18 @@ undeploy-primary-only-helm:
@helm uninstall viking-ingress-primary-only
$(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:
@kubectl delete -f $(mkdir)/../hello/cafe-ingress.yaml
@kubectl delete -f $(mkdir)/../hello/cafe.yaml
......@@ -122,6 +146,12 @@ deploy-self-sharding: deploy-self-sharding-helm
undeploy-self-sharding: undeploy-self-sharding-helm
deploy-primary-only: deploy-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
ifeq ($(EXAMPLE),self-sharding)
......@@ -141,7 +171,7 @@ deploy: deploy-shard-by-key
undeploy: undeploy-shard-by-key
else
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
.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