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
3cb6fa5c
Commit
3cb6fa5c
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
f72649d1
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 @
3cb6fa5c
...
@@ -4,7 +4,7 @@ go 1.19
...
@@ -4,7 +4,7 @@ go 1.19
replace (
replace (
github.com/Microsoft/hcsshim => github.com/Microsoft/hcsshim v0.8.22
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.20230121003321-6e0d61b90abb
// k3s/release-1.26
github.com/Mirantis/cri-dockerd => github.com/k3s-io/cri-dockerd v0.3.
2-0.20230123224936-bcd78c2d21d8
// k3s/release-1.26
github.com/cloudnativelabs/kube-router => github.com/k3s-io/kube-router v1.5.2-0.20221026101626-e01045262706
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/cgroups => github.com/containerd/cgroups v1.0.1
github.com/containerd/containerd => github.com/k3s-io/containerd v1.5.16-k3s1
github.com/containerd/containerd => github.com/k3s-io/containerd v1.5.16-k3s1
...
...
go.sum
View file @
3cb6fa5c
...
@@ -598,8 +598,8 @@ github.com/k3s-io/cadvisor v0.46.0-k3s1 h1:gaxTdqiMHl3nbvlF4Jq2D3J+vTiLwhI8rYBAq
...
@@ -598,8 +598,8 @@ github.com/k3s-io/cadvisor v0.46.0-k3s1 h1:gaxTdqiMHl3nbvlF4Jq2D3J+vTiLwhI8rYBAq
github.com/k3s-io/cadvisor v0.46.0-k3s1/go.mod h1:n0SMyEENgkEGCmhaMRife+OArnPEHEK2z8NQf5n+Szw=
github.com/k3s-io/cadvisor v0.46.0-k3s1/go.mod h1:n0SMyEENgkEGCmhaMRife+OArnPEHEK2z8NQf5n+Szw=
github.com/k3s-io/containerd v1.5.16-k3s1 h1:r8WBp1DJS5OfGWV4XMohQ3SkQnreZRK1E4lT02xUXiA=
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/containerd v1.5.16-k3s1/go.mod h1:vCILl/gWFsZXZVuIrDefia9pbKe7cpWbpavHNET9axM=
github.com/k3s-io/cri-dockerd v0.3.
1-0.20230121003321-6e0d61b90abb h1:Y6cQWNtUjmfRG+7htOnBfFptfiHLIFPWID6Raztk1fs
=
github.com/k3s-io/cri-dockerd v0.3.
2-0.20230123224936-bcd78c2d21d8 h1:FY36hRMFOGjLgd+pR7j2IehUDksjQdGy+6pvEhYbPCw
=
github.com/k3s-io/cri-dockerd v0.3.
1-0.20230121003321-6e0d61b90abb
/go.mod h1:AKPfBiTA3gcGRikXXmPlzX8nNoePITaiRQrRnE4Kc60=
github.com/k3s-io/cri-dockerd v0.3.
2-0.20230123224936-bcd78c2d21d8
/go.mod h1:AKPfBiTA3gcGRikXXmPlzX8nNoePITaiRQrRnE4Kc60=
github.com/k3s-io/cri-tools v1.26.0-rc.0-k3s1 h1:yWVy9pS0T1BWBMZBPRy2Q29gaLmaGknQHSnx+HStrVM=
github.com/k3s-io/cri-tools v1.26.0-rc.0-k3s1 h1:yWVy9pS0T1BWBMZBPRy2Q29gaLmaGknQHSnx+HStrVM=
github.com/k3s-io/cri-tools v1.26.0-rc.0-k3s1/go.mod h1:tARBj7XZ6i52ChmdHcHgcN0viYrfkANLHZWIEIsGcbs=
github.com/k3s-io/cri-tools v1.26.0-rc.0-k3s1/go.mod h1:tARBj7XZ6i52ChmdHcHgcN0viYrfkANLHZWIEIsGcbs=
github.com/k3s-io/etcd/api/v3 v3.5.5-k3s1 h1:FnbCDHFALWvm7eZWptonEIdpl/qy6nrye7bEzC9uURk=
github.com/k3s-io/etcd/api/v3 v3.5.5-k3s1 h1:FnbCDHFALWvm7eZWptonEIdpl/qy6nrye7bEzC9uURk=
...
...
pkg/agent/cridockerd/cridockerd.go
View file @
3cb6fa5c
...
@@ -10,6 +10,7 @@ import (
...
@@ -10,6 +10,7 @@ import (
"strings"
"strings"
"github.com/Mirantis/cri-dockerd/cmd"
"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/cgroups"
"github.com/k3s-io/k3s/pkg/daemons/config"
"github.com/k3s-io/k3s/pkg/daemons/config"
"github.com/sirupsen/logrus"
"github.com/sirupsen/logrus"
...
@@ -25,6 +26,7 @@ func Run(ctx context.Context, cfg *config.Node) error {
...
@@ -25,6 +26,7 @@ func Run(ctx context.Context, cfg *config.Node) error {
command
:=
cmd
.
NewDockerCRICommand
(
ctx
.
Done
())
command
:=
cmd
.
NewDockerCRICommand
(
ctx
.
Done
())
command
.
SetArgs
(
args
)
command
.
SetArgs
(
args
)
logrus
.
Infof
(
"Running cri-dockerd %s"
,
config
.
ArgString
(
args
))
logrus
.
Infof
(
"Running cri-dockerd %s"
,
config
.
ArgString
(
args
))
logrus
.
Infof
(
"cri-dockerd version %s"
,
version
.
FullVersion
())
go
func
()
{
go
func
()
{
defer
func
()
{
defer
func
()
{
...
...
scripts/build
View file @
3cb6fa5c
...
@@ -15,6 +15,7 @@ PKG_K8S_BASE="k8s.io/component-base"
...
@@ -15,6 +15,7 @@ PKG_K8S_BASE="k8s.io/component-base"
PKG_K8S_CLIENT
=
"k8s.io/client-go/pkg"
PKG_K8S_CLIENT
=
"k8s.io/client-go/pkg"
PKG_CNI_PLUGINS
=
"github.com/containernetworking/plugins"
PKG_CNI_PLUGINS
=
"github.com/containernetworking/plugins"
PKG_KUBE_ROUTER
=
"github.com/cloudnativelabs/kube-router"
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'
)
buildDate
=
$(
date
-u
'+%Y-%m-%dT%H:%M:%SZ'
)
...
@@ -40,11 +41,15 @@ VERSIONFLAGS="
...
@@ -40,11 +41,15 @@ VERSIONFLAGS="
-X
${
PKG_CNI_PLUGINS
}
/pkg/utils/buildversion.BuildVersion=
${
VERSION_CNIPLUGINS
}
-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.Program=flannel
-X
${
PKG_CNI_PLUGINS
}
/plugins/meta/flannel.Version=
${
VERSION_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_CNI_PLUGINS
}
/plugins/meta/flannel.buildDate=
${
buildDate
}
-X
${
PKG_KUBE_ROUTER
}
/pkg/version.Version=
${
VERSION_KUBE_ROUTER
}
-X
${
PKG_KUBE_ROUTER
}
/pkg/version.Version=
${
VERSION_KUBE_ROUTER
}
-X
${
PKG_KUBE_ROUTER
}
/pkg/version.BuildDate=
${
buildDate
}
-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
if
[
-n
"
${
DEBUG
}
"
]
;
then
...
...
scripts/version.sh
View file @
3cb6fa5c
...
@@ -47,6 +47,11 @@ if [ -z "$VERSION_FLANNEL" ]; then
...
@@ -47,6 +47,11 @@ if [ -z "$VERSION_FLANNEL" ]; then
VERSION_FLANNEL
=
"v0.0.0"
VERSION_FLANNEL
=
"v0.0.0"
fi
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_CNIPLUGINS
=
"v1.1.1-k3s1"
VERSION_KUBE_ROUTER
=
$(
grep
github.com/k3s-io/kube-router go.mod |
head
-n1
|
awk
'{print $4}'
)
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