package v1beta1

import "k8s.io/client-go/applyconfigurations/discovery/v1beta1"

Index

Types

type EndpointApplyConfiguration

type EndpointApplyConfiguration struct {
	// addresses of this endpoint. The contents of this field are interpreted
	// according to the corresponding EndpointSlice addressType field. Consumers
	// must handle different types of addresses in the context of their own
	// capabilities. This must contain at least one address but no more than
	// 100. These are all assumed to be fungible and clients may choose to only
	// use the first element. Refer to: https://issue.k8s.io/106267
	Addresses []string `json:"addresses,omitempty"`
	// conditions contains information about the current status of the endpoint.
	Conditions *EndpointConditionsApplyConfiguration `json:"conditions,omitempty"`
	// hostname of this endpoint. This field may be used by consumers of
	// endpoints to distinguish endpoints from each other (e.g. in DNS names).
	// Multiple endpoints which use the same hostname should be considered
	// fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS
	// Label (RFC 1123) validation.
	Hostname *string `json:"hostname,omitempty"`
	// targetRef is a reference to a Kubernetes object that represents this
	// endpoint.
	TargetRef *v1.ObjectReferenceApplyConfiguration `json:"targetRef,omitempty"`
	// topology contains arbitrary topology information associated with the
	// endpoint. These key/value pairs must conform with the label format.
	// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
	// Topology may include a maximum of 16 key/value pairs. This includes, but
	// is not limited to the following well known keys:
	// * kubernetes.io/hostname: the value indicates the hostname of the node
	// where the endpoint is located. This should match the corresponding
	// node label.
	// * topology.kubernetes.io/zone: the value indicates the zone where the
	// endpoint is located. This should match the corresponding node label.
	// * topology.kubernetes.io/region: the value indicates the region where the
	// endpoint is located. This should match the corresponding node label.
	// This field is deprecated and will be removed in future api versions.
	Topology map[string]string `json:"topology,omitempty"`
	// nodeName represents the name of the Node hosting this endpoint. This can
	// be used to determine endpoints local to a Node.
	NodeName *string `json:"nodeName,omitempty"`
	// hints contains information associated with how an endpoint should be
	// consumed.
	Hints *EndpointHintsApplyConfiguration `json:"hints,omitempty"`
}

EndpointApplyConfiguration represents a declarative configuration of the Endpoint type for use with apply.

Endpoint represents a single logical "backend" implementing a service.

func Endpoint

func Endpoint() *EndpointApplyConfiguration

EndpointApplyConfiguration constructs a declarative configuration of the Endpoint type for use with apply.

func (*EndpointApplyConfiguration) WithAddresses

func (b *EndpointApplyConfiguration) WithAddresses(values ...string) *EndpointApplyConfiguration

WithAddresses adds the given value to the Addresses 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 Addresses field.

func (*EndpointApplyConfiguration) WithConditions

WithConditions sets the Conditions 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 Conditions field is set to the value of the last call.

func (*EndpointApplyConfiguration) WithHints

WithHints sets the Hints 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 Hints field is set to the value of the last call.

func (*EndpointApplyConfiguration) WithHostname

WithHostname sets the Hostname 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 Hostname field is set to the value of the last call.

func (*EndpointApplyConfiguration) WithNodeName

WithNodeName sets the NodeName 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 NodeName field is set to the value of the last call.

func (*EndpointApplyConfiguration) WithTargetRef

WithTargetRef sets the TargetRef 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 TargetRef field is set to the value of the last call.

func (*EndpointApplyConfiguration) WithTopology

WithTopology puts the entries into the Topology 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 Topology field, overwriting an existing map entries in Topology field with the same key.

type EndpointConditionsApplyConfiguration

