Files
GreenHandandGitHub 6acf3d5aef generate clientset with 1.35 code-generator (#4347)
* generate clientset with 1.35 code-generator

Signed-off-by: KunWuLuan <[email protected]>

* Update codegen script to use go list for k8s.io/code-generator path resolution

Signed-off-by: KunWuLuan <[email protected]>

* Run make sync

---------

Signed-off-by: KunWuLuan <[email protected]>
2026-01-13 12:51:42 +08:00

114 lines
5.6 KiB
Go

// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
apicorev1 "k8s.io/api/core/v1"
corev1 "k8s.io/client-go/applyconfigurations/core/v1"
)
// HeadGroupSpecApplyConfiguration represents a declarative configuration of the HeadGroupSpec type for use
// with apply.
//
// HeadGroupSpec are the spec for the head pod
type HeadGroupSpecApplyConfiguration struct {
// Template is the exact pod template used in K8s deployments, statefulsets, etc.
Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"`
// HeadService is the Kubernetes service of the head pod.
HeadService *apicorev1.Service `json:"headService,omitempty"`
// EnableIngress indicates whether operator should create ingress object for head service or not.
EnableIngress *bool `json:"enableIngress,omitempty"`
// Resources specifies the resource quantities for the head group.
// These values override the resources passed to `rayStartParams` for the group, but
// have no effect on the resources set at the K8s Pod container level.
Resources map[string]string `json:"resources,omitempty"`
// Labels specifies the Ray node labels for the head group.
// These labels will also be added to the Pods of this head group and override the `--labels`
// argument passed to `rayStartParams`.
Labels map[string]string `json:"labels,omitempty"`
// RayStartParams are the params of the start command: node-manager-port, object-store-memory, ...
RayStartParams map[string]string `json:"rayStartParams,omitempty"`
// ServiceType is Kubernetes service type of the head service. it will be used by the workers to connect to the head pod
ServiceType *apicorev1.ServiceType `json:"serviceType,omitempty"`
}
// HeadGroupSpecApplyConfiguration constructs a declarative configuration of the HeadGroupSpec type for use with
// apply.
func HeadGroupSpec() *HeadGroupSpecApplyConfiguration {
return &HeadGroupSpecApplyConfiguration{}
}
// WithTemplate sets the Template 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 Template field is set to the value of the last call.
func (b *HeadGroupSpecApplyConfiguration) WithTemplate(value *corev1.PodTemplateSpecApplyConfiguration) *HeadGroupSpecApplyConfiguration {
b.Template = value
return b
}
// WithHeadService sets the HeadService 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 HeadService field is set to the value of the last call.
func (b *HeadGroupSpecApplyConfiguration) WithHeadService(value apicorev1.Service) *HeadGroupSpecApplyConfiguration {
b.HeadService = &value
return b
}
// WithEnableIngress sets the EnableIngress 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 EnableIngress field is set to the value of the last call.
func (b *HeadGroupSpecApplyConfiguration) WithEnableIngress(value bool) *HeadGroupSpecApplyConfiguration {
b.EnableIngress = &value
return b
}
// WithResources puts the entries into the Resources field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Resources field,
// overwriting an existing map entries in Resources field with the same key.
func (b *HeadGroupSpecApplyConfiguration) WithResources(entries map[string]string) *HeadGroupSpecApplyConfiguration {
if b.Resources == nil && len(entries) > 0 {
b.Resources = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Resources[k] = v
}
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *HeadGroupSpecApplyConfiguration) WithLabels(entries map[string]string) *HeadGroupSpecApplyConfiguration {
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithRayStartParams puts the entries into the RayStartParams field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the RayStartParams field,
// overwriting an existing map entries in RayStartParams field with the same key.
func (b *HeadGroupSpecApplyConfiguration) WithRayStartParams(entries map[string]string) *HeadGroupSpecApplyConfiguration {
if b.RayStartParams == nil && len(entries) > 0 {
b.RayStartParams = make(map[string]string, len(entries))
}
for k, v := range entries {
b.RayStartParams[k] = v
}
return b
}
// WithServiceType sets the ServiceType 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 ServiceType field is set to the value of the last call.
func (b *HeadGroupSpecApplyConfiguration) WithServiceType(value apicorev1.ServiceType) *HeadGroupSpecApplyConfiguration {
b.ServiceType = &value
return b
}