|
| 1 | +--- |
| 2 | +title: Customization |
| 3 | +description: Customize the Helm chart deployment of Confidential Containers |
| 4 | +weight: 1 |
| 5 | +categories: |
| 6 | +- installation |
| 7 | +- helm |
| 8 | +--- |
| 9 | +The Helm chart can be customized by passing additional parameters to the `helm install` command. |
| 10 | + |
| 11 | +## Important Notes |
| 12 | + |
| 13 | +1. **Node Selectors:** When setting node selectors with dots in the key, escape them: `node-role\.kubernetes\.io/worker` |
| 14 | +2. **Namespace:** All examples use `coco-system` namespace. Adjust as needed for your environment |
| 15 | +3. **Architecture:** The default architecture is x86_64. Other architectures must be explicitly specified |
| 16 | +4. **Comma Escaping:** When using `--set` with values containing commas, escape them with `\,` |
| 17 | + |
| 18 | +## Customizing deployment |
| 19 | + |
| 20 | +You can combine architecture values files (with `-f`) and/or with `--set` flags for customizations. |
| 21 | + |
| 22 | + |
| 23 | +### Using `--set` flags |
| 24 | + |
| 25 | +To customize the installation using `--set` flags, run one of the following commands based on your architecture: |
| 26 | + |
| 27 | +```bash |
| 28 | +# For x86_64 |
| 29 | + |
| 30 | +helm install coco oci://ghcr.io/confidential-containers/charts/confidential-containers \ |
| 31 | + --set kata-as-coco-runtime.debug=true \ |
| 32 | + --namespace coco-system \ |
| 33 | + --create-namespace |
| 34 | + |
| 35 | +# For s390x |
| 36 | + |
| 37 | +helm install coco oci://ghcr.io/confidential-containers/charts/confidential-containers \ |
| 38 | + -f https://raw.githubusercontent.com/confidential-containers/charts/main/values/kata-s390x.yaml \ |
| 39 | + --set kata-as-coco-runtime.debug=true \ |
| 40 | + --namespace coco-system \ |
| 41 | + --create-namespace |
| 42 | +``` |
| 43 | + |
| 44 | +Parameters that are commonly customized (use `--set` flags): |
| 45 | + |
| 46 | +| Parameter | Description | Default | |
| 47 | +|-----------------------------------------|---------------------------------------------------------|----------| |
| 48 | +| `kata-as-coco-runtime.imagePullPolicy` | Image pull policy | `Always` | |
| 49 | +| `kata-as-coco-runtime.imagePullSecrets` | Image pull secrets for private registry | `[]` | |
| 50 | +| `kata-as-coco-runtime.k8sDistribution` | Kubernetes distribution (k8s, k3s, rke2, k0s, microk8s) | `k8s` | |
| 51 | +| `kata-as-coco-runtime.nodeSelector` | Node selector for deployment | `{}` | |
| 52 | +| `kata-as-coco-runtime.debug` | Enable debug logging | `false` | |
| 53 | + |
| 54 | +#### Structured Configuration (Kata Containers) |
| 55 | + |
| 56 | +The chart uses Kata Containers' structured configuration format for TEE shims. Parameters set by architecture-specific |
| 57 | +kata runtime values files: |
| 58 | + |
| 59 | +| Parameter | Description | Set by values/kata-*.yaml | |
| 60 | +|--------------------------------------------------------------------|-----------------------------------------------------------------------------------------|---------------------------| |
| 61 | +| `architecture` | Architecture label for NOTES | `x86_64` or `s390x` | |
| 62 | +| `kata-as-coco-runtime.snapshotter.setup` | Array of snapshotters to set up (e.g., `["nydus"]`) | Architecture-specific | |
| 63 | +| `kata-as-coco-runtime.shims.<shim-name>.enabled` | Enable/disable specific shim (e.g., `qemu-snp`, `qemu-tdx`, `qemu-se`, `qemu-coco-dev`) | Architecture-specific | |
| 64 | +| `kata-as-coco-runtime.shims.<shim-name>.supportedArches` | List of architectures supported by the shim | Architecture-specific | |
| 65 | +| `kata-as-coco-runtime.shims.<shim-name>.containerd.snapshotter` | Snapshotter to use for containerd (e.g., `nydus`, `""` for none) | Architecture-specific | |
| 66 | +| `kata-as-coco-runtime.shims.<shim-name>.containerd.forceGuestPull` | Enable experimental force guest pull | `false` | |
| 67 | +| `kata-as-coco-runtime.shims.<shim-name>.crio.guestPull` | Enable guest pull for CRI-O | Architecture-specific | |
| 68 | +| `kata-as-coco-runtime.shims.<shim-name>.agent.httpsProxy` | HTTPS proxy for guest agent | `""` | |
| 69 | +| `kata-as-coco-runtime.shims.<shim-name>.agent.noProxy` | No proxy settings for guest agent | `""` | |
| 70 | +| `kata-as-coco-runtime.runtimeClasses.enabled` | Create runtimeclass resources | `true` | |
| 71 | +| `kata-as-coco-runtime.runtimeClasses.createDefault` | Create default k8s runtimeclass | `false` | |
| 72 | +| `kata-as-coco-runtime.runtimeClasses.defaultName` | Name for default runtimeclass | `"kata"` | |
| 73 | +| `kata-as-coco-runtime.defaultShim.<arch>` | Default shim per architecture (e.g., `amd64: qemu-snp`) | Architecture-specific | |
| 74 | + |
| 75 | +#### Additional Parameters (kata-deploy options) |
| 76 | + |
| 77 | +These inherit from kata-deploy defaults but can be overridden: |
| 78 | + |
| 79 | +| Parameter | Description | Default | |
| 80 | +|-----------------------------------------------|-----------------------------------|---------------------------------------| |
| 81 | +| `kata-as-coco-runtime.image.reference` | Kata deploy image | `quay.io/kata-containers/kata-deploy` | |
| 82 | +| `kata-as-coco-runtime.image.tag` | Kata deploy image tag | Chart's application version | |
| 83 | +| `kata-as-coco-runtime.env.installationPrefix` | Installation path prefix | `""` (uses kata-deploy defaults) | |
| 84 | +| `kata-as-coco-runtime.env.multiInstallSuffix` | Suffix for multiple installations | `""` | |
| 85 | + |
| 86 | +See [quickstart](https://github.com/confidential-containers/charts/blob/main/QUICKSTART.md) for complete customization examples and usage. |
| 87 | + |
| 88 | +### Using file based values |
| 89 | + |
| 90 | +Prepare `my-values.yaml` file in one of the following ways: |
| 91 | + |
| 92 | +- Using latest default values downloaded from the chart: |
| 93 | + |
| 94 | + ```bash |
| 95 | + helm show values oci://ghcr.io/confidential-containers/charts/confidential-containers > my-values.yaml |
| 96 | + ``` |
| 97 | + |
| 98 | +- Using newly created file `my-values.yaml` with your customizations, e.g., for s390x with debug and node selector: |
| 99 | + |
| 100 | + ```yaml |
| 101 | + architecture: s390x |
| 102 | + |
| 103 | + kata-as-coco-runtime: |
| 104 | + env: |
| 105 | + debug: "true" |
| 106 | + shims: "qemu-coco-dev qemu-se" |
| 107 | + snapshotterHandlerMapping: "qemu-coco-dev:nydus,qemu-se:nydus" |
| 108 | + agentHttpsProxy: "http://proxy.example.com:8080" |
| 109 | + nodeSelector: |
| 110 | + node-role.kubernetes.io/worker: "" |
| 111 | + ``` |
| 112 | +
|
| 113 | + List of custom values examples can be found in the [examples-custom-values](https://github.com/confidential-containers/charts/blob/main/examples-custom-values.yaml). |
| 114 | +
|
| 115 | +Install chart using your custom values file: |
| 116 | +
|
| 117 | +```bash |
| 118 | +helm install coco oci://ghcr.io/confidential-containers/charts/confidential-containers \ |
| 119 | + -f my-values.yaml \ |
| 120 | + --namespace coco-system \ |
| 121 | + --create-namespace |
| 122 | +``` |
| 123 | + |
| 124 | +#### Multiple combined customization options |
| 125 | + |
| 126 | +Customizations using `--set` flags can be combined with file based values using `-f`. |
| 127 | + |
| 128 | +See below example which will provide s390x architecture, enable debug logging, and set a node selector for worker nodes. |
| 129 | + |
| 130 | +```bash |
| 131 | +helm install coco oci://ghcr.io/confidential-containers/charts/confidential-containers \ |
| 132 | + -f https://raw.githubusercontent.com/confidential-containers/charts/main/values/kata-s390x.yaml \ |
| 133 | + --set kata-as-coco-runtime.env.debug=true \ |
| 134 | + --set kata-as-coco-runtime.nodeSelector."node-role\.kubernetes\.io/worker"="" \ |
| 135 | + --set kata-as-coco-runtime.k8sDistribution=k3s \ |
| 136 | + --namespace coco-system \ |
| 137 | + --create-namespace |
| 138 | +``` |
0 commit comments