type EndpointConditionsApplyConfiguration struct {
	// ready indicates that this endpoint is prepared to receive traffic,
	// according to whatever system is managing the endpoint. A nil value
	// indicates an unknown state. In most cases consumers should interpret this
	// unknown state as ready. For compatibility reasons, ready should never be
	// "true" for terminating endpoints.
	Ready *bool `json:"ready,omitempty"`
	// serving is identical to ready except that it is set regardless of the
	// terminating state of endpoints. This condition should be set to true for
	// a ready endpoint that is terminating. If nil, consumers should defer to
	// the ready condition.
	Serving *bool `json:"serving,omitempty"`
	// terminating indicates that this endpoint is terminating. A nil value
	// indicates an unknown state. Consumers should interpret this unknown state
	// to mean that the endpoint is not terminating.
	Terminating *bool `json:"terminating,omitempty"`
}

EndpointConditionsApplyConfiguration represents a declarative configuration of the EndpointConditions type for use with apply.

EndpointConditions represents the current condition of an endpoint.

func EndpointConditions

func EndpointConditions() *EndpointConditionsApplyConfiguration

EndpointConditionsApplyConfiguration constructs a declarative configuration of the EndpointConditions type for use with apply.

func (*EndpointConditionsApplyConfiguration) WithReady

WithReady sets the Ready 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 Ready field is set to the value of the last call.

func (*EndpointConditionsApplyConfiguration) WithServing

WithServing sets the Serving 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 Serving field is set to the value of the last call.

func (*EndpointConditionsApplyConfiguration) WithTerminating

WithTerminating sets the Terminating 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 Terminating field is set to the value of the last call.

type EndpointHintsApplyConfiguration

type EndpointHintsApplyConfiguration struct {
	// forZones indicates the zone(s) this endpoint should be consumed by to
	// enable topology aware routing. May contain a maximum of 8 entries.
	ForZones []ForZoneApplyConfiguration `json:"forZones,omitempty"`
	// forNodes indicates the node(s) this endpoint should be consumed by when
	// using topology aware routing. May contain a maximum of 8 entries.
	ForNodes []ForNodeApplyConfiguration `json:"forNodes,omitempty"`
}

EndpointHintsApplyConfiguration represents a declarative configuration of the EndpointHints type for use with apply.

EndpointHints provides hints describing how an endpoint should be consumed.

func EndpointHints

func EndpointHints() *EndpointHintsApplyConfiguration

EndpointHintsApplyConfiguration constructs a declarative configuration of the EndpointHints type for use with apply.

func (*EndpointHintsApplyConfiguration) WithForNodes

WithForNodes adds the given value to the ForNodes 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 ForNodes field.

func (*EndpointHintsApplyConfiguration) WithForZones

WithForZones adds the given value to the ForZones 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 ForZones field.

type EndpointPortApplyConfiguration

type EndpointPortApplyConfiguration struct {
	// name represents the name of this port. All ports in an EndpointSlice must have a unique name.
	// If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name.
	// Name must either be an empty string or pass DNS_LABEL validation:
	// * must be no more than 63 characters long.
	// * must consist of lower case alphanumeric characters or '-'.
	// * must start and end with an alphanumeric character.
	// Default is empty string.
	Name *string `json:"name,omitempty"`
	// protocol represents the IP protocol for this port.
	// Must be UDP, TCP, or SCTP.
	// Default is TCP.
	Protocol *v1.Protocol `json:"protocol,omitempty"`
	// port represents the port number of the endpoint.
	// If this is not specified, ports are not restricted and must be
	// interpreted in the context of the specific consumer.
	Port *int32 `json:"port,omitempty"`
	// appProtocol represents the application protocol for this port.
	// This field follows standard Kubernetes label syntax.
	// Un-prefixed names are reserved for IANA standard service names (as per
	// RFC-6335 and https://www.iana.org/assignments/service-names).
	// Non-standard protocols should use prefixed names such as
	// mycompany.com/my-custom-protocol.
	AppProtocol *string `json:"appProtocol,omitempty"`
}

EndpointPortApplyConfiguration represents a declarative configuration of the EndpointPort type for use with apply.

EndpointPort represents a Port used by an EndpointSlice

