Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restart ccd service only on bootstrap #32

Merged
merged 2 commits into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ Write your release note:

Format of block header: <category> <target_group>
Possible values:
- category: improvement|noteworthy|action
- target_group: user|operator|developer
- category: breaking|feature|bugfix|doc|other
- target_group: user|operator|developer|dependency
-->
```improvement operator
```other operator

```
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
############# builder
FROM eu.gcr.io/gardener-project/3rd/golang:1.15.5 AS builder
FROM eu.gcr.io/gardener-project/3rd/golang:1.15.7 AS builder

WORKDIR /go/src/github.com/gardener/gardener-extension-os-ubuntu
COPY . .
RUN make install-requirements && make generate && make install

############# gardener-extension-os-ubuntu
FROM eu.gcr.io/gardener-project/3rd/alpine:3.12.1 AS gardener-extension-os-ubuntu
FROM eu.gcr.io/gardener-project/3rd/alpine:3.12.3 AS gardener-extension-os-ubuntu

COPY --from=builder /go/bin/gardener-extension-os-ubuntu /gardener-extension-os-ubuntu
ENTRYPOINT ["/gardener-extension-os-ubuntu"]
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/gardener/gardener-extension-os-ubuntu
go 1.15

require (
github.com/gardener/gardener v1.13.1
github.com/gardener/gardener v1.15.5
github.com/gobuffalo/packr v1.30.1
github.com/gobuffalo/packr/v2 v2.8.0
github.com/google/go-cmp v0.4.1 // indirect
Expand Down
158 changes: 156 additions & 2 deletions go.sum

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions pkg/generator/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ var _ = Describe("Ubuntu OS Generator Test", func() {
Expect(err).NotTo(HaveOccurred())
expected := string(expectedCloudInit)

osc.Units = []*commongen.Unit{
{
Name: "cloud-config-downloader.service",
},
}

cloudInit, _, err := g.Generate(osc)

Expect(err).NotTo(HaveOccurred())
Expand Down Expand Up @@ -105,6 +111,9 @@ ExecStartPre=/opt/bin/init-containerd`)
Name: "other.service",
Content: content,
},
{
Name: "cloud-config-downloader.service",
},
}

cloudInit, _, err := g.Generate(osc)
Expand Down
2 changes: 2 additions & 0 deletions pkg/generator/templates/cloud-init-ubuntu.template
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,7 @@ runcmd:
{{ end }}
{{ end -}}
{{ range $_, $unit := .Units -}}
{{- if or (ne $unit.Name "cloud-config-downloader.service") ($.Bootstrap) }}
- systemctl enable '{{ $unit.Name }}' && systemctl restart '{{ $unit.Name }}'
{{ end -}}
{{ end -}}
1 change: 1 addition & 0 deletions pkg/generator/testfiles/cloud-init
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ runcmd:
- ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
- systemctl restart docker


- systemctl enable 'docker.service' && systemctl restart 'docker.service'
2 changes: 2 additions & 0 deletions pkg/generator/testfiles/cloud-init-containerd-provision
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ runcmd:
- systemctl daemon-reload

- systemctl enable containerd && systemctl restart containerd

- systemctl enable 'cloud-config-downloader.service' && systemctl restart 'cloud-config-downloader.service'
3 changes: 3 additions & 0 deletions pkg/generator/testfiles/cloud-init-with-drop-in
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ write_files:
runcmd:
- until apt-get update -qq && apt-get install --no-upgrade -qqy docker.io socat nfs-common logrotate jq policykit-1; do sleep 1; done
- systemctl daemon-reload

- systemctl enable 'abc.service' && systemctl restart 'abc.service'

- systemctl enable 'mtu-customizer.service' && systemctl restart 'mtu-customizer.service'

- systemctl enable 'other.service' && systemctl restart 'other.service'
5 changes: 5 additions & 0 deletions vendor/github.com/fatih/color/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions vendor/github.com/fatih/color/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions vendor/github.com/fatih/color/Gopkg.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions vendor/github.com/fatih/color/LICENSE.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

179 changes: 179 additions & 0 deletions vendor/github.com/fatih/color/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading