From 1804e5e54800182539edde31dc7bf579e9a55f03 Mon Sep 17 00:00:00 2001 From: ymqytw Date: Thu, 6 Apr 2017 15:07:49 -0700 Subject: [PATCH] add patch comment tags in open api --- federation/apis/federation/v1beta1/types.go | 2 + pkg/api/v1/types.go | 37 +++++++++++++++++++ pkg/apis/apps/v1beta1/types.go | 2 + pkg/apis/batch/v1/types.go | 2 + pkg/apis/extensions/v1beta1/types.go | 4 ++ pkg/kubelet/api/v1alpha1/stats/types.go | 8 ++++ .../apimachinery/pkg/apis/meta/v1/types.go | 5 +++ .../src/k8s.io/client-go/pkg/api/v1/types.go | 37 +++++++++++++++++++ .../client-go/pkg/apis/apps/v1beta1/types.go | 2 + .../client-go/pkg/apis/batch/v1/types.go | 2 + .../pkg/apis/extensions/v1beta1/types.go | 4 ++ 11 files changed, 105 insertions(+) diff --git a/federation/apis/federation/v1beta1/types.go b/federation/apis/federation/v1beta1/types.go index 2fd0d367d9a..f7731e294de 100644 --- a/federation/apis/federation/v1beta1/types.go +++ b/federation/apis/federation/v1beta1/types.go @@ -36,6 +36,8 @@ type ClusterSpec struct { // This is to help clients reach servers in the most network-efficient way possible. // Clients can use the appropriate server address as per the CIDR that they match. // In case of multiple matches, clients should use the longest matching CIDR. + // +patchMergeKey=clientCIDR + // +patchStrategy=merge ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" patchStrategy:"merge" patchMergeKey:"clientCIDR" protobuf:"bytes,1,rep,name=serverAddressByClientCIDRs"` // Name of the secret containing kubeconfig to access this cluster. // The secret is read from the kubernetes cluster that is hosting federation control plane. diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index 5a861ec766e..0f0c5c4fb07 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -197,6 +197,8 @@ type ObjectMeta struct { // then an entry in this list will point to this controller, with the controller field set to true. // There cannot be more than one managing controller. // +optional + // +patchMergeKey=uid + // +patchStrategy=merge OwnerReferences []metav1.OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"` // Must be empty before the object is deleted from the registry. Each entry @@ -204,6 +206,7 @@ type ObjectMeta struct { // from the list. If the deletionTimestamp of the object is non-nil, entries // in this list can only be removed. // +optional + // +patchStrategy=merge Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` // The name of the cluster which the object belongs to. @@ -1637,6 +1640,8 @@ type Container struct { // accessible from the network. // Cannot be updated. // +optional + // +patchMergeKey=containerPort + // +patchStrategy=merge Ports []ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"` // List of sources to populate environment variables in the container. // The keys defined within a source must be a C_IDENTIFIER. All invalid keys @@ -1649,6 +1654,8 @@ type Container struct { // List of environment variables to set in the container. // Cannot be updated. // +optional + // +patchMergeKey=name + // +patchStrategy=merge Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"` // Compute Resources required by this container. // Cannot be updated. @@ -1658,6 +1665,8 @@ type Container struct { // Pod volumes to mount into the container's filesystem. // Cannot be updated. // +optional + // +patchMergeKey=mountPath + // +patchStrategy=merge VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` // Periodic probe of container liveness. // Container will be restarted if the probe fails. @@ -1978,6 +1987,8 @@ type NodeSelectorTerm struct { // that relates the key and values. type NodeSelectorRequirement struct { // The label key that the selector applies to. + // +patchMergeKey=key + // +patchStrategy=merge Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"` // Represents a key's relationship to a set of values. // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. @@ -2162,6 +2173,8 @@ type PreferredSchedulingTerm struct { // any pod that that does not tolerate the Taint. type Taint struct { // Required. The taint key to be applied to a node. + // +patchMergeKey=key + // +patchStrategy=merge Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"` // Required. The taint value corresponding to the taint key. // +optional @@ -2204,6 +2217,8 @@ type Toleration struct { // Key is the taint key that the toleration applies to. Empty means match all taint keys. // If the key is empty, operator must be Exists; this combination means to match all values and all keys. // +optional + // +patchMergeKey=key + // +patchStrategy=merge Key string `json:"key,omitempty" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"` // Operator represents a key's relationship to the value. // Valid operators are Exists and Equal. Defaults to Equal. @@ -2261,6 +2276,8 @@ type PodSpec struct { // List of volumes that can be mounted by containers belonging to the pod. // More info: http://kubernetes.io/docs/user-guide/volumes // +optional + // +patchMergeKey=name + // +patchStrategy=merge Volumes []Volume `json:"volumes,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"` // List of initialization containers belonging to the pod. // Init containers are executed in order prior to containers being started. If any @@ -2275,12 +2292,16 @@ type PodSpec struct { // Init containers cannot currently be added or removed. // Cannot be updated. // More info: http://kubernetes.io/docs/user-guide/containers + // +patchMergeKey=name + // +patchStrategy=merge InitContainers []Container `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,20,rep,name=initContainers"` // List of containers belonging to the pod. // Containers cannot currently be added or removed. // There must be at least one container in a Pod. // Cannot be updated. // More info: http://kubernetes.io/docs/user-guide/containers + // +patchMergeKey=name + // +patchStrategy=merge Containers []Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=containers"` // Restart policy for all containers within the pod. // One of Always, OnFailure, Never. @@ -2357,6 +2378,8 @@ type PodSpec struct { // in the case of docker, only DockerConfig type secrets are honored. // More info: http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod // +optional + // +patchMergeKey=name + // +patchStrategy=merge ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"` // Specifies the hostname of the Pod // If not specified, the pod's hostname will be set to a system-defined value. @@ -2444,6 +2467,8 @@ type PodStatus struct { // Current service state of pod. // More info: http://kubernetes.io/docs/user-guide/pod-states#pod-conditions // +optional + // +patchMergeKey=type + // +patchStrategy=merge Conditions []PodCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` // A human readable message indicating details about why the pod is in this condition. // +optional @@ -2640,6 +2665,8 @@ type ReplicationControllerStatus struct { // Represents the latest available observations of a replication controller's current state. // +optional + // +patchMergeKey=type + // +patchStrategy=merge Conditions []ReplicationControllerCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } @@ -2777,6 +2804,8 @@ type LoadBalancerIngress struct { type ServiceSpec struct { // The list of ports that are exposed by this service. // More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies + // +patchMergeKey=port + // +patchStrategy=merge Ports []ServicePort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"port" protobuf:"bytes,1,rep,name=ports"` // Route service traffic to pods with label keys and values matching this @@ -2962,6 +2991,8 @@ type ServiceAccount struct { // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. // More info: http://kubernetes.io/docs/user-guide/secrets // +optional + // +patchMergeKey=name + // +patchStrategy=merge Secrets []ObjectReference `json:"secrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=secrets"` // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images @@ -3182,11 +3213,15 @@ type NodeStatus struct { // Conditions is an array of current observed node conditions. // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition // +optional + // +patchMergeKey=type + // +patchStrategy=merge Conditions []NodeCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"` // List of addresses reachable to the node. // Queried from cloud provider, if available. // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses // +optional + // +patchMergeKey=type + // +patchStrategy=merge Addresses []NodeAddress `json:"addresses,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,5,rep,name=addresses"` // Endpoints of daemons running on the Node. // +optional @@ -4235,6 +4270,8 @@ type ComponentStatus struct { // List of component conditions observed // +optional + // +patchMergeKey=type + // +patchStrategy=merge Conditions []ComponentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` } diff --git a/pkg/apis/apps/v1beta1/types.go b/pkg/apis/apps/v1beta1/types.go index c76d4a5369f..07794755843 100644 --- a/pkg/apis/apps/v1beta1/types.go +++ b/pkg/apis/apps/v1beta1/types.go @@ -327,6 +327,8 @@ type DeploymentStatus struct { UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"` // Represents the latest available observations of a deployment's current state. + // +patchMergeKey=type + // +patchStrategy=merge Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } diff --git a/pkg/apis/batch/v1/types.go b/pkg/apis/batch/v1/types.go index c59c5d832bf..0720fa837f2 100644 --- a/pkg/apis/batch/v1/types.go +++ b/pkg/apis/batch/v1/types.go @@ -110,6 +110,8 @@ type JobStatus struct { // Conditions represent the latest available observations of an object's current state. // More info: http://kubernetes.io/docs/user-guide/jobs // +optional + // +patchMergeKey=type + // +patchStrategy=merge Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // StartTime represents time when the job was acknowledged by the Job Manager. diff --git a/pkg/apis/extensions/v1beta1/types.go b/pkg/apis/extensions/v1beta1/types.go index 3b0a496e49f..d1eec657c18 100644 --- a/pkg/apis/extensions/v1beta1/types.go +++ b/pkg/apis/extensions/v1beta1/types.go @@ -322,6 +322,8 @@ type DeploymentStatus struct { UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"` // Represents the latest available observations of a deployment's current state. + // +patchMergeKey=type + // +patchStrategy=merge Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } @@ -802,6 +804,8 @@ type ReplicaSetStatus struct { // Represents the latest available observations of a replica set's current state. // +optional + // +patchMergeKey=type + // +patchStrategy=merge Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } diff --git a/pkg/kubelet/api/v1alpha1/stats/types.go b/pkg/kubelet/api/v1alpha1/stats/types.go index 361640fb321..79c84f04cde 100644 --- a/pkg/kubelet/api/v1alpha1/stats/types.go +++ b/pkg/kubelet/api/v1alpha1/stats/types.go @@ -35,6 +35,8 @@ type NodeStats struct { // Stats of system daemons tracked as raw containers. // The system containers are named according to the SystemContainer* constants. // +optional + // +patchMergeKey=name + // +patchStrategy=merge SystemContainers []ContainerStats `json:"systemContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // The time at which data collection for the node-scoped (i.e. aggregate) stats was (re)started. StartTime metav1.Time `json:"startTime"` @@ -81,6 +83,8 @@ type PodStats struct { // The time at which data collection for the pod-scoped (e.g. network) stats was (re)started. StartTime metav1.Time `json:"startTime"` // Stats of containers in the measured pod. + // +patchMergeKey=name + // +patchStrategy=merge Containers []ContainerStats `json:"containers" patchStrategy:"merge" patchMergeKey:"name"` // Stats pertaining to network resources. // +optional @@ -88,6 +92,8 @@ type PodStats struct { // Stats pertaining to volume usage of filesystem resources. // VolumeStats.UsedBytes is the number of bytes used by the Volume // +optional + // +patchMergeKey=name + // +patchStrategy=merge VolumeStats []VolumeStats `json:"volume,omitempty" patchStrategy:"merge" patchMergeKey:"name"` } @@ -112,6 +118,8 @@ type ContainerStats struct { // +optional Logs *FsStats `json:"logs,omitempty"` // User defined metrics that are exposed by containers in the pod. Typically, we expect only one container in the pod to be exposing user defined metrics. In the event of multiple containers exposing metrics, they will be combined here. + // +patchMergeKey=name + // +patchStrategy=merge UserDefinedMetrics []UserDefinedMetric `json:"userDefinedMetrics,omitmepty" patchStrategy:"merge" patchMergeKey:"name"` } diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index 5e9cf239756..f14efc8dfe7 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -209,6 +209,8 @@ type ObjectMeta struct { // then an entry in this list will point to this controller, with the controller field set to true. // There cannot be more than one managing controller. // +optional + // +patchMergeKey=uid + // +patchStrategy=merge OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"` // Must be empty before the object is deleted from the registry. Each entry @@ -216,6 +218,7 @@ type ObjectMeta struct { // from the list. If the deletionTimestamp of the object is non-nil, entries // in this list can only be removed. // +optional + // +patchStrategy=merge Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` // The name of the cluster which the object belongs to. @@ -773,6 +776,8 @@ type LabelSelector struct { // relates the key and values. type LabelSelectorRequirement struct { // key is the label key that the selector applies to. + // +patchMergeKey=key + // +patchStrategy=merge Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"` // operator represents a key's relationship to a set of values. // Valid operators ard In, NotIn, Exists and DoesNotExist. diff --git a/staging/src/k8s.io/client-go/pkg/api/v1/types.go b/staging/src/k8s.io/client-go/pkg/api/v1/types.go index 5a861ec766e..0f0c5c4fb07 100644 --- a/staging/src/k8s.io/client-go/pkg/api/v1/types.go +++ b/staging/src/k8s.io/client-go/pkg/api/v1/types.go @@ -197,6 +197,8 @@ type ObjectMeta struct { // then an entry in this list will point to this controller, with the controller field set to true. // There cannot be more than one managing controller. // +optional + // +patchMergeKey=uid + // +patchStrategy=merge OwnerReferences []metav1.OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"` // Must be empty before the object is deleted from the registry. Each entry @@ -204,6 +206,7 @@ type ObjectMeta struct { // from the list. If the deletionTimestamp of the object is non-nil, entries // in this list can only be removed. // +optional + // +patchStrategy=merge Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` // The name of the cluster which the object belongs to. @@ -1637,6 +1640,8 @@ type Container struct { // accessible from the network. // Cannot be updated. // +optional + // +patchMergeKey=containerPort + // +patchStrategy=merge Ports []ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"` // List of sources to populate environment variables in the container. // The keys defined within a source must be a C_IDENTIFIER. All invalid keys @@ -1649,6 +1654,8 @@ type Container struct { // List of environment variables to set in the container. // Cannot be updated. // +optional + // +patchMergeKey=name + // +patchStrategy=merge Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"` // Compute Resources required by this container. // Cannot be updated. @@ -1658,6 +1665,8 @@ type Container struct { // Pod volumes to mount into the container's filesystem. // Cannot be updated. // +optional + // +patchMergeKey=mountPath + // +patchStrategy=merge VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` // Periodic probe of container liveness. // Container will be restarted if the probe fails. @@ -1978,6 +1987,8 @@ type NodeSelectorTerm struct { // that relates the key and values. type NodeSelectorRequirement struct { // The label key that the selector applies to. + // +patchMergeKey=key + // +patchStrategy=merge Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"` // Represents a key's relationship to a set of values. // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. @@ -2162,6 +2173,8 @@ type PreferredSchedulingTerm struct { // any pod that that does not tolerate the Taint. type Taint struct { // Required. The taint key to be applied to a node. + // +patchMergeKey=key + // +patchStrategy=merge Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"` // Required. The taint value corresponding to the taint key. // +optional @@ -2204,6 +2217,8 @@ type Toleration struct { // Key is the taint key that the toleration applies to. Empty means match all taint keys. // If the key is empty, operator must be Exists; this combination means to match all values and all keys. // +optional + // +patchMergeKey=key + // +patchStrategy=merge Key string `json:"key,omitempty" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"` // Operator represents a key's relationship to the value. // Valid operators are Exists and Equal. Defaults to Equal. @@ -2261,6 +2276,8 @@ type PodSpec struct { // List of volumes that can be mounted by containers belonging to the pod. // More info: http://kubernetes.io/docs/user-guide/volumes // +optional + // +patchMergeKey=name + // +patchStrategy=merge Volumes []Volume `json:"volumes,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"` // List of initialization containers belonging to the pod. // Init containers are executed in order prior to containers being started. If any @@ -2275,12 +2292,16 @@ type PodSpec struct { // Init containers cannot currently be added or removed. // Cannot be updated. // More info: http://kubernetes.io/docs/user-guide/containers + // +patchMergeKey=name + // +patchStrategy=merge InitContainers []Container `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,20,rep,name=initContainers"` // List of containers belonging to the pod. // Containers cannot currently be added or removed. // There must be at least one container in a Pod. // Cannot be updated. // More info: http://kubernetes.io/docs/user-guide/containers + // +patchMergeKey=name + // +patchStrategy=merge Containers []Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=containers"` // Restart policy for all containers within the pod. // One of Always, OnFailure, Never. @@ -2357,6 +2378,8 @@ type PodSpec struct { // in the case of docker, only DockerConfig type secrets are honored. // More info: http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod // +optional + // +patchMergeKey=name + // +patchStrategy=merge ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"` // Specifies the hostname of the Pod // If not specified, the pod's hostname will be set to a system-defined value. @@ -2444,6 +2467,8 @@ type PodStatus struct { // Current service state of pod. // More info: http://kubernetes.io/docs/user-guide/pod-states#pod-conditions // +optional + // +patchMergeKey=type + // +patchStrategy=merge Conditions []PodCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` // A human readable message indicating details about why the pod is in this condition. // +optional @@ -2640,6 +2665,8 @@ type ReplicationControllerStatus struct { // Represents the latest available observations of a replication controller's current state. // +optional + // +patchMergeKey=type + // +patchStrategy=merge Conditions []ReplicationControllerCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } @@ -2777,6 +2804,8 @@ type LoadBalancerIngress struct { type ServiceSpec struct { // The list of ports that are exposed by this service. // More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies + // +patchMergeKey=port + // +patchStrategy=merge Ports []ServicePort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"port" protobuf:"bytes,1,rep,name=ports"` // Route service traffic to pods with label keys and values matching this @@ -2962,6 +2991,8 @@ type ServiceAccount struct { // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. // More info: http://kubernetes.io/docs/user-guide/secrets // +optional + // +patchMergeKey=name + // +patchStrategy=merge Secrets []ObjectReference `json:"secrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=secrets"` // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images @@ -3182,11 +3213,15 @@ type NodeStatus struct { // Conditions is an array of current observed node conditions. // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition // +optional + // +patchMergeKey=type + // +patchStrategy=merge Conditions []NodeCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"` // List of addresses reachable to the node. // Queried from cloud provider, if available. // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses // +optional + // +patchMergeKey=type + // +patchStrategy=merge Addresses []NodeAddress `json:"addresses,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,5,rep,name=addresses"` // Endpoints of daemons running on the Node. // +optional @@ -4235,6 +4270,8 @@ type ComponentStatus struct { // List of component conditions observed // +optional + // +patchMergeKey=type + // +patchStrategy=merge Conditions []ComponentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` } diff --git a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go index a5675d5d30d..563140c039a 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go +++ b/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go @@ -327,6 +327,8 @@ type DeploymentStatus struct { UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"` // Represents the latest available observations of a deployment's current state. + // +patchMergeKey=type + // +patchStrategy=merge Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } diff --git a/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.go b/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.go index 734e6204d4b..6438aa9c4a4 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.go +++ b/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.go @@ -110,6 +110,8 @@ type JobStatus struct { // Conditions represent the latest available observations of an object's current state. // More info: http://kubernetes.io/docs/user-guide/jobs // +optional + // +patchMergeKey=type + // +patchStrategy=merge Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // StartTime represents time when the job was acknowledged by the Job Manager. diff --git a/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go b/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go index 43dd2a9b02b..68b922b4d55 100644 --- a/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go +++ b/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go @@ -322,6 +322,8 @@ type DeploymentStatus struct { UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"` // Represents the latest available observations of a deployment's current state. + // +patchMergeKey=type + // +patchStrategy=merge Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } @@ -802,6 +804,8 @@ type ReplicaSetStatus struct { // Represents the latest available observations of a replica set's current state. // +optional + // +patchMergeKey=type + // +patchStrategy=merge Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` }