Most of the values in the application spec can be changed, for example:
Container name
Image name (you can adapt image name based on architecture)
Environment variables
Secrets
Volumes
Application name, scheduling configuration or the yaml structure itself cannot be changed as it will prevent yaml from being correctly marshalled.
Example Image Based On CPU Arch
If you have an application that is deployed on multiple devices of various CPU architectures (amd64, arm, arm64), you can specify image substitution (see available environment variables):
While on a 32-bit arm machine the spec will become:
name: example-app
scheduling:
type: AllDevices
spec:
containers:
-name: my-app
image: docker.io/my-org/my-app-arm:latest
Example Device Env Substitution
Let's say you have set an environment variable on the device called:
REGION=sillicon-valley
Now, you can use that environment variable to create something else, for example a URL on which the device will be accessible by users (assuming you have configured domain, etc.):
name: example-app
scheduling:
type: AllDevices
spec:
containers:
-name: my-app
image: docker.io/my-org/my-app:latest
env:
-name: PUBLIC_ADDRESS
value: https://${REGION}.example.com
And your application will then see an environment variable which equals