Changed in this PR
The CONCOURSE_CONTAINERD_INIT_BIN needs to point to /var/vcap/packages/concourse/bin/init specifically on BOSH when running containerd.
This should only be set when using containerd as the runtime. Currently, that means checking if the runtime property is set to "containerd" explicitly.
In the future when the concourse binary will default to containerd when no runtime property is set we also need to check if runtime is nil.
Notes to reviewer
This will be easier to test with the bosh-template gem.
Scenario 3
bosh-template jobs/worker/templates/env.sh.erb --context '{"id":"abc123-123abc", "properties":{}}'
Result:
CONCOURSE_CONTAINERD_INIT_BIN will not be set
Part of: concourse/concourse#5984
Changed in this PR The CONCOURSE_CONTAINERD_INIT_BIN needs to point to /var/vcap/packages/concourse/bin/init specifically on BOSH when running containerd.
This should only be set when using containerd as the runtime. Currently, that means checking if the runtime property is set to "containerd" explicitly.
In the future when the concourse binary will default to containerd when no runtime property is set we also need to check if runtime is nil.
Notes to reviewer This will be easier to test with the
bosh-template
gem.gem install bosh-template
Scenario 1
bosh-template jobs/worker/templates/env.sh.erb --context '{"id":"abc123-123abc", "properties":{"runtime":"containerd", "containerd": {"init_bin_path":"something"}}}'
Result:
export CONCOURSE_CONTAINERD_INIT_BIN=something
Scenario 2
bosh-template jobs/worker/templates/env.sh.erb --context '{"id":"abc123-123abc", "properties":{"runtime":"containerd"}}'
Result:
export CONCOURSE_CONTAINERD_INIT_BIN/var/vcap/packages/concourse/bin/init
Scenario 3 bosh-template jobs/worker/templates/env.sh.erb --context '{"id":"abc123-123abc", "properties":{}}' Result:
CONCOURSE_CONTAINERD_INIT_BIN
will not be set