Skip to content

Commit

Permalink
Merge pull request #12178 from hakman/automated-cherry-pick-of-#12177…
Browse files Browse the repository at this point in the history
…-upstream-release-1.21

Automated cherry pick of #12177: Hardcode Flatcar containerd exec command
  • Loading branch information
k8s-ci-robot committed Aug 19, 2021
2 parents c6acb15 + 7f925df commit 5eb4240
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion nodeup/pkg/model/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,10 @@ func (b *ContainerdBuilder) buildSystemdServiceOverrideContainerOS(c *fi.ModelBu
func (b *ContainerdBuilder) buildSystemdServiceOverrideFlatcar(c *fi.ModelBuilderContext) {
lines := []string{
"[Service]",
"Environment=CONTAINERD_CONFIG=" + b.containerdConfigFilePath(),
"EnvironmentFile=/etc/environment",
"Environment=CONTAINERD_CONFIG=" + b.containerdConfigFilePath(),
"ExecStart=",
"ExecStart=/usr/bin/env PATH=${TORCX_BINDIR}:${PATH} ${TORCX_BINDIR}/containerd --config ${CONTAINERD_CONFIG}",
}
contents := strings.Join(lines, "\n")

Expand Down
4 changes: 3 additions & 1 deletion nodeup/pkg/model/tests/containerdbuilder/flatcar/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ afterFiles:
- /etc/containerd/config-kops.toml
contents: |-
[Service]
Environment=CONTAINERD_CONFIG=/etc/containerd/config-kops.toml
EnvironmentFile=/etc/environment
Environment=CONTAINERD_CONFIG=/etc/containerd/config-kops.toml
ExecStart=
ExecStart=/usr/bin/env PATH=${TORCX_BINDIR}:${PATH} ${TORCX_BINDIR}/containerd --config ${CONTAINERD_CONFIG}
onChangeExecute:
- - systemctl
- daemon-reload
Expand Down

0 comments on commit 5eb4240

Please sign in to comment.