Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
be26a6e6
Commit
be26a6e6
authored
Jan 21, 2023
by
Brad Davidson
Committed by
Brad Davidson
Jan 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set cri-dockerd version at build time
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
3897a9e8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
4 deletions
+16
-4
go.mod
go.mod
+1
-1
go.sum
go.sum
+2
-2
cridockerd.go
pkg/agent/cridockerd/cridockerd.go
+2
-0
build
scripts/build
+6
-1
version.sh
scripts/version.sh
+5
-0
No files found.
go.mod
View file @
be26a6e6
...
...
@@ -4,7 +4,7 @@ go 1.19
replace (
github.com/Microsoft/hcsshim => github.com/Microsoft/hcsshim v0.8.22
github.com/Mirantis/cri-dockerd => github.com/k3s-io/cri-dockerd v0.3.
1-0.20230121003339-6a10f78a13eb
// k3s/release-1.24
github.com/Mirantis/cri-dockerd => github.com/k3s-io/cri-dockerd v0.3.
2-0.20230123224751-84abd1adca2f
// k3s/release-1.24
github.com/cloudnativelabs/kube-router => github.com/k3s-io/kube-router v1.5.2-0.20221026101626-e01045262706
github.com/containerd/cgroups => github.com/containerd/cgroups v1.0.1
github.com/containerd/containerd => github.com/k3s-io/containerd v1.5.16-k3s1 // k3s-release/1.5
...
...
go.sum
View file @
be26a6e6
...
...
@@ -617,8 +617,8 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
github.com/k3s-io/containerd v1.5.16-k3s1 h1:r8WBp1DJS5OfGWV4XMohQ3SkQnreZRK1E4lT02xUXiA=
github.com/k3s-io/containerd v1.5.16-k3s1/go.mod h1:vCILl/gWFsZXZVuIrDefia9pbKe7cpWbpavHNET9axM=
github.com/k3s-io/cri-dockerd v0.3.
1-0.20230121003339-6a10f78a13eb h1:5l5tdPPyOVp4pa+3ddv/SmDCSxg+DNFjzv64ZFhsOJo
=
github.com/k3s-io/cri-dockerd v0.3.
1-0.20230121003339-6a10f78a13eb
/go.mod h1:ueOhVo7Wl03vKTKYFWNVUvVJ2LNDkmWfSs4z2Th8Um4=
github.com/k3s-io/cri-dockerd v0.3.
2-0.20230123224751-84abd1adca2f h1:IE2u6OszvDDSiKEK5cqFYN6Dv6JwJa2CBHOsfyhwWck
=
github.com/k3s-io/cri-dockerd v0.3.
2-0.20230123224751-84abd1adca2f
/go.mod h1:ueOhVo7Wl03vKTKYFWNVUvVJ2LNDkmWfSs4z2Th8Um4=
github.com/k3s-io/cri-tools v1.24.0-k3s1 h1:Em7IZ/ElBFbHlPLjV0w2ttORxFl5upBxnbP/9IlT/3c=
github.com/k3s-io/cri-tools v1.24.0-k3s1/go.mod h1:w4C33mk2AZdmAVybCyVbHYJUKdbr1sRelBTG7lduYh0=
github.com/k3s-io/etcd/api/v3 v3.5.3-k3s1 h1:XY2oUIIy2+DR7zXk/BVqQ4f2qFHbd2VTAGrnrT4IxhA=
...
...
pkg/agent/cridockerd/cridockerd.go
View file @
be26a6e6
...
...
@@ -7,6 +7,7 @@ import (
"strings"
"github.com/Mirantis/cri-dockerd/cmd"
"github.com/Mirantis/cri-dockerd/cmd/version"
"github.com/k3s-io/k3s/pkg/cgroups"
"github.com/k3s-io/k3s/pkg/daemons/config"
"github.com/sirupsen/logrus"
...
...
@@ -22,6 +23,7 @@ func Run(ctx context.Context, cfg *config.Node) error {
command
:=
cmd
.
NewDockerCRICommand
(
ctx
.
Done
())
command
.
SetArgs
(
args
)
logrus
.
Infof
(
"Running cri-dockerd %s"
,
config
.
ArgString
(
args
))
logrus
.
Infof
(
"cri-dockerd version %s"
,
version
.
FullVersion
())
go
func
()
{
defer
func
()
{
...
...
scripts/build
View file @
be26a6e6
...
...
@@ -15,6 +15,7 @@ PKG_K8S_BASE="k8s.io/component-base"
PKG_K8S_CLIENT
=
"k8s.io/client-go/pkg"
PKG_CNI_PLUGINS
=
"github.com/containernetworking/plugins"
PKG_KUBE_ROUTER
=
"github.com/cloudnativelabs/kube-router"
PKG_CRI_DOCKERD
=
"github.com/Mirantis/cri-dockerd"
buildDate
=
$(
date
-u
'+%Y-%m-%dT%H:%M:%SZ'
)
...
...
@@ -40,11 +41,15 @@ VERSIONFLAGS="
-X
${
PKG_CNI_PLUGINS
}
/pkg/utils/buildversion.BuildVersion=
${
VERSION_CNIPLUGINS
}
-X
${
PKG_CNI_PLUGINS
}
/plugins/meta/flannel.Program=flannel
-X
${
PKG_CNI_PLUGINS
}
/plugins/meta/flannel.Version=
${
VERSION_FLANNEL
}
-X
${
PKG_CNI_PLUGINS
}
/plugins/meta/flannel.Commit=
${
COMMIT
}
-X
${
PKG_CNI_PLUGINS
}
/plugins/meta/flannel.Commit=
HEAD
-X
${
PKG_CNI_PLUGINS
}
/plugins/meta/flannel.buildDate=
${
buildDate
}
-X
${
PKG_KUBE_ROUTER
}
/pkg/version.Version=
${
VERSION_KUBE_ROUTER
}
-X
${
PKG_KUBE_ROUTER
}
/pkg/version.BuildDate=
${
buildDate
}
-X
${
PKG_CRI_DOCKERD
}
/cmd/version.Version=
${
VERSION_CRI_DOCKERD
}
-X
${
PKG_CRI_DOCKERD
}
/cmd/version.GitCommit=HEAD
-X
${
PKG_CRI_DOCKERD
}
/cmd/version.BuildTime=
${
buildDate
}
"
if
[
-n
"
${
DEBUG
}
"
]
;
then
...
...
scripts/version.sh
View file @
be26a6e6
...
...
@@ -46,6 +46,11 @@ if [ -z "$VERSION_FLANNEL" ]; then
VERSION_FLANNEL
=
"v0.0.0"
fi
VERSION_CRI_DOCKERD
=
$(
grep
github.com/Mirantis/cri-dockerd go.mod |
head
-n1
|
awk
'{print $4}'
)
if
[
-z
"
$VERSION_CRI_DOCKERD
"
]
;
then
VERSION_CRI_DOCKERD
=
"v0.0.0"
fi
VERSION_CNIPLUGINS
=
"v1.1.1-k3s1"
VERSION_KUBE_ROUTER
=
$(
grep
github.com/k3s-io/kube-router go.mod |
head
-n1
|
awk
'{print $4}'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment