package v1

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

Index

Types

type EndpointApplyConfiguration

type EndpointApplyConfiguration struct {
	// addresses of this endpoint. For EndpointSlices of addressType "IPv4" or "IPv6",
	// the values are IP addresses in canonical form. The syntax and semantics of
	// other addressType values are not defined. This must contain at least one
	// address but no more than 100. EndpointSlices generated by the EndpointSlice
	// controller will always have exactly 1 address. No semantics are defined for
	// additional addresses beyond the first, and kube-proxy does not look at them.
	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 *corev1.ObjectReferenceApplyConfiguration `json:"targetRef,omitempty"`
	// deprecatedTopology contains topology information part of the v1beta1
	// API. This field is deprecated, and will be removed when the v1beta1
	// API is removed (no sooner than kubernetes v1.24).  While this field can
	// hold values, it is not writable through the v1 API, and any attempts to
	// write to it will be silently ignored. Topology information can be found
	// in the zone and nodeName fields instead.
	DeprecatedTopology map[string]string `json:"deprecatedTopology,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"`
	// zone is the name of the Zone this endpoint exists in.
	Zone *string `json:"zone,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) WithDeprecatedTopology

func (b *EndpointApplyConfiguration) WithDeprecatedTopology(entries map[string]string) *EndpointApplyConfiguration

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

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) WithZone

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

type EndpointConditionsApplyConfiguration

type EndpointConditionsApplyConfiguration struct {
	// ready indicates that this endpoint is ready to receive traffic,
	// according to whatever system is managing the endpoint. A nil value
	// should be interpreted as "true". In general, an endpoint should be
	// marked ready if it is serving and not terminating, though this can
	// be overridden in some cases, such as when the associated Service has
	// set the publishNotReadyAddresses flag.
	Ready *bool `json:"ready,omitempty"`
	// serving indicates that this endpoint is able to receive traffic,
	// according to whatever system is managing the endpoint. For endpoints
	// backed by pods, the EndpointSlice controller will mark the endpoint
	// as serving if the pod's Ready condition is True. A nil value should be
	// interpreted as "true".
	Serving *bool `json:"serving,omitempty"`
	// terminating indicates that this endpoint is terminating. A nil value
	// should be interpreted as "false".
	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 when
	// using 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 *corev1.Protocol `json:"protocol,omitempty"`
	// port represents the port number of the endpoint.
	// If the EndpointSlice is derived from a Kubernetes service, this must be set
	// to the service's target port. EndpointSlices used for other purposes may have
	// a nil port.
	Port *int32 `json:"port,omitempty"`
	// The application protocol for this port.
	// This is used as a hint for implementations to offer richer behavior for protocols that they understand.
	// This field follows standard Kubernetes label syntax.
	// Valid values are either:
	//
	// * Un-prefixed protocol names - reserved for IANA standard service names (as per
	// RFC-6335 and https://www.iana.org/assignments/service-names).
	//
	// * Kubernetes-defined prefixed names:
	// * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-
	// * 'kubernetes.io/ws'  - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455
	// * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455
	//
	// * Other protocols should use implementation-defined 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 {
	metav1.TypeMetaApplyConfiguration `json:",inline"`
	// Standard object's metadata.
	*metav1.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. (Deprecated)
	// The EndpointSlice controller only generates, and kube-proxy only processes,
	// slices of addressType "IPv4" and "IPv6". No semantics are defined for
	// the "FQDN" type.
	AddressType *discoveryv1.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. Each slice may include a
	// maximum of 100 ports.
	// Services always have at least 1 port, so EndpointSlices generated by the
	// EndpointSlice controller will likewise always have at least 1 port.
	// EndpointSlices used for other purposes may have an empty ports list.
	Ports []EndpointPortApplyConfiguration `json:"ports,omitempty"`
}

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

EndpointSlice represents a set of service endpoints. Most EndpointSlices are created by the EndpointSlice controller to represent the Pods selected by Service objects. For a given service there may be multiple EndpointSlice objects which must be joined to produce the full set of endpoints; you can find all of the slices for a given service by listing EndpointSlices in the service's namespace whose `kubernetes.io/service-name` label contains the service's name.

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 *discoveryv1.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 *discoveryv1.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.0
Published
Dec 17, 2025
Platform
linux/amd64
Imports
8 packages
Last checked
21 seconds ago

Tools for package owners.