You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,6 +164,48 @@ Set `enabled: false` (or remove the block) to turn the feature back off; the ope
164
164
The default image used is `quay.io/llamastack/llama-stack-k8s-operator:latest` when not supply argument for `make image`
165
165
To create a local file `local.mk` with env variables can overwrite the default values set in the `Makefile`.
166
166
167
+
- Building multi-architecture images (ARM64, AMD64, etc.)
168
+
169
+
The operator supports building for multiple architectures including ARM64. To build and push multi-arch images:
170
+
171
+
```commandline
172
+
make image-buildx IMG=quay.io/<username>/llama-stack-k8s-operator:<custom-tag>
173
+
```
174
+
175
+
By default, this builds for `linux/amd64,linux/arm64`. You can customize the platforms by setting the `PLATFORMS` variable:
176
+
177
+
```commandline
178
+
# Build for specific platforms
179
+
make image-buildx IMG=quay.io/<username>/llama-stack-k8s-operator:<custom-tag> PLATFORMS=linux/amd64,linux/arm64
180
+
181
+
# Add more architectures (e.g., for future support)
182
+
make image-buildx IMG=quay.io/<username>/llama-stack-k8s-operator:<custom-tag> PLATFORMS=linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
183
+
```
184
+
185
+
**Note**:
186
+
- The `image-buildx` target works with both Docker and Podman. It will automatically detect which tool is being used.
187
+
-**Native cross-compilation**: The Dockerfile uses `--platform=$BUILDPLATFORM` to run Go compilation natively on the build host, avoiding QEMU emulation for the build process. This dramatically improves build speed and reliability. Only the minimal final stage (package installation) runs under QEMU for cross-platform builds.
188
+
-**FIPS adherence**: Native builds use `CGO_ENABLED=1` with full OpenSSL FIPS support. Cross-compiled builds use `CGO_ENABLED=0` with pure Go FIPS (via `GOEXPERIMENT=strictfipsruntime`). Both approaches are Designed for FIPS.
189
+
- For Docker: Multi-arch builds require Docker Buildx. Ensure Docker Buildx is set up:
190
+
191
+
```commandline
192
+
docker buildx create --name x-builder --use
193
+
```
194
+
195
+
- For Podman: Podman 4.0+ supports `podman buildx` (experimental). If buildx is unavailable, the Makefile will automatically fall back to using podman's native manifest-based multi-arch build approach.
196
+
- The resulting images are multi-arch manifest lists, which means Kubernetes will automatically select the correct architecture when pulling the image.
197
+
198
+
- Building ARM64-only images
199
+
200
+
To build a single ARM64 image (useful for testing or ARM-native systems):
201
+
202
+
```commandline
203
+
make image-build-arm IMG=quay.io/<username>/llama-stack-k8s-operator:<custom-tag>
204
+
make image-push IMG=quay.io/<username>/llama-stack-k8s-operator:<custom-tag>
205
+
```
206
+
207
+
This works with both Docker and Podman.
208
+
167
209
- Once the image is created, the operator can be deployed directly. For each deployment method a
0 commit comments