func EndpointPort

func EndpointPort() *EndpointPortApplyConfiguration

EndpointPortApplyConfiguration constructs a declarative configuration of the EndpointPort type for use with apply.

func (*EndpointPortApplyConfiguration) WithAppProtocol

WithAppProtocol sets the AppProtocol 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 AppProtocol field is set to the value of the last call.

func (*EndpointPortApplyConfiguration) WithName

WithName sets the Name 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 Name field is set to the value of the last call.

func (*EndpointPortApplyConfiguration) WithPort

WithPort sets the Port 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 Port field is set to the value of the last call.

func (*EndpointPortApplyConfiguration) WithProtocol

WithProtocol sets the Protocol 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 Protocol field is set to the value of the last call.

type EndpointSliceApplyConfiguration

type EndpointSliceApplyConfiguration struct {
	v1.TypeMetaApplyConfiguration `json:",inline"`
	// Standard object's metadata.
	*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
	// addressType specifies the type of address carried by this EndpointSlice.
	// All addresses in this slice must be the same type. This field is
	// immutable after creation. The following address types are currently
	// supported:
	// * IPv4: Represents an IPv4 Address.
	// * IPv6: Represents an IPv6 Address.
	// * FQDN: Represents a Fully Qualified Domain Name.
	AddressType *discoveryv1beta1.AddressType `json:"addressType,omitempty"`
	// endpoints is a list of unique endpoints in this slice. Each slice may
	// include a maximum of 1000 endpoints.
	Endpoints []EndpointApplyConfiguration `json:"endpoints,omitempty"`
	// ports specifies the list of network ports exposed by each endpoint in
	// this slice. Each port must have a unique name. When ports is empty, it
	// indicates that there are no defined ports. When a port is defined with a
	// nil port value, it indicates "all ports". Each slice may include a
	// maximum of 100 ports.
	Ports []EndpointPortApplyConfiguration `json:"ports,omitempty"`
}

EndpointSliceApplyConfiguration represents a declarative configuration of the EndpointSlice type for use with apply.

EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.

func EndpointSlice

func EndpointSlice(name, namespace string) *EndpointSliceApplyConfiguration

EndpointSlice constructs a declarative configuration of the EndpointSlice type for use with apply.

func ExtractEndpointSlice

func ExtractEndpointSlice(endpointSlice *discoveryv1beta1.EndpointSlice, fieldManager string) (*EndpointSliceApplyConfiguration, error)

ExtractEndpointSlice extracts the applied configuration owned by fieldManager from endpointSlice. If no managedFields are found in endpointSlice for fieldManager, a EndpointSliceApplyConfiguration is returned with only the Name, Namespace (if applicable), APIVersion and Kind populated. It is possible that no managed fields were found for because other field managers have taken ownership of all the fields previously owned by fieldManager, or because the fieldManager never owned fields any fields. endpointSlice must be a unmodified EndpointSlice API object that was retrieved from the Kubernetes API. ExtractEndpointSlice provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.

func ExtractEndpointSliceFrom

func ExtractEndpointSliceFrom(endpointSlice *discoveryv1beta1.EndpointSlice, fieldManager string, subresource string) (*EndpointSliceApplyConfiguration, error)

ExtractEndpointSliceFrom extracts the applied configuration owned by fieldManager from endpointSlice for the specified subresource. Pass an empty string for subresource to extract the main resource. Common subresources include "status", "scale", etc. endpointSlice must be a unmodified EndpointSlice API object that was retrieved from the Kubernetes API. ExtractEndpointSliceFrom provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.

func (*EndpointSliceApplyConfiguration) GetAPIVersion

func (b *EndpointSliceApplyConfiguration) GetAPIVersion() *string

GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.

func (*EndpointSliceApplyConfiguration) GetKind

GetKind retrieves the value of the Kind field in the declarative configuration.

func (*EndpointSliceApplyConfiguration) GetName

