-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
- Loading branch information
1 parent
aade889
commit 795ef07
Showing
1 changed file
with
212 additions
and
0 deletions.
There are no files selected for viewing
212 changes: 212 additions & 0 deletions
212
tests/workloads-docker-build-push/workload-docker-build-push.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,212 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: wasm-spin | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: wasm-spin | ||
template: | ||
metadata: | ||
labels: | ||
app: wasm-spin | ||
spec: | ||
runtimeClassName: wasmtime-spin | ||
containers: | ||
- name: testwasm | ||
image: test-registry:5000/spin-hello-world:latest | ||
imagePullPolicy: IfNotPresent | ||
command: ["/"] | ||
resources: # limit the resources to 128Mi of memory and 100m of CPU | ||
limits: | ||
cpu: 100m | ||
memory: 128Mi | ||
requests: | ||
cpu: 100m | ||
memory: 128Mi | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: wasm-spin | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 80 | ||
selector: | ||
app: wasm-spin | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: spin-keyvalue | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: spin-keyvalue | ||
template: | ||
metadata: | ||
labels: | ||
app: spin-keyvalue | ||
spec: | ||
runtimeClassName: wasmtime-spin | ||
containers: | ||
- name: keyvalue | ||
image: test-registry:5000/spin-keyvalue:latest | ||
command: ["/"] | ||
imagePullPolicy: IfNotPresent | ||
volumeMounts: | ||
- name: config-volume | ||
mountPath: /runtime-config.toml | ||
subPath: runtime-config.toml | ||
readOnly: true | ||
volumes: | ||
- name: config-volume | ||
configMap: | ||
name: spin-runtime-config | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: spin-keyvalue | ||
spec: | ||
type: LoadBalancer | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 80 | ||
selector: | ||
app: spin-keyvalue | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: spin-outbound-redis | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: spin-outbound-redis | ||
template: | ||
metadata: | ||
labels: | ||
app: spin-outbound-redis | ||
spec: | ||
runtimeClassName: wasmtime-spin | ||
containers: | ||
- name: outbound-redis | ||
image: test-registry:5000/spin-outbound-redis:latest | ||
command: ["/"] | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
- name: SPIN_VARIABLE_REDIS_ADDRESS | ||
value: redis://redis-service.default.svc.cluster.local:6379 | ||
- name: SPIN_VARIABLE_REDIS_CHANNEL | ||
value: test | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: spin-outbound-redis | ||
spec: | ||
type: LoadBalancer | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 80 | ||
selector: | ||
app: spin-outbound-redis | ||
--- | ||
# Middleware | ||
# Strip prefix /spin | ||
apiVersion: traefik.containo.us/v1alpha1 | ||
kind: Middleware | ||
metadata: | ||
name: strip-prefix | ||
spec: | ||
stripPrefix: | ||
forceSlash: false | ||
prefixes: | ||
- /spin | ||
- /outboundredis | ||
- /keyvalue | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: wasm-ingress | ||
annotations: | ||
ingress.kubernetes.io/ssl-redirect: "false" | ||
traefik.ingress.kubernetes.io/router.middlewares: default-strip-prefix@kubernetescrd | ||
spec: | ||
ingressClassName: traefik | ||
rules: | ||
- http: | ||
paths: | ||
- path: /spin | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: wasm-spin | ||
port: | ||
number: 80 | ||
- path: /keyvalue | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: spin-keyvalue | ||
port: | ||
number: 80 | ||
- path: /outboundredis | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: spin-outbound-redis | ||
port: | ||
number: 80 | ||
- path: /multi-trigger-app | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: spin-multi-trigger-app | ||
port: | ||
number: 80 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: spin-multi-trigger-app | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: spin-multi-trigger-app | ||
template: | ||
metadata: | ||
labels: | ||
app: spin-multi-trigger-app | ||
spec: | ||
runtimeClassName: wasmtime-spin | ||
containers: | ||
- name: spin-multi-trigger-app | ||
image: test-registry:5000/spin-multi-trigger-app:latest | ||
imagePullPolicy: IfNotPresent | ||
command: ["/"] | ||
ports: | ||
- containerPort: 80 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: spin-multi-trigger-app | ||
spec: | ||
type: LoadBalancer | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 80 | ||
selector: | ||
app: spin-multi-trigger-app |