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
517f30a1
Commit
517f30a1
authored
Feb 23, 2015
by
Brian Grant
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4456 from tkulczynski/noderegistration
Add node's IP range cidr to NodeSpec
parents
e1865822
09c955f9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
1 deletion
+14
-1
types.go
pkg/api/types.go
+4
-1
conversion.go
pkg/api/v1beta1/conversion.go
+2
-0
types.go
pkg/api/v1beta1/types.go
+2
-0
conversion.go
pkg/api/v1beta2/conversion.go
+2
-0
types.go
pkg/api/v1beta2/types.go
+2
-0
types.go
pkg/api/v1beta3/types.go
+2
-0
No files found.
pkg/api/types.go
View file @
517f30a1
...
...
@@ -778,6 +778,9 @@ type EndpointsList struct {
type
NodeSpec
struct
{
// Capacity represents the available resources of a node
Capacity
ResourceList
`json:"capacity,omitempty"`
// PodCIDR represents the pod IP range assigned to the node
// Note: assigning IP ranges to nodes might need to be revisited when we support migratable IPs.
PodCIDR
string
`json:"cidr,omitempty"`
}
// NodeStatus is information about the current status of a node.
...
...
@@ -844,7 +847,7 @@ const (
// ResourceList is a set of (resource name, quantity) pairs.
type
ResourceList
map
[
ResourceName
]
resource
.
Quantity
// Node is a worker node in Kubernete
ne
s
// Node is a worker node in Kubernetes
// The name of the node according to etcd is in ObjectMeta.Name.
type
Node
struct
{
TypeMeta
`json:",inline"`
...
...
pkg/api/v1beta1/conversion.go
View file @
517f30a1
...
...
@@ -698,6 +698,7 @@ func init() {
}
out
.
HostIP
=
in
.
Status
.
HostIP
out
.
PodCIDR
=
in
.
Spec
.
PodCIDR
return
s
.
Convert
(
&
in
.
Spec
.
Capacity
,
&
out
.
NodeResources
.
Capacity
,
0
)
},
func
(
in
*
Minion
,
out
*
newer
.
Node
,
s
conversion
.
Scope
)
error
{
...
...
@@ -718,6 +719,7 @@ func init() {
}
out
.
Status
.
HostIP
=
in
.
HostIP
out
.
Spec
.
PodCIDR
=
in
.
PodCIDR
return
s
.
Convert
(
&
in
.
NodeResources
.
Capacity
,
&
out
.
Spec
.
Capacity
,
0
)
},
func
(
in
*
newer
.
LimitRange
,
out
*
LimitRange
,
s
conversion
.
Scope
)
error
{
...
...
pkg/api/v1beta1/types.go
View file @
517f30a1
...
...
@@ -684,6 +684,8 @@ type Minion struct {
HostIP
string
`json:"hostIP,omitempty" description:"IP address of the node"`
// Resources available on the node
NodeResources
NodeResources
`json:"resources,omitempty" description:"characterization of node resources"`
// Pod IP range assigned to the node
PodCIDR
string
`json:"cidr,omitempty" description:"IP range assigned to the node"`
// Status describes the current status of a node
Status
NodeStatus
`json:"status,omitempty" description:"current status of node"`
// Labels for the node
...
...
pkg/api/v1beta2/conversion.go
View file @
517f30a1
...
...
@@ -618,6 +618,7 @@ func init() {
}
out
.
HostIP
=
in
.
Status
.
HostIP
out
.
PodCIDR
=
in
.
Spec
.
PodCIDR
return
s
.
Convert
(
&
in
.
Spec
.
Capacity
,
&
out
.
NodeResources
.
Capacity
,
0
)
},
func
(
in
*
Minion
,
out
*
newer
.
Node
,
s
conversion
.
Scope
)
error
{
...
...
@@ -638,6 +639,7 @@ func init() {
}
out
.
Status
.
HostIP
=
in
.
HostIP
out
.
Spec
.
PodCIDR
=
in
.
PodCIDR
return
s
.
Convert
(
&
in
.
NodeResources
.
Capacity
,
&
out
.
Spec
.
Capacity
,
0
)
},
func
(
in
*
newer
.
LimitRange
,
out
*
LimitRange
,
s
conversion
.
Scope
)
error
{
...
...
pkg/api/v1beta2/types.go
View file @
517f30a1
...
...
@@ -646,6 +646,8 @@ type Minion struct {
TypeMeta
`json:",inline"`
// Queried from cloud provider, if available.
HostIP
string
`json:"hostIP,omitempty" description:"IP address of the node"`
// Pod IP range assigned to the node
PodCIDR
string
`json:"cidr,omitempty" description:"IP range assigned to the node"`
// Resources available on the node
NodeResources
NodeResources
`json:"resources,omitempty" description:"characterization of node resources"`
// Status describes the current status of a node
...
...
pkg/api/v1beta3/types.go
View file @
517f30a1
...
...
@@ -812,6 +812,8 @@ type NodeSpec struct {
// Capacity represents the available resources of a node
// see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/resources.md for more details.
Capacity
ResourceList
`json:"capacity,omitempty"`
// PodCIDR represents the pod IP range assigned to the node
PodCIDR
string
`json:"cidr,omitempty"`
}
// NodeStatus is information about the current status of a node.
...
...
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