servicespec

package
v1.28.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package servicespec contains various utilities to deal with Service Specs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder enables users to create a serviceTemplate starting from a baseline and adding patches

func New

func New() *Builder

New creates a new empty serviceTemplate builder

func NewFrom

func NewFrom(serviceTemplate *apiv1.ServiceTemplateSpec) *Builder

NewFrom creates a serviceTemplate builder from a certain Service template

func (*Builder) Build

func (builder *Builder) Build() *apiv1.ServiceTemplateSpec

Build gets the final ServiceTemplate

func (*Builder) SetPGBouncerSelector added in v1.24.0

func (builder *Builder) SetPGBouncerSelector(name string) *Builder

SetPGBouncerSelector overwrites the selectors field with the PgbouncerNameLabel selector.

func (*Builder) SetSelectors added in v1.24.0

func (builder *Builder) SetSelectors(selectors map[string]string) *Builder

SetSelectors overwrites the selector fields

func (*Builder) WithAnnotation

func (builder *Builder) WithAnnotation(name, value string) *Builder

WithAnnotation adds an annotation to the current status

func (*Builder) WithLabel

func (builder *Builder) WithLabel(name, value string) *Builder

WithLabel adds a label to the current status

func (*Builder) WithServicePort

func (builder *Builder) WithServicePort(value *corev1.ServicePort) *Builder

WithServicePort adds a port to the current service

func (*Builder) WithServicePortNoOverwrite added in v1.23.3

func (builder *Builder) WithServicePortNoOverwrite(value *corev1.ServicePort) *Builder

WithServicePortNoOverwrite adds a ServicePort to the current service if no ServicePort that matches the name or port value is found

func (*Builder) WithServiceType

func (builder *Builder) WithServiceType(serviceType corev1.ServiceType, overwrite bool) *Builder

WithServiceType adds a service type to the current status

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL