From 8d8a532ad4c7932ce3c2b9616b1023267fd1e068 Mon Sep 17 00:00:00 2001 From: HirazawaUi <695097494plus@gmail.com> Date: Fri, 27 Jun 2025 19:41:18 +0800 Subject: [PATCH] Add the HostnameOverride field to the Pod API Kubernetes-commit: 8b3814c4ab8971dc4c1bef32457a595c5a6eaa63 --- applyconfigurations/core/v1/podspec.go | 9 +++++++++ applyconfigurations/internal/internal.go | 3 +++ 2 files changed, 12 insertions(+) diff --git a/applyconfigurations/core/v1/podspec.go b/applyconfigurations/core/v1/podspec.go index 96f6eb94b..82a1afa61 100644 --- a/applyconfigurations/core/v1/podspec.go +++ b/applyconfigurations/core/v1/podspec.go @@ -65,6 +65,7 @@ type PodSpecApplyConfiguration struct { SchedulingGates []PodSchedulingGateApplyConfiguration `json:"schedulingGates,omitempty"` ResourceClaims []PodResourceClaimApplyConfiguration `json:"resourceClaims,omitempty"` Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` + HostnameOverride *string `json:"hostnameOverride,omitempty"` } // PodSpecApplyConfiguration constructs a declarative configuration of the PodSpec type for use with @@ -453,3 +454,11 @@ func (b *PodSpecApplyConfiguration) WithResources(value *ResourceRequirementsApp b.Resources = value return b } + +// WithHostnameOverride sets the HostnameOverride 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 HostnameOverride field is set to the value of the last call. +func (b *PodSpecApplyConfiguration) WithHostnameOverride(value string) *PodSpecApplyConfiguration { + b.HostnameOverride = &value + return b +} diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index 71e25f692..db1b3cb4d 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -7449,6 +7449,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: hostname type: scalar: string + - name: hostnameOverride + type: + scalar: string - name: imagePullSecrets type: list: