Skip to content

Commit

Permalink
test(spin): moved runtime-config file to ConfigMap
Browse files Browse the repository at this point in the history
Signed-off-by: jiaxiao zhou <[email protected]>
  • Loading branch information
Mossaka committed Nov 14, 2023
1 parent f996cba commit cd0f78f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 0 additions & 1 deletion images/spin-keyvalue/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ RUN rustup target add wasm32-wasi && cargo build --target wasm32-wasi --release
FROM scratch
COPY --from=build /opt/build/spin.toml ./spin.toml
COPY --from=build /opt/build/target/wasm32-wasi/release/spin_keyvalue.wasm ./target/wasm32-wasi/release/spin_keyvalue.wasm
COPY --from=build /opt/build/runtime-config.toml ./runtime-config.toml
11 changes: 11 additions & 0 deletions tests/workloads/spin-runtime-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
data:
runtime-config.toml: "# This defines a new store named user_data\n[key_value_store.foo]\ntype
= \"spin\" \npath = \"user_data.db\""
kind: ConfigMap
metadata:
creationTimestamp: "2023-11-14T00:41:01Z"
name: spin-runtime-config
namespace: default
resourceVersion: "4453"
uid: 10dd6b0d-cf71-4ddc-abf8-44853f53436e
9 changes: 9 additions & 0 deletions tests/workloads/workload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ spec:
image: docker.io/library/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
Expand Down

0 comments on commit cd0f78f

Please sign in to comment.