@@ -66,7 +66,7 @@ type ContainerManifest struct {
66
66
67
67
// ContainerManifestList is used to communicate container manifests to kubelet.
68
68
type ContainerManifestList struct {
69
- JSONBase `json:",inline" yaml:",inline"`
69
+ TypeMeta `json:",inline" yaml:",inline"`
70
70
Items []ContainerManifest `json:"items,omitempty" yaml:"items,omitempty"`
71
71
}
72
72
@@ -265,8 +265,8 @@ type Lifecycle struct {
265
265
266
266
// The below types are used by kube_client and api_server.
267
267
268
- // JSONBase is shared by all objects sent to, or returned from the client.
269
- type JSONBase struct {
268
+ // TypeMeta is shared by all objects sent to, or returned from the client.
269
+ type TypeMeta struct {
270
270
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
271
271
ID string `json:"id,omitempty" yaml:"id,omitempty"`
272
272
CreationTimestamp util.Time `json:"creationTimestamp,omitempty" yaml:"creationTimestamp,omitempty"`
@@ -374,15 +374,15 @@ type PodState struct {
374
374
375
375
// PodList is a list of Pods.
376
376
type PodList struct {
377
- JSONBase `json:",inline" yaml:",inline"`
377
+ TypeMeta `json:",inline" yaml:",inline"`
378
378
Items []Pod `json:"items" yaml:"items,omitempty"`
379
379
}
380
380
381
381
func (* PodList ) IsAnAPIObject () {}
382
382
383
383
// Pod is a collection of containers, used as either input (create, update) or as output (list, get).
384
384
type Pod struct {
385
- JSONBase `json:",inline" yaml:",inline"`
385
+ TypeMeta `json:",inline" yaml:",inline"`
386
386
Labels map [string ]string `json:"labels,omitempty" yaml:"labels,omitempty"`
387
387
DesiredState PodState `json:"desiredState,omitempty" yaml:"desiredState,omitempty"`
388
388
CurrentState PodState `json:"currentState,omitempty" yaml:"currentState,omitempty"`
@@ -399,15 +399,15 @@ type ReplicationControllerState struct {
399
399
400
400
// ReplicationControllerList is a collection of replication controllers.
401
401
type ReplicationControllerList struct {
402
- JSONBase `json:",inline" yaml:",inline"`
402
+ TypeMeta `json:",inline" yaml:",inline"`
403
403
Items []ReplicationController `json:"items,omitempty" yaml:"items,omitempty"`
404
404
}
405
405
406
406
func (* ReplicationControllerList ) IsAnAPIObject () {}
407
407
408
408
// ReplicationController represents the configuration of a replication controller.
409
409
type ReplicationController struct {
410
- JSONBase `json:",inline" yaml:",inline"`
410
+ TypeMeta `json:",inline" yaml:",inline"`
411
411
DesiredState ReplicationControllerState `json:"desiredState,omitempty" yaml:"desiredState,omitempty"`
412
412
CurrentState ReplicationControllerState `json:"currentState,omitempty" yaml:"currentState,omitempty"`
413
413
Labels map [string ]string `json:"labels,omitempty" yaml:"labels,omitempty"`
@@ -423,7 +423,7 @@ type PodTemplate struct {
423
423
424
424
// ServiceList holds a list of services.
425
425
type ServiceList struct {
426
- JSONBase `json:",inline" yaml:",inline"`
426
+ TypeMeta `json:",inline" yaml:",inline"`
427
427
Items []Service `json:"items" yaml:"items"`
428
428
}
429
429
@@ -433,7 +433,7 @@ func (*ServiceList) IsAnAPIObject() {}
433
433
// (for example 3306) that the proxy listens on, and the selector that determines which pods
434
434
// will answer requests sent through the proxy.
435
435
type Service struct {
436
- JSONBase `json:",inline" yaml:",inline"`
436
+ TypeMeta `json:",inline" yaml:",inline"`
437
437
438
438
// Required.
439
439
Port int `json:"port" yaml:"port"`
@@ -457,15 +457,15 @@ func (*Service) IsAnAPIObject() {}
457
457
// Endpoints is a collection of endpoints that implement the actual service, for example:
458
458
// Name: "mysql", Endpoints: ["10.10.1.1:1909", "10.10.2.2:8834"]
459
459
type Endpoints struct {
460
- JSONBase `json:",inline" yaml:",inline"`
460
+ TypeMeta `json:",inline" yaml:",inline"`
461
461
Endpoints []string `json:"endpoints,omitempty" yaml:"endpoints,omitempty"`
462
462
}
463
463
464
464
func (* Endpoints ) IsAnAPIObject () {}
465
465
466
466
// EndpointsList is a list of endpoints.
467
467
type EndpointsList struct {
468
- JSONBase `json:",inline" yaml:",inline"`
468
+ TypeMeta `json:",inline" yaml:",inline"`
469
469
Items []Endpoints `json:"items,omitempty" yaml:"items,omitempty"`
470
470
}
471
471
@@ -484,9 +484,9 @@ type ResourceName string
484
484
type ResourceList map [ResourceName ]util.IntOrString
485
485
486
486
// Minion is a worker node in Kubernetenes.
487
- // The name of the minion according to etcd is in JSONBase .ID.
487
+ // The name of the minion according to etcd is in TypeMeta .ID.
488
488
type Minion struct {
489
- JSONBase `json:",inline" yaml:",inline"`
489
+ TypeMeta `json:",inline" yaml:",inline"`
490
490
// Queried from cloud provider, if available.
491
491
HostIP string `json:"hostIP,omitempty" yaml:"hostIP,omitempty"`
492
492
// Resources available on the node
@@ -497,15 +497,15 @@ func (*Minion) IsAnAPIObject() {}
497
497
498
498
// MinionList is a list of minions.
499
499
type MinionList struct {
500
- JSONBase `json:",inline" yaml:",inline"`
500
+ TypeMeta `json:",inline" yaml:",inline"`
501
501
Items []Minion `json:"items,omitempty" yaml:"items,omitempty"`
502
502
}
503
503
504
504
func (* MinionList ) IsAnAPIObject () {}
505
505
506
506
// Binding is written by a scheduler to cause a pod to be bound to a host.
507
507
type Binding struct {
508
- JSONBase `json:",inline" yaml:",inline"`
508
+ TypeMeta `json:",inline" yaml:",inline"`
509
509
PodID string `json:"podID" yaml:"podID"`
510
510
Host string `json:"host" yaml:"host"`
511
511
}
@@ -516,7 +516,7 @@ func (*Binding) IsAnAPIObject() {}
516
516
// TODO: this could go in apiserver, but I'm including it here so clients needn't
517
517
// import both.
518
518
type Status struct {
519
- JSONBase `json:",inline" yaml:",inline"`
519
+ TypeMeta `json:",inline" yaml:",inline"`
520
520
// One of: "Success", "Failure", "Working" (for operations not yet completed)
521
521
Status string `json:"status,omitempty" yaml:"status,omitempty"`
522
522
// A human-readable description of the status of this operation.
@@ -670,14 +670,14 @@ const (
670
670
671
671
// ServerOp is an operation delivered to API clients.
672
672
type ServerOp struct {
673
- JSONBase `yaml:",inline" json:",inline"`
673
+ TypeMeta `yaml:",inline" json:",inline"`
674
674
}
675
675
676
676
func (* ServerOp ) IsAnAPIObject () {}
677
677
678
678
// ServerOpList is a list of operations, as delivered to API clients.
679
679
type ServerOpList struct {
680
- JSONBase `yaml:",inline" json:",inline"`
680
+ TypeMeta `yaml:",inline" json:",inline"`
681
681
Items []ServerOp `yaml:"items,omitempty" json:"items,omitempty"`
682
682
}
683
683
@@ -704,7 +704,7 @@ type ObjectReference struct {
704
704
// Event is a report of an event somewhere in the cluster.
705
705
// TODO: Decide whether to store these separately or with the object they apply to.
706
706
type Event struct {
707
- JSONBase `yaml:",inline" json:",inline"`
707
+ TypeMeta `yaml:",inline" json:",inline"`
708
708
709
709
// Required. The object that this event is about.
710
710
InvolvedObject ObjectReference `json:"involvedObject,omitempty" yaml:"involvedObject,omitempty"`
@@ -737,7 +737,7 @@ func (*Event) IsAnAPIObject() {}
737
737
738
738
// EventList is a list of events.
739
739
type EventList struct {
740
- JSONBase `yaml:",inline" json:",inline"`
740
+ TypeMeta `yaml:",inline" json:",inline"`
741
741
Items []Event `yaml:"items,omitempty" json:"items,omitempty"`
742
742
}
743
743
0 commit comments