v1beta1

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Service

func Service(name, namespace string, so ...ServiceOption) *v1beta1.Service

Service creates a service with ServiceOptions

func ServiceWithoutNamespace

func ServiceWithoutNamespace(name string, so ...ServiceOption) *v1beta1.Service

ServiceWithoutNamespace creates a service with ServiceOptions but without a specific namespace

Types

type ConfigOption

type ConfigOption func(*v1beta1.Configuration)

ConfigOption enables further configuration of a Configuration.

func WithConfigImage

func WithConfigImage(img string) ConfigOption

WithConfigImage sets the container image to be the provided string.

func WithConfigReadinessProbe

func WithConfigReadinessProbe(p *corev1.Probe) ConfigOption

WithConfigReadinessProbe sets the provided probe to be the readiness probe on the configuration.

type RouteOption

type RouteOption func(*v1beta1.Route)

RouteOption enables further configuration of a Route.

type ServiceOption

type ServiceOption func(*v1beta1.Service)

ServiceOption enables further configuration of a Service.

func WithContainerConcurrency

func WithContainerConcurrency(cc v1beta1.RevisionContainerConcurrencyType) ServiceOption

WithContainerConcurrency sets the given Service's concurrency.

func WithEnv

func WithEnv(evs ...corev1.EnvVar) ServiceOption

WithEnv configures the Service to use the provided environment variables.

func WithEnvFrom

func WithEnvFrom(evs ...corev1.EnvFromSource) ServiceOption

WithEnvFrom configures the Service to use the provided environment variables.

func WithInlineConfigSpec

func WithInlineConfigSpec(config v1beta1.ConfigurationSpec) ServiceOption

WithInlineConfigSpec confgures the Service to use the given config spec

func WithNamedPort

func WithNamedPort(name string) ServiceOption

WithNamedPort sets the name on the Service's port to the provided name

func WithNumberedPort

func WithNumberedPort(number int32) ServiceOption

WithNumberedPort sets the Service's port number to what's provided.

func WithResourceRequirements

func WithResourceRequirements(resourceRequirements corev1.ResourceRequirements) ServiceOption

WithResourceRequirements attaches resource requirements to the service

func WithRevisionTimeoutSeconds

func WithRevisionTimeoutSeconds(revisionTimeoutSeconds int64) ServiceOption

WithRevisionTimeoutSeconds sets revision timeout

func WithSecurityContext

func WithSecurityContext(sc *corev1.SecurityContext) ServiceOption

WithSecurityContext configures the Service to use the provided security context.

func WithServiceAccountName added in v0.8.0

func WithServiceAccountName(serviceAccountName string) ServiceOption

WithServiceAccountName sets revision service account name

func WithServiceAnnotation

func WithServiceAnnotation(k, v string) ServiceOption

WithServiceAnnotation adds the given annotation to the service.

func WithServiceAnnotationRemoved

func WithServiceAnnotationRemoved(k string) ServiceOption

WithServiceAnnotationRemoved adds the given annotation to the service.

func WithServiceImage

func WithServiceImage(img string) ServiceOption

WithServiceImage sets the container image to be the provided string.

func WithServiceTemplateMeta

func WithServiceTemplateMeta(m metav1.ObjectMeta) ServiceOption

WithServiceTemplateMeta sets the container image to be the provided string.

func WithVolume

func WithVolume(name, mountPath string, volumeSource corev1.VolumeSource) ServiceOption

WithVolume adds a volume to the service

func WithWorkingDir

func WithWorkingDir(wd string) ServiceOption

WithWorkingDir configures the Service to use the provided working directory.

Jump to

Keyboard shortcuts

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