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
b7d217db
Unverified
Commit
b7d217db
authored
Nov 04, 2022
by
thomasferrandiz
Committed by
GitHub
Nov 04, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6405 from thomasferrandiz/log-kube-router-version
log kube-router version when starting netpol controller
parents
8aff25e1
68ac9544
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
netpol.go
pkg/agent/netpol/netpol.go
+4
-1
build
scripts/build
+4
-0
version.sh
scripts/version.sh
+5
-0
No files found.
pkg/agent/netpol/netpol.go
View file @
b7d217db
...
@@ -8,9 +8,12 @@ package netpol
...
@@ -8,9 +8,12 @@ package netpol
import
(
import
(
"context"
"context"
"runtime"
"strings"
"strings"
"sync"
"sync"
"github.com/cloudnativelabs/kube-router/pkg/version"
"github.com/cloudnativelabs/kube-router/pkg/controllers/netpol"
"github.com/cloudnativelabs/kube-router/pkg/controllers/netpol"
"github.com/cloudnativelabs/kube-router/pkg/healthcheck"
"github.com/cloudnativelabs/kube-router/pkg/healthcheck"
"github.com/cloudnativelabs/kube-router/pkg/options"
"github.com/cloudnativelabs/kube-router/pkg/options"
...
@@ -131,7 +134,7 @@ func Run(ctx context.Context, nodeConfig *config.Node) error {
...
@@ -131,7 +134,7 @@ func Run(ctx context.Context, nodeConfig *config.Node) error {
npInformer
.
AddEventHandler
(
npc
.
NetworkPolicyEventHandler
)
npInformer
.
AddEventHandler
(
npc
.
NetworkPolicyEventHandler
)
wg
.
Add
(
1
)
wg
.
Add
(
1
)
logrus
.
Info
(
"Starting the netpol controller"
)
logrus
.
Info
f
(
"Starting the netpol controller version %s, built on %s, %s"
,
version
.
Version
,
version
.
BuildDate
,
runtime
.
Version
()
)
go
npc
.
Run
(
healthCh
,
stopCh
,
&
wg
)
go
npc
.
Run
(
healthCh
,
stopCh
,
&
wg
)
return
nil
return
nil
...
...
scripts/build
View file @
b7d217db
...
@@ -14,6 +14,7 @@ PKG_CRICTL="github.com/kubernetes-sigs/cri-tools/pkg"
...
@@ -14,6 +14,7 @@ PKG_CRICTL="github.com/kubernetes-sigs/cri-tools/pkg"
PKG_K8S_BASE
=
"k8s.io/component-base"
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"
buildDate
=
$(
date
-u
'+%Y-%m-%dT%H:%M:%SZ'
)
buildDate
=
$(
date
-u
'+%Y-%m-%dT%H:%M:%SZ'
)
...
@@ -41,6 +42,9 @@ VERSIONFLAGS="
...
@@ -41,6 +42,9 @@ VERSIONFLAGS="
-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=
${
COMMIT
}
-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.BuildDate=
${
buildDate
}
"
"
if
[
-n
"
${
DEBUG
}
"
]
;
then
if
[
-n
"
${
DEBUG
}
"
]
;
then
...
...
scripts/version.sh
View file @
b7d217db
...
@@ -48,6 +48,11 @@ fi
...
@@ -48,6 +48,11 @@ 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}'
)
if
[
-z
"
$VERSION_KUBE_ROUTER
"
]
;
then
VERSION_KUBE_ROUTER
=
"v0.0.0"
fi
VERSION_ROOT
=
"v0.11.0"
VERSION_ROOT
=
"v0.11.0"
if
[[
-n
"
$GIT_TAG
"
]]
;
then
if
[[
-n
"
$GIT_TAG
"
]]
;
then
...
...
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