Skip to content

Commit

Permalink
feat(kumactl): update embedded demo resources (#11745)
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Beaumont <[email protected]>
  • Loading branch information
michaelbeaumont authored Oct 9, 2024
1 parent 7129c94 commit 6eb810c
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 38 deletions.
26 changes: 15 additions & 11 deletions app/kumactl/cmd/install/testdata/install-demo.defaults.golden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ kind: Service
metadata:
name: redis
namespace: kuma-demo
labels:
app: redis
spec:
selector:
app: redis
Expand All @@ -24,6 +26,8 @@ kind: Service
metadata:
name: demo-app
namespace: kuma-demo
labels:
app: demo-app
spec:
selector:
app: demo-app
Expand Down Expand Up @@ -130,14 +134,14 @@ spec:
kind: MeshGateway
name: demo-app
to:
- targetRef:
kind: Mesh
rules:
- matches:
- path:
type: PathPrefix
value: "/"
default:
backendRefs:
- kind: MeshService
name: demo-app_kuma-demo_svc_5000
- targetRef:
kind: Mesh
rules:
- default:
backendRefs:
- kind: MeshService
name: demo-app_kuma-demo_svc_5000
matches:
- path:
type: PathPrefix
value: /
28 changes: 16 additions & 12 deletions app/kumactl/cmd/install/testdata/install-demo.overrides.golden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ kind: Service
metadata:
name: redis
namespace: not-kuma-demo
labels:
app: redis
spec:
selector:
app: redis
Expand All @@ -24,6 +26,8 @@ kind: Service
metadata:
name: demo-app
namespace: not-kuma-demo
labels:
app: demo-app
spec:
selector:
app: demo-app
Expand Down Expand Up @@ -106,7 +110,7 @@ spec:
protocol: HTTP
selectors:
- match:
kuma.io/service: demo-app-gateway_kuma-demo_svc
kuma.io/service: demo-app-gateway_not-kuma-demo_svc
---
apiVersion: kuma.io/v1alpha1
kind: MeshGatewayInstance
Expand All @@ -130,14 +134,14 @@ spec:
kind: MeshGateway
name: demo-app
to:
- targetRef:
kind: Mesh
rules:
- matches:
- path:
type: PathPrefix
value: "/"
default:
backendRefs:
- kind: MeshService
name: demo-app_not-kuma-demo_svc_5000
- targetRef:
kind: Mesh
rules:
- default:
backendRefs:
- kind: MeshService
name: demo-app_not-kuma-demo_svc_5000
matches:
- path:
type: PathPrefix
value: /
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ kind: Service
metadata:
name: redis
namespace: kuma-demo
labels:
app: redis
spec:
selector:
app: redis
Expand All @@ -24,6 +26,8 @@ kind: Service
metadata:
name: demo-app
namespace: kuma-demo
labels:
app: demo-app
spec:
selector:
app: demo-app
Expand Down
4 changes: 4 additions & 0 deletions app/kumactl/data/install/k8s/demo/demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ kind: Service
metadata:
name: redis
namespace: {{ .Namespace }}
labels:
app: redis
spec:
selector:
app: redis
Expand Down Expand Up @@ -82,6 +84,8 @@ kind: Service
metadata:
name: demo-app
namespace: {{ .Namespace }}
labels:
app: demo-app
spec:
selector:
app: demo-app
Expand Down
24 changes: 12 additions & 12 deletions app/kumactl/data/install/k8s/demo/gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
protocol: HTTP
selectors:
- match:
kuma.io/service: demo-app-gateway_kuma-demo_svc
kuma.io/service: demo-app-gateway_{{ .Namespace }}_svc
---
apiVersion: kuma.io/v1alpha1
kind: MeshHTTPRoute
Expand All @@ -28,17 +28,17 @@ spec:
kind: MeshGateway
name: demo-app
to:
- targetRef:
kind: Mesh
rules:
- matches:
- path:
type: PathPrefix
value: "/"
default:
backendRefs:
- kind: MeshService
name: demo-app_{{ .Namespace }}_svc_5000
- targetRef:
kind: Mesh
rules:
- default:
backendRefs:
- kind: MeshService
name: demo-app_{{ .Namespace }}_svc_5000
matches:
- path:
type: PathPrefix
value: /
---
apiVersion: kuma.io/v1alpha1
kind: MeshGatewayInstance
Expand Down
2 changes: 1 addition & 1 deletion mk/dependencies/deps.lock
Original file line number Diff line number Diff line change
@@ -1 +1 @@
67e5a6e147d569852851535e91196922ade8162d
85edd35bf66665ac4e9f4fd54fdd06d202a510c3
6 changes: 4 additions & 2 deletions mk/dev.mk
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,12 @@ dev/sync-demo:
rm app/kumactl/data/install/k8s/demo/*.yaml
curl -s --fail https://raw.githubusercontent.com/kumahq/kuma-counter-demo/master/demo.yaml | \
sed 's/"local"/"{{ .Zone }}"/g' | \
sed 's/\([^/]\)kuma-demo/\1{{ .Namespace }}/g' \
sed 's/\([^/]\)kuma-demo/\1{{ .Namespace }}/g' | \
sed 's/\([^/]\)kuma-system/\1{{ .SystemNamespace }}/g' \
> app/kumactl/data/install/k8s/demo/demo.yaml
curl -s --fail https://raw.githubusercontent.com/kumahq/kuma-counter-demo/master/gateway.yaml | \
sed 's/\([^/]\)kuma-demo/\1{{ .Namespace }}/g' \
sed 's/\([^/]\)kuma-demo/\1{{ .Namespace }}/g' | \
sed 's/\([^/]\)kuma-system/\1{{ .SystemNamespace }}/g' \
> app/kumactl/data/install/k8s/demo/gateway.yaml

.PHONY: dev/set-kuma-helm-repo
Expand Down

0 comments on commit 6eb810c

Please sign in to comment.