Documentation ¶
Index ¶
- func Service(name, namespace string, so ...ServiceOption) *v1beta1.Service
- func ServiceWithoutNamespace(name string, so ...ServiceOption) *v1beta1.Service
- func WithServiceDefaults(svc *v1beta1.Service)
- type ConfigOption
- type RouteOption
- type ServiceOption
- func WithContainerConcurrency(cc int64) ServiceOption
- func WithEnv(evs ...corev1.EnvVar) ServiceOption
- func WithEnvFrom(evs ...corev1.EnvFromSource) ServiceOption
- func WithInlineConfigSpec(config v1.ConfigurationSpec) ServiceOption
- func WithNamedPort(name string) ServiceOption
- func WithNumberedPort(number int32) ServiceOption
- func WithResourceRequirements(resourceRequirements corev1.ResourceRequirements) ServiceOption
- func WithRevisionTimeoutSeconds(revisionTimeoutSeconds int64) ServiceOption
- func WithSecurityContext(sc *corev1.SecurityContext) ServiceOption
- func WithServiceAccountName(serviceAccountName string) ServiceOption
- func WithServiceAnnotation(k, v string) ServiceOption
- func WithServiceAnnotationRemoved(k string) ServiceOption
- func WithServiceImage(img string) ServiceOption
- func WithServiceTemplateMeta(m metav1.ObjectMeta) ServiceOption
- func WithVolume(name, mountPath string, volumeSource corev1.VolumeSource) ServiceOption
- func WithWorkingDir(wd string) ServiceOption
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
func WithServiceDefaults ¶ added in v0.12.0
WithServiceDefaults will set the default values on the service.
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 ¶
RouteOption enables further configuration of a Route.
type ServiceOption ¶
ServiceOption enables further configuration of a Service.
func WithContainerConcurrency ¶
func WithContainerConcurrency(cc int64) 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 v1.ConfigurationSpec) ServiceOption
WithInlineConfigSpec configures 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.