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
87395e32
Commit
87395e32
authored
Dec 01, 2021
by
Brad Davidson
Committed by
Brad Davidson
Dec 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update modules for Kubernetes v1.23
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
6656d484
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
51 additions
and
11 deletions
+51
-11
go.mod
go.mod
+0
-0
go.sum
go.sum
+0
-0
setup.go
pkg/agent/syssetup/setup.go
+1
-1
zz_generated_deepcopy.go
pkg/apis/k3s.cattle.io/v1/zz_generated_deepcopy.go
+1
-0
agent_linux.go
pkg/daemons/agent/agent_linux.go
+0
-1
zz_generated_bindata.go
pkg/deploy/zz_generated_bindata.go
+1
-0
clientset.go
pkg/generated/clientset/versioned/clientset.go
+27
-7
fake_addon.go
...ntset/versioned/typed/k3s.cattle.io/v1/fake/fake_addon.go
+1
-1
k3s.cattle.io_client.go
.../versioned/typed/k3s.cattle.io/v1/k3s.cattle.io_client.go
+19
-1
zz_generated_bindata.go
pkg/static/zz_generated_bindata.go
+1
-0
No files found.
go.mod
View file @
87395e32
This diff is collapsed.
Click to expand it.
go.sum
View file @
87395e32
This diff is collapsed.
Click to expand it.
pkg/agent/syssetup/setup.go
View file @
87395e32
...
@@ -11,8 +11,8 @@ import (
...
@@ -11,8 +11,8 @@ import (
"github.com/google/cadvisor/machine"
"github.com/google/cadvisor/machine"
"github.com/google/cadvisor/utils/sysfs"
"github.com/google/cadvisor/utils/sysfs"
"github.com/sirupsen/logrus"
"github.com/sirupsen/logrus"
"k8s.io/component-helpers/node/util/sysctl"
kubeproxyconfig
"k8s.io/kubernetes/pkg/proxy/apis/config"
kubeproxyconfig
"k8s.io/kubernetes/pkg/proxy/apis/config"
"k8s.io/kubernetes/pkg/util/sysctl"
)
)
func
loadKernelModule
(
moduleName
string
)
{
func
loadKernelModule
(
moduleName
string
)
{
...
...
pkg/apis/k3s.cattle.io/v1/zz_generated_deepcopy.go
View file @
87395e32
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
// +build !ignore_autogenerated
/*
/*
...
...
pkg/daemons/agent/agent_linux.go
View file @
87395e32
...
@@ -78,7 +78,6 @@ func kubeletArgs(cfg *config.Agent) map[string]string {
...
@@ -78,7 +78,6 @@ func kubeletArgs(cfg *config.Agent) map[string]string {
if
cfg
.
RootDir
!=
""
{
if
cfg
.
RootDir
!=
""
{
argsMap
[
"root-dir"
]
=
cfg
.
RootDir
argsMap
[
"root-dir"
]
=
cfg
.
RootDir
argsMap
[
"cert-dir"
]
=
filepath
.
Join
(
cfg
.
RootDir
,
"pki"
)
argsMap
[
"cert-dir"
]
=
filepath
.
Join
(
cfg
.
RootDir
,
"pki"
)
argsMap
[
"seccomp-profile-root"
]
=
filepath
.
Join
(
cfg
.
RootDir
,
"seccomp"
)
}
}
if
cfg
.
CNIConfDir
!=
""
{
if
cfg
.
CNIConfDir
!=
""
{
argsMap
[
"cni-conf-dir"
]
=
cfg
.
CNIConfDir
argsMap
[
"cni-conf-dir"
]
=
cfg
.
CNIConfDir
...
...
pkg/deploy/zz_generated_bindata.go
View file @
87395e32
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
// manifests/metrics-server/resource-reader.yaml
// manifests/metrics-server/resource-reader.yaml
// manifests/rolebindings.yaml
// manifests/rolebindings.yaml
// manifests/traefik.yaml
// manifests/traefik.yaml
//go:build !no_stage
// +build !no_stage
// +build !no_stage
package
deploy
package
deploy
...
...
pkg/generated/clientset/versioned/clientset.go
View file @
87395e32
...
@@ -20,6 +20,7 @@ package versioned
...
@@ -20,6 +20,7 @@ package versioned
import
(
import
(
"fmt"
"fmt"
"net/http"
k3sv1
"github.com/rancher/k3s/pkg/generated/clientset/versioned/typed/k3s.cattle.io/v1"
k3sv1
"github.com/rancher/k3s/pkg/generated/clientset/versioned/typed/k3s.cattle.io/v1"
discovery
"k8s.io/client-go/discovery"
discovery
"k8s.io/client-go/discovery"
...
@@ -55,22 +56,41 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface {
...
@@ -55,22 +56,41 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface {
// NewForConfig creates a new Clientset for the given config.
// NewForConfig creates a new Clientset for the given config.
// If config's RateLimiter is not set and QPS and Burst are acceptable,
// If config's RateLimiter is not set and QPS and Burst are acceptable,
// NewForConfig will generate a rate-limiter in configShallowCopy.
// NewForConfig will generate a rate-limiter in configShallowCopy.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).
func
NewForConfig
(
c
*
rest
.
Config
)
(
*
Clientset
,
error
)
{
func
NewForConfig
(
c
*
rest
.
Config
)
(
*
Clientset
,
error
)
{
configShallowCopy
:=
*
c
configShallowCopy
:=
*
c
// share the transport between all clients
httpClient
,
err
:=
rest
.
HTTPClientFor
(
&
configShallowCopy
)
if
err
!=
nil
{
return
nil
,
err
}
return
NewForConfigAndClient
(
&
configShallowCopy
,
httpClient
)
}
// NewForConfigAndClient creates a new Clientset for the given config and http client.
// Note the http client provided takes precedence over the configured transport values.
// If config's RateLimiter is not set and QPS and Burst are acceptable,
// NewForConfigAndClient will generate a rate-limiter in configShallowCopy.
func
NewForConfigAndClient
(
c
*
rest
.
Config
,
httpClient
*
http
.
Client
)
(
*
Clientset
,
error
)
{
configShallowCopy
:=
*
c
if
configShallowCopy
.
RateLimiter
==
nil
&&
configShallowCopy
.
QPS
>
0
{
if
configShallowCopy
.
RateLimiter
==
nil
&&
configShallowCopy
.
QPS
>
0
{
if
configShallowCopy
.
Burst
<=
0
{
if
configShallowCopy
.
Burst
<=
0
{
return
nil
,
fmt
.
Errorf
(
"burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0"
)
return
nil
,
fmt
.
Errorf
(
"burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0"
)
}
}
configShallowCopy
.
RateLimiter
=
flowcontrol
.
NewTokenBucketRateLimiter
(
configShallowCopy
.
QPS
,
configShallowCopy
.
Burst
)
configShallowCopy
.
RateLimiter
=
flowcontrol
.
NewTokenBucketRateLimiter
(
configShallowCopy
.
QPS
,
configShallowCopy
.
Burst
)
}
}
var
cs
Clientset
var
cs
Clientset
var
err
error
var
err
error
cs
.
k3sV1
,
err
=
k3sv1
.
NewForConfig
(
&
configShallowCopy
)
cs
.
k3sV1
,
err
=
k3sv1
.
NewForConfig
AndClient
(
&
configShallowCopy
,
httpClient
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
cs
.
DiscoveryClient
,
err
=
discovery
.
NewDiscoveryClientForConfig
(
&
configShallowCopy
)
cs
.
DiscoveryClient
,
err
=
discovery
.
NewDiscoveryClientForConfig
AndClient
(
&
configShallowCopy
,
httpClient
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
@@ -80,11 +100,11 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
...
@@ -80,11 +100,11 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
// NewForConfigOrDie creates a new Clientset for the given config and
// NewForConfigOrDie creates a new Clientset for the given config and
// panics if there is an error in the config.
// panics if there is an error in the config.
func
NewForConfigOrDie
(
c
*
rest
.
Config
)
*
Clientset
{
func
NewForConfigOrDie
(
c
*
rest
.
Config
)
*
Clientset
{
var
cs
Clientset
cs
,
err
:=
NewForConfig
(
c
)
cs
.
k3sV1
=
k3sv1
.
NewForConfigOrDie
(
c
)
if
err
!=
nil
{
panic
(
err
)
cs
.
DiscoveryClient
=
discovery
.
NewDiscoveryClientForConfigOrDie
(
c
)
}
return
&
cs
return
cs
}
}
// New creates a new Clientset for the given RESTClient.
// New creates a new Clientset for the given RESTClient.
...
...
pkg/generated/clientset/versioned/typed/k3s.cattle.io/v1/fake/fake_addon.go
View file @
87395e32
...
@@ -117,7 +117,7 @@ func (c *FakeAddons) UpdateStatus(ctx context.Context, addon *k3scattleiov1.Addo
...
@@ -117,7 +117,7 @@ func (c *FakeAddons) UpdateStatus(ctx context.Context, addon *k3scattleiov1.Addo
// Delete takes name of the addon and deletes it. Returns an error if one occurs.
// Delete takes name of the addon and deletes it. Returns an error if one occurs.
func
(
c
*
FakeAddons
)
Delete
(
ctx
context
.
Context
,
name
string
,
opts
v1
.
DeleteOptions
)
error
{
func
(
c
*
FakeAddons
)
Delete
(
ctx
context
.
Context
,
name
string
,
opts
v1
.
DeleteOptions
)
error
{
_
,
err
:=
c
.
Fake
.
_
,
err
:=
c
.
Fake
.
Invokes
(
testing
.
NewDeleteAction
(
addonsResource
,
c
.
ns
,
name
),
&
k3scattleiov1
.
Addon
{})
Invokes
(
testing
.
NewDeleteAction
WithOptions
(
addonsResource
,
c
.
ns
,
name
,
opts
),
&
k3scattleiov1
.
Addon
{})
return
err
return
err
}
}
...
...
pkg/generated/clientset/versioned/typed/k3s.cattle.io/v1/k3s.cattle.io_client.go
View file @
87395e32
...
@@ -19,6 +19,8 @@ limitations under the License.
...
@@ -19,6 +19,8 @@ limitations under the License.
package
v1
package
v1
import
(
import
(
"net/http"
v1
"github.com/rancher/k3s/pkg/apis/k3s.cattle.io/v1"
v1
"github.com/rancher/k3s/pkg/apis/k3s.cattle.io/v1"
"github.com/rancher/k3s/pkg/generated/clientset/versioned/scheme"
"github.com/rancher/k3s/pkg/generated/clientset/versioned/scheme"
rest
"k8s.io/client-go/rest"
rest
"k8s.io/client-go/rest"
...
@@ -39,12 +41,28 @@ func (c *K3sV1Client) Addons(namespace string) AddonInterface {
...
@@ -39,12 +41,28 @@ func (c *K3sV1Client) Addons(namespace string) AddonInterface {
}
}
// NewForConfig creates a new K3sV1Client for the given config.
// NewForConfig creates a new K3sV1Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).
func
NewForConfig
(
c
*
rest
.
Config
)
(
*
K3sV1Client
,
error
)
{
func
NewForConfig
(
c
*
rest
.
Config
)
(
*
K3sV1Client
,
error
)
{
config
:=
*
c
config
:=
*
c
if
err
:=
setConfigDefaults
(
&
config
);
err
!=
nil
{
if
err
:=
setConfigDefaults
(
&
config
);
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
client
,
err
:=
rest
.
RESTClientFor
(
&
config
)
httpClient
,
err
:=
rest
.
HTTPClientFor
(
&
config
)
if
err
!=
nil
{
return
nil
,
err
}
return
NewForConfigAndClient
(
&
config
,
httpClient
)
}
// NewForConfigAndClient creates a new K3sV1Client for the given config and http client.
// Note the http client provided takes precedence over the configured transport values.
func
NewForConfigAndClient
(
c
*
rest
.
Config
,
h
*
http
.
Client
)
(
*
K3sV1Client
,
error
)
{
config
:=
*
c
if
err
:=
setConfigDefaults
(
&
config
);
err
!=
nil
{
return
nil
,
err
}
client
,
err
:=
rest
.
RESTClientForConfigAndClient
(
&
config
,
h
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
pkg/static/zz_generated_bindata.go
View file @
87395e32
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
// sources:
// sources:
// build/static/charts/traefik-10.3.001.tgz
// build/static/charts/traefik-10.3.001.tgz
// build/static/charts/traefik-crd-10.3.001.tgz
// build/static/charts/traefik-crd-10.3.001.tgz
//go:build !no_stage
// +build !no_stage
// +build !no_stage
package
static
package
static
...
...
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