mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-26 19:35:10 +00:00
Merge pull request #47512 from rickypai/rpai/fix_hostalias_json_key
Automatic merge from submit-queue (batch tested with PRs 42252, 42251, 42249, 47512, 47887) fix HostAliases' json keys to be hostAlias instead of hostMapping to reflect actual feature name **What this PR does / why we need it**: a rename was introduce during the middle of #44641 to change from `hostMappings` to `hostAliases`. the Go structs were updated, but I neglected to update the json keys. They should be in sync. **Special notes for your reviewer**: I messed up. This is an API change. I hope this is still ok to be in the 1.7 release. **Release note**: ```release-note HostAliases is now parsed with `hostAliases` json keys to be in line with the feature's name. ```
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -2788,9 +2788,9 @@ message PodSpec {
|
||||
// HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
|
||||
// file if specified. This is only valid for non-hostNetwork pods.
|
||||
// +optional
|
||||
// +patchMergeKey=IP
|
||||
// +patchMergeKey=ip
|
||||
// +patchStrategy=merge
|
||||
repeated HostAlias hostMappings = 23;
|
||||
repeated HostAlias hostAliases = 23;
|
||||
}
|
||||
|
||||
// PodStatus represents information about the status of a pod. Status may trail the actual
|
||||
|
||||
@@ -36415,7 +36415,7 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
} else {
|
||||
if yyq2[22] {
|
||||
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||
r.EncodeString(codecSelferC_UTF81234, string("hostMappings"))
|
||||
r.EncodeString(codecSelferC_UTF81234, string("hostAliases"))
|
||||
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||
if x.HostAliases == nil {
|
||||
r.EncodeNil()
|
||||
@@ -36754,7 +36754,7 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
h.decSliceToleration((*[]Toleration)(yyv42), d)
|
||||
}
|
||||
}
|
||||
case "hostMappings":
|
||||
case "hostAliases":
|
||||
if r.TryDecodeAsNil() {
|
||||
x.HostAliases = nil
|
||||
} else {
|
||||
|
||||
@@ -2517,9 +2517,9 @@ type PodSpec struct {
|
||||
// HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
|
||||
// file if specified. This is only valid for non-hostNetwork pods.
|
||||
// +optional
|
||||
// +patchMergeKey=IP
|
||||
// +patchMergeKey=ip
|
||||
// +patchStrategy=merge
|
||||
HostAliases []HostAlias `json:"hostMappings,omitempty" patchStrategy:"merge" patchMergeKey:"IP" protobuf:"bytes,23,rep,name=hostMappings"`
|
||||
HostAliases []HostAlias `json:"hostAliases,omitempty" patchStrategy:"merge" patchMergeKey:"ip" protobuf:"bytes,23,rep,name=hostAliases"`
|
||||
}
|
||||
|
||||
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
|
||||
|
||||
@@ -1375,7 +1375,7 @@ var map_PodSpec = map[string]string{
|
||||
"affinity": "If specified, the pod's scheduling constraints",
|
||||
"schedulerName": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.",
|
||||
"tolerations": "If specified, the pod's tolerations.",
|
||||
"hostMappings": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.",
|
||||
"hostAliases": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.",
|
||||
}
|
||||
|
||||
func (PodSpec) SwaggerDoc() map[string]string {
|
||||
|
||||
Reference in New Issue
Block a user