|
| 1 | +apiVersion: k8s.wasmcloud.dev/v1alpha1 |
| 2 | +kind: WasmCloudHostConfig |
| 3 | +metadata: |
| 4 | + name: my-wasmcloud-cluster |
| 5 | + namespace: default |
| 6 | +spec: |
| 7 | + # Optional: Number of hosts (pods). Defaults to 1. |
| 8 | + hostReplicas: 1 |
| 9 | + # Required: The lattice to connect the hosts to. |
| 10 | + lattice: default |
| 11 | + # Optional: Additional labels to apply to the host other than the defaults set in the controller. |
| 12 | + hostLabels: |
| 13 | + test: value |
| 14 | + cluster: kind |
| 15 | + # Required: Which wasmCloud version to use. |
| 16 | + version: "1.0.4" |
| 17 | + # Optional: The image to use for the wasmCloud host. |
| 18 | + # If provided, the 'version' field will be ignored. |
| 19 | + image: "registry/wasmcloud:tag" |
| 20 | + # Optional: The image to use for the NATS leaf that is deployed alongside the wasmCloud host. |
| 21 | + # If not provided, the default upstream image will be used. |
| 22 | + natsLeafImage: "registry/nats:tag" |
| 23 | + # Optional. The name of a secret containing a set of NATS credentials under 'nats.creds' key. |
| 24 | + secretName: "wasmcloud-host-nats-secret" |
| 25 | + # Optional: Enable structured logging for host logs. Defaults to "false". |
| 26 | + enableStructuredLogging: true |
| 27 | + # Optional: The name of a secret containing the registry credentials. |
| 28 | + # See https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-by-providing-credentials-on-the-command-line |
| 29 | + registryCredentialsSecret: "wasmcloud-pull-secret" |
| 30 | + # Optional: The control topic prefix to use for the host. Defaults to "wasmbus.ctl" |
| 31 | + controlTopicPrefix: "wasmbus.custom-ctl" |
| 32 | + # Optional: The leaf node domain to use for the NATS sidecar. Defaults to "leaf". |
| 33 | + leafNodeDomain: "custom-leaf" |
| 34 | + # Optional: Enable the config service for this host. Defaults to "false". |
| 35 | + # Makes wasmCloud host issue requests to a config service on startup. |
| 36 | + configServiceEnabled: true |
| 37 | + # Optional: The log level to use for the host. Defaults to "INFO". |
| 38 | + logLevel: INFO |
| 39 | + # Optional: The address of the NATS server to connect to. Defaults to "nats://nats.default.svc.cluster.local". |
| 40 | + natsAddress: nats://nats.default.svc.cluster.local |
| 41 | + # Optional: Allow the host to deploy using the latest tag on OCI components or providers. Defaults to "false". |
| 42 | + allowLatest: true |
| 43 | + # Optional: Allow the host to pull artifacts from OCI registries insecurely. |
| 44 | + allowedInsecure: |
| 45 | + - "localhost:5001" |
| 46 | + - "kind-registry:5000" |
| 47 | + # Optional: Policy service configuration. |
| 48 | + policyService: |
| 49 | + # If provided, enables policy checks on start actions and component invocations. |
| 50 | + topic: "wasmcloud.policy" |
| 51 | + # If provided, allows the host to subscribe to updates on past policy decisions. Requires 'topic' above to be set. |
| 52 | + changesTopic: "wasmcloud.policy.changes" |
| 53 | + # If provided, allows setting a custom timeout for requesting policy decisions. Defaults to 1000. Requires 'topic' to be set. |
| 54 | + timeoutMs: 10000 |
| 55 | + # Optional: Observability options for configuring the OpenTelemetry integration. |
| 56 | + observability: |
| 57 | + # 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. |
| 58 | + enable: true |
| 59 | + endpoint: "otel-collector.svc" |
| 60 | + # Either 'grpc' or 'http' |
| 61 | + protocol: "http" |
| 62 | + logs: |
| 63 | + enable: false |
| 64 | + endpoint: "logs-specific-otel-collector.svc" |
| 65 | + metrics: |
| 66 | + enable: false |
| 67 | + endpoint: "metrics-specific-otel-collector.svc" |
| 68 | + traces: |
| 69 | + enable: false |
| 70 | + endpoint: "traces-specific-otel-collector.svc" |
| 71 | + # Optional: Additional options to control how the underlying wasmCloud hosts are scheduled in Kubernetes. |
| 72 | + # This includes setting resource requirements for the nats and wasmCloud host |
| 73 | + # containers along with any additional pot template settings. |
| 74 | + schedulingOptions: |
| 75 | + # Optional: Enable the following to run the wasmCloud hosts as a DaemonSet. Defaults to "false". |
| 76 | + daemonset: true |
| 77 | + # Optional: Set the resource requirements for the nats and wasmCloud host containers. |
| 78 | + # See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for valid values |
| 79 | + resources: |
| 80 | + nats: |
| 81 | + requests: |
| 82 | + cpu: "1" |
| 83 | + wasmCloudHost: |
| 84 | + requests: |
| 85 | + cpu: "1" |
| 86 | + # Optional: Any additional pod template settings to apply to the wasmCloud host pods. |
| 87 | + # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#podspec-v1-core for all valid options. |
| 88 | + # Note that you *cannot* set the `containers` field here as it is managed by the controller. |
| 89 | + podTemplateAdditions: |
| 90 | + spec: |
| 91 | + nodeSelector: |
| 92 | + kubernetes.io/os: linux |
0 commit comments