Skip to content

Commit d77c459

Browse files
authored
Merge pull request #278 from aojea/patch-1
Update ci dependencies
2 parents a5ecb01 + 54c123e commit d77c459

File tree

3 files changed

+36
-31
lines changed

3 files changed

+36
-31
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
build:
55
strategy:
66
matrix:
7-
go-version: [1.18.x, 1.19.x]
7+
go-version: [1.19.x, 1.20.x]
88
platform: [windows-latest]
99
runs-on: ${{ matrix.platform }}
1010
steps:
@@ -24,7 +24,7 @@ jobs:
2424
test:
2525
strategy:
2626
matrix:
27-
go-version: [1.18.x, 1.19.x]
27+
go-version: [1.19.x, 1.20.x]
2828
platform: [ubuntu-latest, macos-latest]
2929
runs-on: ${{ matrix.platform }}
3030
steps:
@@ -47,7 +47,7 @@ jobs:
4747
- name: Lint
4848
run: |
4949
docker run --rm -v `pwd`:/go/src/k8s.io/klog -w /go/src/k8s.io/klog \
50-
golangci/golangci-lint:v1.46.2 golangci-lint run --disable-all -v \
50+
golangci/golangci-lint:v1.51.2 golangci-lint run --disable-all -v \
5151
-E govet -E misspell -E gofmt -E ineffassign -E golint
5252
apidiff:
5353
runs-on: ubuntu-latest
@@ -56,7 +56,7 @@ jobs:
5656
- name: Install Go
5757
uses: actions/setup-go@v3
5858
with:
59-
go-version: 1.19.x
59+
go-version: 1.20.x
6060
- name: Add GOBIN to PATH
6161
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
6262
- name: Install dependencies

inotify/inotify_linux.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@
99
Package inotify implements a wrapper for the Linux inotify system.
1010
1111
Example:
12-
watcher, err := inotify.NewWatcher()
13-
if err != nil {
14-
log.Fatal(err)
15-
}
16-
err = watcher.Watch("/tmp")
17-
if err != nil {
18-
log.Fatal(err)
19-
}
20-
for {
21-
select {
22-
case ev := <-watcher.Event:
23-
log.Println("event:", ev)
24-
case err := <-watcher.Error:
25-
log.Println("error:", err)
26-
}
27-
}
2812
13+
watcher, err := inotify.NewWatcher()
14+
if err != nil {
15+
log.Fatal(err)
16+
}
17+
err = watcher.Watch("/tmp")
18+
if err != nil {
19+
log.Fatal(err)
20+
}
21+
for {
22+
select {
23+
case ev := <-watcher.Event:
24+
log.Println("event:", ev)
25+
case err := <-watcher.Error:
26+
log.Println("error:", err)
27+
}
28+
}
2929
*/
3030
package inotify // import "k8s.io/utils/inotify"
3131

nsenter/nsenter.go

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,28 @@ type Nsenter = NSEnter
4949
//
5050
// NSEnter requires:
5151
//
52-
// 1. Docker >= 1.6 due to the dependency on the slave propagation mode
52+
// 1. Docker >= 1.6 due to the dependency on the slave propagation mode
5353
// of the bind-mount of the kubelet root directory in the container.
5454
// Docker 1.5 used a private propagation mode for bind-mounts, so mounts
5555
// performed in the host's mount namespace do not propagate out to the
5656
// bind-mount in this docker version.
57-
// 2. The host's root filesystem must be available at /rootfs
58-
// 3. The nsenter binary must be on the Kubelet process' PATH in the container's
57+
// 2. The host's root filesystem must be available at /rootfs
58+
// 3. The nsenter binary must be on the Kubelet process' PATH in the container's
5959
// filesystem.
60-
// 4. The Kubelet process must have CAP_SYS_ADMIN (required by nsenter); at
60+
// 4. The Kubelet process must have CAP_SYS_ADMIN (required by nsenter); at
6161
// the present, this effectively means that the kubelet is running in a
6262
// privileged container.
63-
// 5. The volume path used by the Kubelet must be the same inside and outside
63+
// 5. The volume path used by the Kubelet must be the same inside and outside
6464
// the container and be writable by the container (to initialize volume)
6565
// contents. TODO: remove this requirement.
66-
// 6. The host image must have "mount", "findmnt", "umount", "stat", "touch",
66+
// 6. The host image must have "mount", "findmnt", "umount", "stat", "touch",
6767
// "mkdir", "ls", "sh" and "chmod" binaries in /bin, /usr/sbin, or /usr/bin
68-
// 7. The host image should have systemd-run in /bin, /usr/sbin, or /usr/bin if
68+
// 7. The host image should have systemd-run in /bin, /usr/sbin, or /usr/bin if
6969
// systemd is installed/enabled in the operating system.
70+
//
7071
// For more information about mount propagation modes, see:
71-
// https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt
72+
//
73+
// https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt
7274
type NSEnter struct {
7375
// a map of commands to their paths on the host filesystem
7476
paths map[string]string
@@ -174,10 +176,13 @@ func (ne *NSEnter) SupportsSystemd() (string, bool) {
174176
// exist. When it's false, it evaluates symlinks of the existing part and
175177
// blindly adds the non-existing part:
176178
// pathname: /mnt/volume/non/existing/directory
177-
// /mnt/volume exists
178-
// non/existing/directory does not exist
179+
//
180+
// /mnt/volume exists
181+
// non/existing/directory does not exist
182+
//
179183
// -> It resolves symlinks in /mnt/volume to say /mnt/foo and returns
180-
// /mnt/foo/non/existing/directory.
184+
//
185+
// /mnt/foo/non/existing/directory.
181186
//
182187
// BEWARE! EvalSymlinks is not able to detect symlink looks with mustExist=false!
183188
// If /tmp/link is symlink to /tmp/link, EvalSymlinks(/tmp/link/foo) returns /tmp/link/foo.

0 commit comments

Comments
 (0)