servicespec

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 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) 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) WithSelector

func (builder *Builder) WithSelector(name string, overwrite bool) *Builder

WithSelector adds a selector to the current status

func (*Builder) WithServicePort

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

WithServicePort adds a port to the current status

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