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
bca36910
Commit
bca36910
authored
Mar 17, 2017
by
Janet Kuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use json field names instead of go field names
parent
4cebc865
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
42 deletions
+38
-42
types.go
pkg/apis/extensions/types.go
+19
-21
types.go
pkg/apis/extensions/v1beta1/types.go
+19
-21
No files found.
pkg/apis/extensions/types.go
View file @
bca36910
...
@@ -376,8 +376,7 @@ type DaemonSetUpdateStrategy struct {
...
@@ -376,8 +376,7 @@ type DaemonSetUpdateStrategy struct {
// +optional
// +optional
Type
DaemonSetUpdateStrategyType
Type
DaemonSetUpdateStrategyType
// Rolling update config params. Present only if DaemonSetUpdateStrategy =
// Rolling update config params. Present only if type = "RollingUpdate".
// RollingUpdate.
//---
//---
// TODO: Update this to follow our convention for oneOf, whatever we decide it
// TODO: Update this to follow our convention for oneOf, whatever we decide it
// to be. Same as DeploymentStrategy.RollingUpdate.
// to be. Same as DeploymentStrategy.RollingUpdate.
...
@@ -405,8 +404,8 @@ type RollingUpdateDaemonSet struct {
...
@@ -405,8 +404,8 @@ type RollingUpdateDaemonSet struct {
// This cannot be 0.
// This cannot be 0.
// Default value is 1.
// Default value is 1.
// Example: when this is set to 30%, at most 30% of the total number of nodes
// Example: when this is set to 30%, at most 30% of the total number of nodes
// that should be running the daemon pod (i.e.
DesiredNumberScheduled in
// that should be running the daemon pod (i.e.
status.desiredNumberScheduled)
//
DaemonSetStatus)
can have their pods stopped for an update at any given
// can have their pods stopped for an update at any given
// time. The update starts by stopping at most 30% of those DaemonSet pods
// time. The update starts by stopping at most 30% of those DaemonSet pods
// and then brings up new DaemonSet pods in their place. Once the new pods
// and then brings up new DaemonSet pods in their place. Once the new pods
// are available, it then proceeds onto other DaemonSet pods, thus ensuring
// are available, it then proceeds onto other DaemonSet pods, thus ensuring
...
@@ -418,21 +417,21 @@ type RollingUpdateDaemonSet struct {
...
@@ -418,21 +417,21 @@ type RollingUpdateDaemonSet struct {
// DaemonSetSpec is the specification of a daemon set.
// DaemonSetSpec is the specification of a daemon set.
type
DaemonSetSpec
struct
{
type
DaemonSetSpec
struct
{
//
Selector is a
label query over pods that are managed by the daemon set.
//
A
label query over pods that are managed by the daemon set.
// Must match in order to be controlled.
// Must match in order to be controlled.
// If empty, defaulted to labels on Pod template.
// If empty, defaulted to labels on Pod template.
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
// +optional
// +optional
Selector
*
metav1
.
LabelSelector
Selector
*
metav1
.
LabelSelector
//
Template is the
object that describes the pod that will be created.
//
An
object that describes the pod that will be created.
// The DaemonSet will create exactly one copy of this pod on every node
// The DaemonSet will create exactly one copy of this pod on every node
// that matches the template's node selector (or on every node if no node
// that matches the template's node selector (or on every node if no node
// selector is specified).
// selector is specified).
// More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template
// More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template
Template
api
.
PodTemplateSpec
Template
api
.
PodTemplateSpec
//
UpdateS
trategy to replace existing DaemonSet pods with new pods.
//
An update s
trategy to replace existing DaemonSet pods with new pods.
// +optional
// +optional
UpdateStrategy
DaemonSetUpdateStrategy
UpdateStrategy
DaemonSetUpdateStrategy
...
@@ -451,40 +450,39 @@ type DaemonSetSpec struct {
...
@@ -451,40 +450,39 @@ type DaemonSetSpec struct {
// DaemonSetStatus represents the current status of a daemon set.
// DaemonSetStatus represents the current status of a daemon set.
type
DaemonSetStatus
struct
{
type
DaemonSetStatus
struct
{
//
CurrentNumberScheduled is t
he number of nodes that are running at least 1
//
T
he number of nodes that are running at least 1
// daemon pod and are supposed to run the daemon pod.
// daemon pod and are supposed to run the daemon pod.
CurrentNumberScheduled
int32
CurrentNumberScheduled
int32
//
NumberMisscheduled is t
he number of nodes that are running the daemon pod, but are
//
T
he number of nodes that are running the daemon pod, but are
// not supposed to run the daemon pod.
// not supposed to run the daemon pod.
NumberMisscheduled
int32
NumberMisscheduled
int32
//
DesiredNumberScheduled is t
he total number of nodes that should be running the daemon
//
T
he total number of nodes that should be running the daemon
// pod (including nodes correctly running the daemon pod).
// pod (including nodes correctly running the daemon pod).
DesiredNumberScheduled
int32
DesiredNumberScheduled
int32
//
NumberReady is t
he number of nodes that should be running the daemon pod and have one
//
T
he number of nodes that should be running the daemon pod and have one
// or more of the daemon pod running and ready.
// or more of the daemon pod running and ready.
NumberReady
int32
NumberReady
int32
//
ObservedGeneration is t
he most recent generation observed by the daemon set controller.
//
T
he most recent generation observed by the daemon set controller.
// +optional
// +optional
ObservedGeneration
int64
ObservedGeneration
int64
// UpdatedNumberScheduled is the total number of nodes that are running updated
// The total number of nodes that are running updated daemon pod
// daemon pod
// +optional
// +optional
UpdatedNumberScheduled
int32
UpdatedNumberScheduled
int32
//
NumberAvailable is t
he number of nodes that should be running the
//
T
he number of nodes that should be running the
// daemon pod and have one or more of the daemon pod running and
// daemon pod and have one or more of the daemon pod running and
// available (ready for at least minReadySeconds)
// available (ready for at least
spec.
minReadySeconds)
// +optional
// +optional
NumberAvailable
int32
NumberAvailable
int32
//
NumberUnavailable is t
he number of nodes that should be running the
//
T
he number of nodes that should be running the
// daemon pod and have none of the daemon pod running and available
// daemon pod and have none of the daemon pod running and available
// (ready for at least minReadySeconds)
// (ready for at least
spec.
minReadySeconds)
// +optional
// +optional
NumberUnavailable
int32
NumberUnavailable
int32
}
}
...
@@ -499,12 +497,12 @@ type DaemonSet struct {
...
@@ -499,12 +497,12 @@ type DaemonSet struct {
// +optional
// +optional
metav1
.
ObjectMeta
metav1
.
ObjectMeta
//
Spec defines t
he desired behavior of this daemon set.
//
T
he desired behavior of this daemon set.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
// +optional
// +optional
Spec
DaemonSetSpec
Spec
DaemonSetSpec
//
Status is t
he current status of this daemon set. This data may be
//
T
he current status of this daemon set. This data may be
// out of date by some window of time.
// out of date by some window of time.
// Populated by the system.
// Populated by the system.
// Read-only.
// Read-only.
...
@@ -528,7 +526,7 @@ type DaemonSetList struct {
...
@@ -528,7 +526,7 @@ type DaemonSetList struct {
// +optional
// +optional
metav1
.
ListMeta
metav1
.
ListMeta
//
Items is a
list of daemon sets.
//
A
list of daemon sets.
Items
[]
DaemonSet
Items
[]
DaemonSet
}
}
...
...
pkg/apis/extensions/v1beta1/types.go
View file @
bca36910
...
@@ -375,8 +375,7 @@ type DaemonSetUpdateStrategy struct {
...
@@ -375,8 +375,7 @@ type DaemonSetUpdateStrategy struct {
// +optional
// +optional
Type
DaemonSetUpdateStrategyType
`json:"type,omitempty" protobuf:"bytes,1,opt,name=type"`
Type
DaemonSetUpdateStrategyType
`json:"type,omitempty" protobuf:"bytes,1,opt,name=type"`
// Rolling update config params. Present only if DaemonSetUpdateStrategy =
// Rolling update config params. Present only if type = "RollingUpdate".
// RollingUpdate.
//---
//---
// TODO: Update this to follow our convention for oneOf, whatever we decide it
// TODO: Update this to follow our convention for oneOf, whatever we decide it
// to be. Same as DeploymentStrategy.RollingUpdate.
// to be. Same as DeploymentStrategy.RollingUpdate.
...
@@ -404,8 +403,8 @@ type RollingUpdateDaemonSet struct {
...
@@ -404,8 +403,8 @@ type RollingUpdateDaemonSet struct {
// This cannot be 0.
// This cannot be 0.
// Default value is 1.
// Default value is 1.
// Example: when this is set to 30%, at most 30% of the total number of nodes
// Example: when this is set to 30%, at most 30% of the total number of nodes
// that should be running the daemon pod (i.e.
DesiredNumberScheduled in
// that should be running the daemon pod (i.e.
status.desiredNumberScheduled)
//
DaemonSetStatus)
can have their pods stopped for an update at any given
// can have their pods stopped for an update at any given
// time. The update starts by stopping at most 30% of those DaemonSet pods
// time. The update starts by stopping at most 30% of those DaemonSet pods
// and then brings up new DaemonSet pods in their place. Once the new pods
// and then brings up new DaemonSet pods in their place. Once the new pods
// are available, it then proceeds onto other DaemonSet pods, thus ensuring
// are available, it then proceeds onto other DaemonSet pods, thus ensuring
...
@@ -417,21 +416,21 @@ type RollingUpdateDaemonSet struct {
...
@@ -417,21 +416,21 @@ type RollingUpdateDaemonSet struct {
// DaemonSetSpec is the specification of a daemon set.
// DaemonSetSpec is the specification of a daemon set.
type
DaemonSetSpec
struct
{
type
DaemonSetSpec
struct
{
//
Selector is a
label query over pods that are managed by the daemon set.
//
A
label query over pods that are managed by the daemon set.
// Must match in order to be controlled.
// Must match in order to be controlled.
// If empty, defaulted to labels on Pod template.
// If empty, defaulted to labels on Pod template.
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
// +optional
// +optional
Selector
*
metav1
.
LabelSelector
`json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
Selector
*
metav1
.
LabelSelector
`json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
//
Template is the
object that describes the pod that will be created.
//
An
object that describes the pod that will be created.
// The DaemonSet will create exactly one copy of this pod on every node
// The DaemonSet will create exactly one copy of this pod on every node
// that matches the template's node selector (or on every node if no node
// that matches the template's node selector (or on every node if no node
// selector is specified).
// selector is specified).
// More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template
// More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template
Template
v1
.
PodTemplateSpec
`json:"template" protobuf:"bytes,2,opt,name=template"`
Template
v1
.
PodTemplateSpec
`json:"template" protobuf:"bytes,2,opt,name=template"`
//
UpdateS
trategy to replace existing DaemonSet pods with new pods.
//
An update s
trategy to replace existing DaemonSet pods with new pods.
// +optional
// +optional
UpdateStrategy
DaemonSetUpdateStrategy
`json:"updateStrategy,omitempty" protobuf:"bytes,3,opt,name=updateStrategy"`
UpdateStrategy
DaemonSetUpdateStrategy
`json:"updateStrategy,omitempty" protobuf:"bytes,3,opt,name=updateStrategy"`
...
@@ -450,43 +449,42 @@ type DaemonSetSpec struct {
...
@@ -450,43 +449,42 @@ type DaemonSetSpec struct {
// DaemonSetStatus represents the current status of a daemon set.
// DaemonSetStatus represents the current status of a daemon set.
type
DaemonSetStatus
struct
{
type
DaemonSetStatus
struct
{
//
CurrentNumberScheduled is t
he number of nodes that are running at least 1
//
T
he number of nodes that are running at least 1
// daemon pod and are supposed to run the daemon pod.
// daemon pod and are supposed to run the daemon pod.
// More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md
// More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md
CurrentNumberScheduled
int32
`json:"currentNumberScheduled" protobuf:"varint,1,opt,name=currentNumberScheduled"`
CurrentNumberScheduled
int32
`json:"currentNumberScheduled" protobuf:"varint,1,opt,name=currentNumberScheduled"`
//
NumberMisscheduled is t
he number of nodes that are running the daemon pod, but are
//
T
he number of nodes that are running the daemon pod, but are
// not supposed to run the daemon pod.
// not supposed to run the daemon pod.
// More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md
// More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md
NumberMisscheduled
int32
`json:"numberMisscheduled" protobuf:"varint,2,opt,name=numberMisscheduled"`
NumberMisscheduled
int32
`json:"numberMisscheduled" protobuf:"varint,2,opt,name=numberMisscheduled"`
//
DesiredNumberScheduled is t
he total number of nodes that should be running the daemon
//
T
he total number of nodes that should be running the daemon
// pod (including nodes correctly running the daemon pod).
// pod (including nodes correctly running the daemon pod).
// More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md
// More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md
DesiredNumberScheduled
int32
`json:"desiredNumberScheduled" protobuf:"varint,3,opt,name=desiredNumberScheduled"`
DesiredNumberScheduled
int32
`json:"desiredNumberScheduled" protobuf:"varint,3,opt,name=desiredNumberScheduled"`
//
NumberReady is t
he number of nodes that should be running the daemon pod and have one
//
T
he number of nodes that should be running the daemon pod and have one
// or more of the daemon pod running and ready.
// or more of the daemon pod running and ready.
NumberReady
int32
`json:"numberReady" protobuf:"varint,4,opt,name=numberReady"`
NumberReady
int32
`json:"numberReady" protobuf:"varint,4,opt,name=numberReady"`
//
ObservedGeneration is t
he most recent generation observed by the daemon set controller.
//
T
he most recent generation observed by the daemon set controller.
// +optional
// +optional
ObservedGeneration
int64
`json:"observedGeneration,omitempty" protobuf:"varint,5,opt,name=observedGeneration"`
ObservedGeneration
int64
`json:"observedGeneration,omitempty" protobuf:"varint,5,opt,name=observedGeneration"`
// UpdatedNumberScheduled is the total number of nodes that are running updated
// The total number of nodes that are running updated daemon pod
// daemon pod
// +optional
// +optional
UpdatedNumberScheduled
int32
`json:"updatedNumberScheduled,omitempty" protobuf:"varint,6,opt,name=updatedNumberScheduled"`
UpdatedNumberScheduled
int32
`json:"updatedNumberScheduled,omitempty" protobuf:"varint,6,opt,name=updatedNumberScheduled"`
//
NumberAvailable is t
he number of nodes that should be running the
//
T
he number of nodes that should be running the
// daemon pod and have one or more of the daemon pod running and
// daemon pod and have one or more of the daemon pod running and
// available (ready for at least minReadySeconds)
// available (ready for at least
spec.
minReadySeconds)
// +optional
// +optional
NumberAvailable
int32
`json:"numberAvailable,omitempty" protobuf:"varint,7,opt,name=numberAvailable"`
NumberAvailable
int32
`json:"numberAvailable,omitempty" protobuf:"varint,7,opt,name=numberAvailable"`
//
NumberUnavailable is t
he number of nodes that should be running the
//
T
he number of nodes that should be running the
// daemon pod and have none of the daemon pod running and available
// daemon pod and have none of the daemon pod running and available
// (ready for at least minReadySeconds)
// (ready for at least
spec.
minReadySeconds)
// +optional
// +optional
NumberUnavailable
int32
`json:"numberUnavailable,omitempty" protobuf:"varint,8,opt,name=numberUnavailable"`
NumberUnavailable
int32
`json:"numberUnavailable,omitempty" protobuf:"varint,8,opt,name=numberUnavailable"`
}
}
...
@@ -501,12 +499,12 @@ type DaemonSet struct {
...
@@ -501,12 +499,12 @@ type DaemonSet struct {
// +optional
// +optional
metav1
.
ObjectMeta
`json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
metav1
.
ObjectMeta
`json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
//
Spec defines t
he desired behavior of this daemon set.
//
T
he desired behavior of this daemon set.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
// +optional
// +optional
Spec
DaemonSetSpec
`json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
Spec
DaemonSetSpec
`json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
//
Status is t
he current status of this daemon set. This data may be
//
T
he current status of this daemon set. This data may be
// out of date by some window of time.
// out of date by some window of time.
// Populated by the system.
// Populated by the system.
// Read-only.
// Read-only.
...
@@ -530,7 +528,7 @@ type DaemonSetList struct {
...
@@ -530,7 +528,7 @@ type DaemonSetList struct {
// +optional
// +optional
metav1
.
ListMeta
`json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
metav1
.
ListMeta
`json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
//
Items is a
list of daemon sets.
//
A
list of daemon sets.
Items
[]
DaemonSet
`json:"items" protobuf:"bytes,2,rep,name=items"`
Items
[]
DaemonSet
`json:"items" protobuf:"bytes,2,rep,name=items"`
}
}
...
...
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