Skip to content

Commit

Permalink
Merge pull request #1231 from etungsten/restart-commands
Browse files Browse the repository at this point in the history
models: add restart-commands for docker, kubelet, containerd
  • Loading branch information
etungsten authored Dec 4, 2020
2 parents c06a812 + a9e1617 commit ccc864a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
8 changes: 7 additions & 1 deletion sources/models/defaults.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,18 @@ template-path = "/usr/share/templates/motd"

[services.containerd]
configuration-files = ["containerd-config-toml"]
restart-commands = []
restart-commands = ["/bin/systemctl try-restart containerd.service"]

[configuration-files.containerd-config-toml]
path = "/etc/containerd/config.toml"
template-path = "/usr/share/templates/containerd-config-toml"

# Host-container runtime

[services.host-containerd]
configuration-files = []
restart-commands = ["/bin/systemctl try-restart host-containerd.service"]

# Updates.

[settings.updates]
Expand Down
5 changes: 5 additions & 0 deletions sources/models/src/aws-dev/override-defaults.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[configuration-files.containerd-config-toml]
# No override to path
template-path = "/usr/share/templates/containerd-config-toml_aws-dev"

# Docker
[services.docker]
restart-commands = ["/bin/systemctl try-restart docker.service"]
configuration-files = []
5 changes: 5 additions & 0 deletions sources/models/src/aws-ecs-1/override-defaults.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# No override to path
template-path = "/usr/share/templates/containerd-config-toml_aws-ecs-1"

# Docker
[services.docker]
restart-commands = ["/bin/systemctl try-restart docker.service"]
configuration-files = []

# ECS
[services.ecs]
restart-commands = ["/usr/bin/ecs-settings-applier", "/bin/systemctl try-reload-or-restart ecs.service"]
Expand Down
2 changes: 1 addition & 1 deletion sources/models/src/aws-k8s-1.15/override-defaults.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ template-path = "/usr/share/templates/containerd-config-toml_aws-k8s"

[services.kubernetes]
configuration-files = ["kubelet-env", "kubelet-config", "kubelet-kubeconfig", "kubernetes-ca-crt"]
restart-commands = []
restart-commands = ["/bin/systemctl try-restart kubelet.service"]

[configuration-files.kubelet-env]
path = "/etc/kubernetes/kubelet/env"
Expand Down

0 comments on commit ccc864a

Please sign in to comment.