Documentation
¶
Overview ¶
Package servicespec contains various utilities to deal with Service Specs
Index ¶
- type Builder
- func (builder *Builder) Build() *apiv1.ServiceTemplateSpec
- func (builder *Builder) WithAnnotation(name, value string) *Builder
- func (builder *Builder) WithLabel(name, value string) *Builder
- func (builder *Builder) WithSelector(name string, overwrite bool) *Builder
- func (builder *Builder) WithServicePort(value *corev1.ServicePort) *Builder
- func (builder *Builder) WithServiceType(serviceType corev1.ServiceType, overwrite bool) *Builder
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 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 ¶
WithAnnotation adds an annotation to the current status
func (*Builder) WithSelector ¶
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
Click to show internal directories.
Click to hide internal directories.