mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-16 14:26:42 +00:00
Merge pull request #109616 from wzshiming/feat/pod-host-ips
Field `status.hostIPs` added for Pod Kubernetes-commit: 8a0ea1bd587895a328f6587064c936022b16335d
This commit is contained in:
commit
162ee91898
39
applyconfigurations/core/v1/hostip.go
Normal file
39
applyconfigurations/core/v1/hostip.go
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
// HostIPApplyConfiguration represents an declarative configuration of the HostIP type for use
|
||||||
|
// with apply.
|
||||||
|
type HostIPApplyConfiguration struct {
|
||||||
|
IP *string `json:"ip,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// HostIPApplyConfiguration constructs an declarative configuration of the HostIP type for use with
|
||||||
|
// apply.
|
||||||
|
func HostIP() *HostIPApplyConfiguration {
|
||||||
|
return &HostIPApplyConfiguration{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithIP sets the IP field in the declarative configuration to the given value
|
||||||
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
|
// If called multiple times, the IP field is set to the value of the last call.
|
||||||
|
func (b *HostIPApplyConfiguration) WithIP(value string) *HostIPApplyConfiguration {
|
||||||
|
b.IP = &value
|
||||||
|
return b
|
||||||
|
}
|
@ -32,6 +32,7 @@ type PodStatusApplyConfiguration struct {
|
|||||||
Reason *string `json:"reason,omitempty"`
|
Reason *string `json:"reason,omitempty"`
|
||||||
NominatedNodeName *string `json:"nominatedNodeName,omitempty"`
|
NominatedNodeName *string `json:"nominatedNodeName,omitempty"`
|
||||||
HostIP *string `json:"hostIP,omitempty"`
|
HostIP *string `json:"hostIP,omitempty"`
|
||||||
|
HostIPs []HostIPApplyConfiguration `json:"hostIPs,omitempty"`
|
||||||
PodIP *string `json:"podIP,omitempty"`
|
PodIP *string `json:"podIP,omitempty"`
|
||||||
PodIPs []PodIPApplyConfiguration `json:"podIPs,omitempty"`
|
PodIPs []PodIPApplyConfiguration `json:"podIPs,omitempty"`
|
||||||
StartTime *metav1.Time `json:"startTime,omitempty"`
|
StartTime *metav1.Time `json:"startTime,omitempty"`
|
||||||
@ -102,6 +103,19 @@ func (b *PodStatusApplyConfiguration) WithHostIP(value string) *PodStatusApplyCo
|
|||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithHostIPs adds the given value to the HostIPs field in the declarative configuration
|
||||||
|
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||||
|
// If called multiple times, values provided by each call will be appended to the HostIPs field.
|
||||||
|
func (b *PodStatusApplyConfiguration) WithHostIPs(values ...*HostIPApplyConfiguration) *PodStatusApplyConfiguration {
|
||||||
|
for i := range values {
|
||||||
|
if values[i] == nil {
|
||||||
|
panic("nil value passed to WithHostIPs")
|
||||||
|
}
|
||||||
|
b.HostIPs = append(b.HostIPs, *values[i])
|
||||||
|
}
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
|
||||||
// WithPodIP sets the PodIP field in the declarative configuration to the given value
|
// WithPodIP sets the PodIP field in the declarative configuration to the given value
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
// If called multiple times, the PodIP field is set to the value of the last call.
|
// If called multiple times, the PodIP field is set to the value of the last call.
|
||||||
|
@ -5084,6 +5084,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: ip
|
- name: ip
|
||||||
type:
|
type:
|
||||||
scalar: string
|
scalar: string
|
||||||
|
- name: io.k8s.api.core.v1.HostIP
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: ip
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
- name: io.k8s.api.core.v1.HostPathVolumeSource
|
- name: io.k8s.api.core.v1.HostPathVolumeSource
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@ -6392,6 +6398,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: hostIP
|
- name: hostIP
|
||||||
type:
|
type:
|
||||||
scalar: string
|
scalar: string
|
||||||
|
- name: hostIPs
|
||||||
|
type:
|
||||||
|
list:
|
||||||
|
elementType:
|
||||||
|
namedType: io.k8s.api.core.v1.HostIP
|
||||||
|
elementRelationship: atomic
|
||||||
- name: initContainerStatuses
|
- name: initContainerStatuses
|
||||||
type:
|
type:
|
||||||
list:
|
list:
|
||||||
|
@ -677,6 +677,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
return &applyconfigurationscorev1.GRPCActionApplyConfiguration{}
|
return &applyconfigurationscorev1.GRPCActionApplyConfiguration{}
|
||||||
case corev1.SchemeGroupVersion.WithKind("HostAlias"):
|
case corev1.SchemeGroupVersion.WithKind("HostAlias"):
|
||||||
return &applyconfigurationscorev1.HostAliasApplyConfiguration{}
|
return &applyconfigurationscorev1.HostAliasApplyConfiguration{}
|
||||||
|
case corev1.SchemeGroupVersion.WithKind("HostIP"):
|
||||||
|
return &applyconfigurationscorev1.HostIPApplyConfiguration{}
|
||||||
case corev1.SchemeGroupVersion.WithKind("HostPathVolumeSource"):
|
case corev1.SchemeGroupVersion.WithKind("HostPathVolumeSource"):
|
||||||
return &applyconfigurationscorev1.HostPathVolumeSourceApplyConfiguration{}
|
return &applyconfigurationscorev1.HostPathVolumeSourceApplyConfiguration{}
|
||||||
case corev1.SchemeGroupVersion.WithKind("HTTPGetAction"):
|
case corev1.SchemeGroupVersion.WithKind("HTTPGetAction"):
|
||||||
|
4
go.mod
4
go.mod
@ -23,7 +23,7 @@ require (
|
|||||||
golang.org/x/term v0.10.0
|
golang.org/x/term v0.10.0
|
||||||
golang.org/x/time v0.3.0
|
golang.org/x/time v0.3.0
|
||||||
google.golang.org/protobuf v1.30.0
|
google.golang.org/protobuf v1.30.0
|
||||||
k8s.io/api v0.0.0-20230714211711-ad80a67756b3
|
k8s.io/api v0.0.0-20230715091319-27865287bbf9
|
||||||
k8s.io/apimachinery v0.0.0-20230714211010-7924d2c22746
|
k8s.io/apimachinery v0.0.0-20230714211010-7924d2c22746
|
||||||
k8s.io/klog/v2 v2.100.1
|
k8s.io/klog/v2 v2.100.1
|
||||||
k8s.io/kube-openapi v0.0.0-20230601164746-7562a1006961
|
k8s.io/kube-openapi v0.0.0-20230601164746-7562a1006961
|
||||||
@ -60,6 +60,6 @@ require (
|
|||||||
)
|
)
|
||||||
|
|
||||||
replace (
|
replace (
|
||||||
k8s.io/api => k8s.io/api v0.0.0-20230714211711-ad80a67756b3
|
k8s.io/api => k8s.io/api v0.0.0-20230715091319-27865287bbf9
|
||||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230714211010-7924d2c22746
|
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230714211010-7924d2c22746
|
||||||
)
|
)
|
||||||
|
4
go.sum
4
go.sum
@ -146,8 +146,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
|||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
k8s.io/api v0.0.0-20230714211711-ad80a67756b3 h1:BYYNW3dD/VvN4RVd609SyL/SxiMhZcbA7Ofur6IyFxQ=
|
k8s.io/api v0.0.0-20230715091319-27865287bbf9 h1:oQDNS9esWgkSCTdX+0K4T1mEeTLVKcJXKpFVY/vJAY4=
|
||||||
k8s.io/api v0.0.0-20230714211711-ad80a67756b3/go.mod h1:nHelHGU5nRmkT223Jbg1sZZjj9DvhsKLsEekrET50A4=
|
k8s.io/api v0.0.0-20230715091319-27865287bbf9/go.mod h1:nHelHGU5nRmkT223Jbg1sZZjj9DvhsKLsEekrET50A4=
|
||||||
k8s.io/apimachinery v0.0.0-20230714211010-7924d2c22746 h1:ZRR1OH9l7t2q4sW0wB74g7ZDDSAWvAuO/jAcSHt7FVk=
|
k8s.io/apimachinery v0.0.0-20230714211010-7924d2c22746 h1:ZRR1OH9l7t2q4sW0wB74g7ZDDSAWvAuO/jAcSHt7FVk=
|
||||||
k8s.io/apimachinery v0.0.0-20230714211010-7924d2c22746/go.mod h1:82hjKsW08vcDFh8wS9BtEee9UTcm0IlvyBnJ/zawF6E=
|
k8s.io/apimachinery v0.0.0-20230714211010-7924d2c22746/go.mod h1:82hjKsW08vcDFh8wS9BtEee9UTcm0IlvyBnJ/zawF6E=
|
||||||
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
|
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
|
||||||
|
Loading…
Reference in New Issue
Block a user