From c4e10939a5b43242574900170e7834cff64019c1 Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Tue, 9 Jul 2024 11:44:08 -0300 Subject: [PATCH 01/10] chore: Update Example Setup Signed-off-by: Lucas Fontes --- examples/quickstart/README.md | 73 +++++++++++++++++++ examples/quickstart/default-lattice.yaml | 9 +++ .../quickstart/hello-world-application.yaml | 47 ++++++++++++ examples/quickstart/nats-values.yaml | 16 ++++ examples/quickstart/wadm-values.yaml | 6 ++ sample.yaml | 53 -------------- 6 files changed, 151 insertions(+), 53 deletions(-) create mode 100644 examples/quickstart/README.md create mode 100644 examples/quickstart/default-lattice.yaml create mode 100644 examples/quickstart/hello-world-application.yaml create mode 100644 examples/quickstart/nats-values.yaml create mode 100644 examples/quickstart/wadm-values.yaml delete mode 100644 sample.yaml diff --git a/examples/quickstart/README.md b/examples/quickstart/README.md new file mode 100644 index 0000000..b51182d --- /dev/null +++ b/examples/quickstart/README.md @@ -0,0 +1,73 @@ +# Example setup + +This example shows the bare minimum requirements to deploy applications on wasmCloud. + +It relies on Kubernetes `default` namespace for simplicity. + +## Install [NATS](https://github.com/nats-io/nats-server) + +```bash +helm repo add nats https://nats-io.github.io/k8s/helm/charts/ +helm upgrade --install -f nats-values.yaml nats-cluster nats/nats +``` + +Validate installation with: + +```bash +# make sure pods are ready +kubectl get statefulset,deployment -l app.kubernetes.io/instance=nats-cluster +``` + +## Install wasmCloud Application Deployment Manager - [wadm](https://github.com/wasmCloud/wadm) + +```sh +helm install wadm -f wadm-values.yaml --version 0.2.0 oci://ghcr.io/wasmcloud/charts/wadm +``` + +Validate installation with: + +```bash +# make sure pods are ready +kubectl get deploy wadm +``` + +## Install the operator + +```sh +kubectl apply -k ../deploy/base +``` + +Validate installation with: + +```bash +# make sure pods are ready +kubectl -n wasmcloud-operator get deploy +# apiservice should be available +kubectl get apiservices.apiregistration.k8s.io v1beta1.core.oam.dev +``` + +## Create wasmcloud cluster (Default Lattice) + +```bash +kubectl apply -f default-lattice.yaml +``` + +Check wasmCloud host status with: + +```bash +kubectl describe wasmcloudhostconfig default +``` + +## Deploying applications using kubectl + +Install the rust hello world application: + +```bash +kubectl apply -f hello-world-application.yaml +``` + +Check application status with: + +```bash +kubectl get applications +``` diff --git a/examples/quickstart/default-lattice.yaml b/examples/quickstart/default-lattice.yaml new file mode 100644 index 0000000..ee0503a --- /dev/null +++ b/examples/quickstart/default-lattice.yaml @@ -0,0 +1,9 @@ +apiVersion: k8s.wasmcloud.dev/v1alpha1 +kind: WasmCloudHostConfig +metadata: + name: default-lattice +spec: + lattice: default + version: "1.0.4" + secretName: cluster-secrets + natsAddress: nats://nats-cluster.default.svc.cluster.local diff --git a/examples/quickstart/hello-world-application.yaml b/examples/quickstart/hello-world-application.yaml new file mode 100644 index 0000000..42d0877 --- /dev/null +++ b/examples/quickstart/hello-world-application.yaml @@ -0,0 +1,47 @@ +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: hello-world + annotations: + version: v0.0.1 + description: "HTTP hello world demo in Rust, using the WebAssembly Component Model and WebAssembly Interfaces Types (WIT)" + wasmcloud.dev/authors: wasmCloud team + wasmcloud.dev/source-url: https://github.com/wasmCloud/wasmCloud/blob/main/examples/rusg/components/http-hello-world/wadm.yaml + wasmcloud.dev/readme-md-url: https://github.com/wasmCloud/wasmCloud/blob/main/examples/rusg/components/http-hello-world/README.md + wasmcloud.dev/homepage: https://github.com/wasmCloud/wasmCloud/tree/main/examples/rusg/components/http-hello-world + wasmcloud.dev/categories: | + http,http-server,rust,hello-world,example +spec: + components: + - name: http-component + type: component + properties: + # To use the locally compiled code in this folder, use the line below instead after running `wash build`: + # image: file://./build/http_hello_world_s.wasm + image: ghcr.io/wasmcloud/components/http-hello-world-rust:0.1.0 + traits: + # Govern the spread/scheduling of the component + - type: spreadscaler + properties: + replicas: 1 + + # Add a capability provider that enables HTTP access + - name: httpserver + type: capability + properties: + image: ghcr.io/wasmcloud/http-server:0.21.0 + traits: + # Establish a unidirectional link from this http server provider (the "source") + # to the `http-component` component (the "target") so the component can handle incoming HTTP requests, + # + # The source (this provider) is configured such that the HTTP server listens on 127.0.0.1:8080 + - type: link + properties: + target: http-component + namespace: wasi + package: http + interfaces: [incoming-handler] + source_config: + - name: default-http + properties: + address: 127.0.0.1:8080 diff --git a/examples/quickstart/nats-values.yaml b/examples/quickstart/nats-values.yaml new file mode 100644 index 0000000..457bdd9 --- /dev/null +++ b/examples/quickstart/nats-values.yaml @@ -0,0 +1,16 @@ +config: + cluster: + enabled: true + replicas: 3 + leafnodes: + enabled: true + websocket: + enabled: true + port: 4223 + jetstream: + enabled: true + fileStore: + pvc: + size: 10Gi + merge: + domain: default diff --git a/examples/quickstart/wadm-values.yaml b/examples/quickstart/wadm-values.yaml new file mode 100644 index 0000000..41bf12f --- /dev/null +++ b/examples/quickstart/wadm-values.yaml @@ -0,0 +1,6 @@ +wadm: + image: + tag: v0.12.2 + config: + nats: + server: "nats-cluster.default.svc.cluster.local:4222" diff --git a/sample.yaml b/sample.yaml deleted file mode 100644 index de77ab7..0000000 --- a/sample.yaml +++ /dev/null @@ -1,53 +0,0 @@ -apiVersion: k8s.wasmcloud.dev/v1alpha1 -kind: WasmCloudHostConfig -metadata: - name: my-wasmcloud-cluster - namespace: default -spec: - hostReplicas: 1 - # The lattice to connect the hosts to - lattice: default - # Additional labels to apply to the host other than the defaults set in the controller - hostLabels: - test: value - cluster: kind - # Which wasmCloud version to use - version: "1.0.2" - logLevel: INFO - natsAddress: nats://nats-cluster.default.svc.cluster.local - ################################################ - # Additional options that can be set for hosts: - ################################################ - # allowLatest: true - # allowedInsecure: - # - "localhost:5001" - # - "kind-registry:5000" - # Policy service configuration - # policyService: - # topic: "wasmcloud.policy" - # changesTopic: "bar" - # timeoutMs: 10000 - # Additional options to control how the underlying wasmCloud hosts are scheduled in Kubernetes. - # This includes setting resource requirements for the nats and wasmCloud host - # containers along with any additional pot template settings. - # schedulingOptions: - # Enable the following to run the wasmCloud hosts as a DaemonSet - # daemonset: true - # Set the resource requirements for the nats and wasmCloud host containers. - # resources: - # nats: - # requests: - # cpu: 100m - # wasmCloudHost: - # requests: - # cpu: 100m - # Any additional pod template settings to apply to the wasmCloud host pods. - # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#podspec-v1-core for all valid options. - # Note that you *cannot* set the `containers` field here as it is managed by the controller. - # podTemplateAdditions: - # spec: - # env: - # - name: HOST_IP - # value: spec.hostIP - # nodeSelector: - # kubernetes.io/os: linux From 04989cab0e06ddc6f796ebf5c8dcc304dad954be Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Wed, 10 Jul 2024 13:52:26 -0300 Subject: [PATCH 02/10] port forwarding Signed-off-by: Lucas Fontes --- examples/quickstart/README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/examples/quickstart/README.md b/examples/quickstart/README.md index b51182d..c9f1221 100644 --- a/examples/quickstart/README.md +++ b/examples/quickstart/README.md @@ -34,7 +34,7 @@ kubectl get deploy wadm ## Install the operator ```sh -kubectl apply -k ../deploy/base +kubectl apply -k ../../deploy/base ``` Validate installation with: @@ -58,7 +58,7 @@ Check wasmCloud host status with: kubectl describe wasmcloudhostconfig default ``` -## Deploying applications using kubectl +## Managing applications using kubectl Install the rust hello world application: @@ -71,3 +71,17 @@ Check application status with: ```bash kubectl get applications ``` + +## Managing applications with wash + +Port forward into the NATS cluster. 4222 = NATS Service, 4223 = NATS Websockets + +```bash +kubectl port-forward svc/nats-cluster 4222:4222 4223:4223 +``` + +In another shell: + +```bash +wash app list +``` From cd744bb7284c94e815aeeabc7867ded20952ab61 Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Wed, 10 Jul 2024 13:57:33 -0300 Subject: [PATCH 03/10] renaming wasmcloudhost Signed-off-by: Lucas Fontes --- examples/quickstart/README.md | 6 +++--- .../{default-lattice.yaml => wasmcloud-host.yaml} | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) rename examples/quickstart/{default-lattice.yaml => wasmcloud-host.yaml} (76%) diff --git a/examples/quickstart/README.md b/examples/quickstart/README.md index c9f1221..228a10a 100644 --- a/examples/quickstart/README.md +++ b/examples/quickstart/README.md @@ -46,16 +46,16 @@ kubectl -n wasmcloud-operator get deploy kubectl get apiservices.apiregistration.k8s.io v1beta1.core.oam.dev ``` -## Create wasmcloud cluster (Default Lattice) +## Create wasmcloud cluster ```bash -kubectl apply -f default-lattice.yaml +kubectl apply -f wasmcloud-host.yaml ``` Check wasmCloud host status with: ```bash -kubectl describe wasmcloudhostconfig default +kubectl describe wasmcloudhostconfig wasmcloud-host ``` ## Managing applications using kubectl diff --git a/examples/quickstart/default-lattice.yaml b/examples/quickstart/wasmcloud-host.yaml similarity index 76% rename from examples/quickstart/default-lattice.yaml rename to examples/quickstart/wasmcloud-host.yaml index ee0503a..5920d5b 100644 --- a/examples/quickstart/default-lattice.yaml +++ b/examples/quickstart/wasmcloud-host.yaml @@ -1,9 +1,8 @@ apiVersion: k8s.wasmcloud.dev/v1alpha1 kind: WasmCloudHostConfig metadata: - name: default-lattice + name: wasmcloud-host spec: lattice: default version: "1.0.4" - secretName: cluster-secrets natsAddress: nats://nats-cluster.default.svc.cluster.local From 4a052df66953a62bc7ccb6278422063580ba5e65 Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Wed, 10 Jul 2024 14:41:32 -0300 Subject: [PATCH 04/10] dropping 'file:' comments to avoid confusion Signed-off-by: Lucas Fontes --- examples/quickstart/hello-world-application.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/quickstart/hello-world-application.yaml b/examples/quickstart/hello-world-application.yaml index 42d0877..967c8e3 100644 --- a/examples/quickstart/hello-world-application.yaml +++ b/examples/quickstart/hello-world-application.yaml @@ -16,8 +16,6 @@ spec: - name: http-component type: component properties: - # To use the locally compiled code in this folder, use the line below instead after running `wash build`: - # image: file://./build/http_hello_world_s.wasm image: ghcr.io/wasmcloud/components/http-hello-world-rust:0.1.0 traits: # Govern the spread/scheduling of the component From b7e8a2ed90ed25d2dac4267fbacc205a9249f79f Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Wed, 10 Jul 2024 15:29:11 -0300 Subject: [PATCH 05/10] wording Signed-off-by: Lucas Fontes --- examples/quickstart/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/quickstart/README.md b/examples/quickstart/README.md index 228a10a..cb00531 100644 --- a/examples/quickstart/README.md +++ b/examples/quickstart/README.md @@ -2,7 +2,7 @@ This example shows the bare minimum requirements to deploy applications on wasmCloud. -It relies on Kubernetes `default` namespace for simplicity. +It relies on the Kubernetes `default` namespace for simplicity. ## Install [NATS](https://github.com/nats-io/nats-server) From a5f3aebc64f52a7eb93ed638f59651de9594c856 Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Mon, 22 Jul 2024 12:39:27 -0300 Subject: [PATCH 06/10] Full example Signed-off-by: Lucas Fontes --- examples/full-config/wasmcloud-annotated.yaml | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 examples/full-config/wasmcloud-annotated.yaml diff --git a/examples/full-config/wasmcloud-annotated.yaml b/examples/full-config/wasmcloud-annotated.yaml new file mode 100644 index 0000000..f5eacec --- /dev/null +++ b/examples/full-config/wasmcloud-annotated.yaml @@ -0,0 +1,91 @@ +apiVersion: k8s.wasmcloud.dev/v1alpha1 +kind: WasmCloudHostConfig +metadata: + name: my-wasmcloud-cluster + namespace: default +spec: + # Optional: Number of hosts (pods). Defaults to 1. + hostReplicas: 1 + # Required: The lattice to connect the hosts to. + lattice: default + # Optional: Additional labels to apply to the host other than the defaults set in the controller. + hostLabels: + test: value + cluster: kind + # Required: Which wasmCloud version to use. + version: "1.0.2" + # Optional: The image to use for the wasmCloud host. + # If provided, the 'version' field will be ignored. + image: "registry/wasmcloud:tag" + # Optional: The image to use for the NATS leaf that is deployed alongside the wasmCloud host. + # If not provided, the default upstream image will be used. + natsLeafImage: "registry/nats:tag" + # Optional. The name of a secret containing a set of NATS credentials under 'nats.creds' key. + secretName: "wasmcloud-host-nats-secret" + # Optional: Enable structured logging for host logs. Defaults to "false". + enableStructuredLogging: true + # Optional: The name of a secret containing the registry credentials. + # See https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-by-providing-credentials-on-the-command-line + registryCredentialsSecret: "wasmcloud-pull-secret" + # Optional: The control topic prefix to use for the host. Defaults to "wasmbus.ctl" + controlTopicPrefix: "wasmbus.custom-ctl" + # Optional: The leaf node domain to use for the NATS sidecar. Defaults to "leaf". + leafNodeDomain: "custom-leaf" + # Optional: Enable the config service for this host. Defaults to "false". + # Makes wasmCloud host issue requests to a config service on startup. + configServiceEnabled: true + # Optional: The log level to use for the host. Defaults to "INFO". + logLevel: INFO + # Optional: The address of the NATS server to connect to. Defaults to "nats://nats.default.svc.cluster.local". + natsAddress: nats://nats-cluster.default.svc.cluster.local + # Optional: Allow the host to deploy using the latest tag on OCI components or providers. Defaults to "false". + allowLatest: true + # Optional: Allow the host to pull artifacts from OCI registries insecurely. + allowedInsecure: + - "localhost:5001" + - "kind-registry:5000" + # Optional: Policy service configuration. + policyService: + # If provided, enables policy checks on start actions and component invocations. + topic: "wasmcloud.policy" + # If provided, allows the host to subscribe to updates on past policy decisions. Requires 'topic' above to be set. + changesTopic: "bar" + # If provided, allows setting a custom timeout for requesting policy decisions. Defaults to 1000. Requires 'topic' to be set. + timeoutMs: 10000 + # Optional: Observability options for configuring the OpenTelemetry integration. + observability: + enable: true + endpoint: "otel-collector.svc" + # Either 'grpc' or 'http' + protocol: "grpc" + logs: + enable: true + endpoint: "logs-specific-otel-collector.svc" + metrics: + enable: true + endpoint: "metrics-specific-otel-collector.svc" + traces: + enable: true + endpoint: "metrics-specific-otel-collector.svc" + # Optional: Additional options to control how the underlying wasmCloud hosts are scheduled in Kubernetes. + # This includes setting resource requirements for the nats and wasmCloud host + # containers along with any additional pot template settings. + schedulingOptions: + # Optional: Enable the following to run the wasmCloud hosts as a DaemonSet. Defaults to "false". + daemonset: true + # Optional: Set the resource requirements for the nats and wasmCloud host containers. + # See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for valid values + resources: + nats: + requests: + cpu: 100m + wasmCloudHost: + requests: + cpu: 100m + # Optional: Any additional pod template settings to apply to the wasmCloud host pods. + # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#podspec-v1-core for all valid options. + # Note that you *cannot* set the `containers` field here as it is managed by the controller. + podTemplateAdditions: + spec: + nodeSelector: + kubernetes.io/os: linux From 0057f8f2ecff5a19c3ea9dd68b940faf6b978da3 Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Mon, 22 Jul 2024 13:09:38 -0300 Subject: [PATCH 07/10] Fixing template additions indentation Signed-off-by: Lucas Fontes --- examples/full-config/wasmcloud-annotated.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/full-config/wasmcloud-annotated.yaml b/examples/full-config/wasmcloud-annotated.yaml index f5eacec..49baf22 100644 --- a/examples/full-config/wasmcloud-annotated.yaml +++ b/examples/full-config/wasmcloud-annotated.yaml @@ -82,10 +82,10 @@ spec: wasmCloudHost: requests: cpu: 100m - # Optional: Any additional pod template settings to apply to the wasmCloud host pods. - # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#podspec-v1-core for all valid options. - # Note that you *cannot* set the `containers` field here as it is managed by the controller. - podTemplateAdditions: - spec: - nodeSelector: - kubernetes.io/os: linux + # Optional: Any additional pod template settings to apply to the wasmCloud host pods. + # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#podspec-v1-core for all valid options. + # Note that you *cannot* set the `containers` field here as it is managed by the controller. + podTemplateAdditions: + spec: + nodeSelector: + kubernetes.io/os: linux From f3788862fdebfd4ba026f392b1c5c9f874401b55 Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Mon, 22 Jul 2024 15:31:24 -0300 Subject: [PATCH 08/10] Addressing PR comments Signed-off-by: Lucas Fontes --- README.md | 10 +++++----- examples/full-config/wasmcloud-annotated.yaml | 19 ++++++++++--------- examples/quickstart/README.md | 12 ++++++------ examples/quickstart/wadm-values.yaml | 2 +- examples/quickstart/wasmcloud-host.yaml | 1 - 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index a6a9fc2..547bf2f 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,14 @@ spec: # The number of wasmCloud host pods to run hostReplicas: 2 # The lattice to connect the hosts to - lattice: 83a5b52e-17cf-4080-bac8-f844099f142e + lattice: default # Additional labels to apply to the host other than the defaults set in the operator hostLabels: some-label: value # The address to connect to nats - natsAddress: nats://nats-cluster.default.svc.cluster.local + natsAddress: nats://nats.default.svc.cluster.local # Which wasmCloud version to use - version: 1.0.2 + version: 1.0.4 # Enable the following to run the wasmCloud hosts as a DaemonSet #daemonset: true # The name of the image pull secret to use with wasmCloud hosts so that they @@ -121,7 +121,7 @@ config: ```sh helm repo add nats https://nats-io.github.io/k8s/helm/charts/ -helm upgrade --install -f values.yaml nats-cluster nats/nats +helm upgrade --install -f values.yaml nats nats/nats ``` ### Running Wadm @@ -133,7 +133,7 @@ NATS server deployed above, all you need in your `values.yaml` file is: wadm: config: nats: - server: "nats-cluster.default.svc.cluster.local:4222" + server: "nats.default.svc.cluster.local:4222" ``` You can deploy Wadm using your values file and Helm: diff --git a/examples/full-config/wasmcloud-annotated.yaml b/examples/full-config/wasmcloud-annotated.yaml index 49baf22..02463a0 100644 --- a/examples/full-config/wasmcloud-annotated.yaml +++ b/examples/full-config/wasmcloud-annotated.yaml @@ -13,7 +13,7 @@ spec: test: value cluster: kind # Required: Which wasmCloud version to use. - version: "1.0.2" + version: "1.0.4" # Optional: The image to use for the wasmCloud host. # If provided, the 'version' field will be ignored. image: "registry/wasmcloud:tag" @@ -37,7 +37,7 @@ spec: # Optional: The log level to use for the host. Defaults to "INFO". logLevel: INFO # Optional: The address of the NATS server to connect to. Defaults to "nats://nats.default.svc.cluster.local". - natsAddress: nats://nats-cluster.default.svc.cluster.local + natsAddress: nats://nats.default.svc.cluster.local # Optional: Allow the host to deploy using the latest tag on OCI components or providers. Defaults to "false". allowLatest: true # Optional: Allow the host to pull artifacts from OCI registries insecurely. @@ -54,19 +54,20 @@ spec: timeoutMs: 10000 # Optional: Observability options for configuring the OpenTelemetry integration. observability: + # NOTE: Enables all signals (logs/metrics/traces) at once. Set it to 'false' and enable each signal individually in case you don't need all of them. enable: true endpoint: "otel-collector.svc" # Either 'grpc' or 'http' - protocol: "grpc" + protocol: "http" logs: - enable: true + enable: false endpoint: "logs-specific-otel-collector.svc" metrics: - enable: true + enable: false endpoint: "metrics-specific-otel-collector.svc" traces: - enable: true - endpoint: "metrics-specific-otel-collector.svc" + enable: false + endpoint: "traces-specific-otel-collector.svc" # Optional: Additional options to control how the underlying wasmCloud hosts are scheduled in Kubernetes. # This includes setting resource requirements for the nats and wasmCloud host # containers along with any additional pot template settings. @@ -78,10 +79,10 @@ spec: resources: nats: requests: - cpu: 100m + cpu: "1" wasmCloudHost: requests: - cpu: 100m + cpu: "1" # Optional: Any additional pod template settings to apply to the wasmCloud host pods. # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#podspec-v1-core for all valid options. # Note that you *cannot* set the `containers` field here as it is managed by the controller. diff --git a/examples/quickstart/README.md b/examples/quickstart/README.md index cb00531..f39f0bf 100644 --- a/examples/quickstart/README.md +++ b/examples/quickstart/README.md @@ -8,27 +8,27 @@ It relies on the Kubernetes `default` namespace for simplicity. ```bash helm repo add nats https://nats-io.github.io/k8s/helm/charts/ -helm upgrade --install -f nats-values.yaml nats-cluster nats/nats +helm upgrade --install -f nats-values.yaml nats nats/nats ``` Validate installation with: ```bash # make sure pods are ready -kubectl get statefulset,deployment -l app.kubernetes.io/instance=nats-cluster +kubectl get statefulset,deployment -l app.kubernetes.io/instance=nats ``` ## Install wasmCloud Application Deployment Manager - [wadm](https://github.com/wasmCloud/wadm) ```sh -helm install wadm -f wadm-values.yaml --version 0.2.0 oci://ghcr.io/wasmcloud/charts/wadm +helm install wadm -f wadm-values.yaml oci://ghcr.io/wasmcloud/charts/wadm ``` Validate installation with: ```bash # make sure pods are ready -kubectl get deploy wadm +kubectl rollout status deploy -l app.kubernetes.io/instance=wadm ``` ## Install the operator @@ -41,7 +41,7 @@ Validate installation with: ```bash # make sure pods are ready -kubectl -n wasmcloud-operator get deploy +kubectl rollout status deploy -l app=wasmcloud-operator -n wasmcloud-operator # apiservice should be available kubectl get apiservices.apiregistration.k8s.io v1beta1.core.oam.dev ``` @@ -77,7 +77,7 @@ kubectl get applications Port forward into the NATS cluster. 4222 = NATS Service, 4223 = NATS Websockets ```bash -kubectl port-forward svc/nats-cluster 4222:4222 4223:4223 +kubectl port-forward svc/nats 4222:4222 4223:4223 ``` In another shell: diff --git a/examples/quickstart/wadm-values.yaml b/examples/quickstart/wadm-values.yaml index 41bf12f..b7c209b 100644 --- a/examples/quickstart/wadm-values.yaml +++ b/examples/quickstart/wadm-values.yaml @@ -3,4 +3,4 @@ wadm: tag: v0.12.2 config: nats: - server: "nats-cluster.default.svc.cluster.local:4222" + server: "nats.default.svc.cluster.local:4222" diff --git a/examples/quickstart/wasmcloud-host.yaml b/examples/quickstart/wasmcloud-host.yaml index 5920d5b..b9a87d4 100644 --- a/examples/quickstart/wasmcloud-host.yaml +++ b/examples/quickstart/wasmcloud-host.yaml @@ -5,4 +5,3 @@ metadata: spec: lattice: default version: "1.0.4" - natsAddress: nats://nats-cluster.default.svc.cluster.local From 2f283f8ebb5e48b3b8665444f42aa4226200f37e Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Mon, 22 Jul 2024 15:33:01 -0300 Subject: [PATCH 09/10] nats too Signed-off-by: Lucas Fontes --- examples/quickstart/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/quickstart/README.md b/examples/quickstart/README.md index f39f0bf..2abfdfd 100644 --- a/examples/quickstart/README.md +++ b/examples/quickstart/README.md @@ -15,7 +15,7 @@ Validate installation with: ```bash # make sure pods are ready -kubectl get statefulset,deployment -l app.kubernetes.io/instance=nats +kubectl rollout status deploy,sts -l app.kubernetes.io/instance=nats ``` ## Install wasmCloud Application Deployment Manager - [wadm](https://github.com/wasmCloud/wadm) From b24b5805e107bd519adbfd5273723720ac2d0f45 Mon Sep 17 00:00:00 2001 From: Lucas Fontes Date: Mon, 22 Jul 2024 15:43:03 -0300 Subject: [PATCH 10/10] Update examples/full-config/wasmcloud-annotated.yaml Co-authored-by: Joonas Bergius Signed-off-by: Lucas Fontes --- examples/full-config/wasmcloud-annotated.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/full-config/wasmcloud-annotated.yaml b/examples/full-config/wasmcloud-annotated.yaml index 02463a0..667e99a 100644 --- a/examples/full-config/wasmcloud-annotated.yaml +++ b/examples/full-config/wasmcloud-annotated.yaml @@ -49,7 +49,7 @@ spec: # If provided, enables policy checks on start actions and component invocations. topic: "wasmcloud.policy" # If provided, allows the host to subscribe to updates on past policy decisions. Requires 'topic' above to be set. - changesTopic: "bar" + changesTopic: "wasmcloud.policy.changes" # If provided, allows setting a custom timeout for requesting policy decisions. Defaults to 1000. Requires 'topic' to be set. timeoutMs: 10000 # Optional: Observability options for configuring the OpenTelemetry integration.