Skip to content

Commit

Permalink
chore(demo): update demo to latest version (#4572)
Browse files Browse the repository at this point in the history
- add `make dev/sync-demo` to download the latest version of the demo

Fix #4558

Signed-off-by: Charly Molter <charly.molter@konghq.com>
(cherry picked from commit 222ad29)
  • Loading branch information
lahabana authored and mergify[bot] committed Jul 13, 2022
1 parent f825d4d commit f3eb295
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
- name: tcp
containerPort: 6379
lifecycle:
preStop:
preStop: # delay shutdown to support graceful mesh leave
exec:
command: ["/bin/sleep", "30"]
postStart:
Expand All @@ -78,7 +78,7 @@ spec:
spec:
containers:
- name: demo-app
image: "thefosk/kuma-demo"
image: "kumahq/kuma-demo"
env:
- name: REDIS_HOST
value: "redis.kuma-demo.svc.cluster.local"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
- name: tcp
containerPort: 6379
lifecycle:
preStop:
preStop: # delay shutdown to support graceful mesh leave
exec:
command: ["/bin/sleep", "30"]
postStart:
Expand All @@ -78,10 +78,10 @@ spec:
spec:
containers:
- name: demo-app
image: "thefosk/kuma-demo"
image: "kumahq/kuma-demo"
env:
- name: REDIS_HOST
value: "redis.kuma-demo.svc.cluster.local"
value: "redis.not-kuma-demo.svc.cluster.local"
- name: REDIS_PORT
value: "6379"
- name: APP_VERSION
Expand Down
6 changes: 3 additions & 3 deletions app/kumactl/data/install/k8s/demo/demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
- name: tcp
containerPort: 6379
lifecycle:
preStop:
preStop: # delay shutdown to support graceful mesh leave
exec:
command: ["/bin/sleep", "30"]
postStart:
Expand Down Expand Up @@ -63,10 +63,10 @@ spec:
spec:
containers:
- name: demo-app
image: "thefosk/kuma-demo"
image: "kumahq/kuma-demo"
env:
- name: REDIS_HOST
value: "redis.kuma-demo.svc.cluster.local"
value: "redis.{{ .Namespace }}.svc.cluster.local"
- name: REDIS_PORT
value: "6379"
- name: APP_VERSION
Expand Down
8 changes: 8 additions & 0 deletions mk/dev.mk
Original file line number Diff line number Diff line change
Expand Up @@ -343,3 +343,11 @@ dev/envrc: $(KUBECONFIG_DIR)/kind-kuma-current ## Generate .envrc
done >> .envrc
@echo 'export KUBEBUILDER_ASSETS=$${CI_TOOLS_DIR}' >> .envrc
@direnv allow

.PHONY: dev/sync-demo
dev/sync-demo:
rm app/kumactl/data/install/k8s/demo/demo.yaml
curl -s https://raw.githubusercontent.com/kumahq/kuma-counter-demo/master/demo.yaml | \
sed 's/"local"/"{{ .Zone }}"/g' | \
sed 's/\([^/]\)kuma-demo/\1{{ .Namespace }}/g' \
> app/kumactl/data/install/k8s/demo/demo.yaml

0 comments on commit f3eb295

Please sign in to comment.