GetName retrieves the value of the Name field in the declarative configuration.

func (*EndpointSliceApplyConfiguration) GetNamespace

func (b *EndpointSliceApplyConfiguration) GetNamespace() *string

GetNamespace retrieves the value of the Namespace field in the declarative configuration.

func (EndpointSliceApplyConfiguration) IsApplyConfiguration

func (b EndpointSliceApplyConfiguration) IsApplyConfiguration()

func (*EndpointSliceApplyConfiguration) WithAPIVersion

WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.

func (*EndpointSliceApplyConfiguration) WithAddressType

WithAddressType sets the AddressType 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 AddressType field is set to the value of the last call.

func (*EndpointSliceApplyConfiguration) WithAnnotations

WithAnnotations puts the entries into the Annotations 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 Annotations field, overwriting an existing map entries in Annotations field with the same key.

func (*EndpointSliceApplyConfiguration) WithCreationTimestamp

WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.

func (*EndpointSliceApplyConfiguration) WithDeletionGracePeriodSeconds

func (b *EndpointSliceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *EndpointSliceApplyConfiguration

WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.

func (*EndpointSliceApplyConfiguration) WithDeletionTimestamp

WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.

func (*EndpointSliceApplyConfiguration) WithEndpoints

WithEndpoints adds the given value to the Endpoints 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 Endpoints field.

func (*EndpointSliceApplyConfiguration) WithFinalizers

WithFinalizers adds the given value to the Finalizers 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 Finalizers field.

func (*EndpointSliceApplyConfiguration) WithGenerateName

WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.

func (*EndpointSliceApplyConfiguration) WithGeneration

WithGeneration sets the Generation 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 Generation field is set to the value of the last call.

func (*EndpointSliceApplyConfiguration) WithKind

WithKind sets the Kind 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 Kind field is set to the value of the last call.

func (*EndpointSliceApplyConfiguration) WithLabels

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 (*EndpointSliceApplyConfiguration) WithName

WithName sets the Name 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 Name field is set to the value of the last call.

func (*EndpointSliceApplyConfiguration) WithNamespace

WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.

func (*EndpointSliceApplyConfiguration) WithOwnerReferences

WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field.

func (*EndpointSliceApplyConfiguration) WithPorts

WithPorts adds the given value to the Ports 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 Ports field.

func (*EndpointSliceApplyConfiguration) WithResourceVersion

WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.

func (*EndpointSliceApplyConfiguration) WithUID

WithUID sets the UID 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 UID field is set to the value of the last call.

type ForNodeApplyConfiguration

type ForNodeApplyConfiguration struct {
	// name represents the name of the node.
	Name *string `json:"name,omitempty"`
}

ForNodeApplyConfiguration represents a declarative configuration of the ForNode type for use with apply.

ForNode provides information about which nodes should consume this endpoint.

func ForNode

func ForNode() *ForNodeApplyConfiguration

ForNodeApplyConfiguration constructs a declarative configuration of the ForNode type for use with apply.

func (*ForNodeApplyConfiguration) WithName

WithName sets the Name 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 Name field is set to the value of the last call.

type ForZoneApplyConfiguration

type ForZoneApplyConfiguration struct {
	// name represents the name of the zone.
	Name *string `json:"name,omitempty"`
}

ForZoneApplyConfiguration represents a declarative configuration of the ForZone type for use with apply.

ForZone provides information about which zones should consume this endpoint.

func ForZone

func ForZone() *ForZoneApplyConfiguration

ForZoneApplyConfiguration constructs a declarative configuration of the ForZone type for use with apply.

func (*ForZoneApplyConfiguration) WithName

WithName sets the Name 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 Name field is set to the value of the last call.

Source Files

endpoint.go endpointconditions.go endpointhints.go endpointport.go endpointslice.go fornode.go forzone.go

Version
v0.35.3
Published
Mar 19, 2026
Platform
linux/amd64
Imports
8 packages
Last checked
2 hours ago

Tools for package owners.