Documentation ¶
Index ¶
- func DefaultService(name, namespace string, so ...ServiceOption) *v1.Service
- func MarkActive(r *v1.Revision)
- func MarkCertificateNotOwned(r *v1.Route)
- func MarkCertificateNotReady(r *v1.Route)
- func MarkCertificateReady(r *v1.Route)
- func MarkConfigurationNotOwned(service *v1.Service)
- func MarkConfigurationNotReconciled(service *v1.Service)
- func MarkContainerMissing(rev *v1.Revision)
- func MarkInRollout(r *v1.Route)
- func MarkIngressNotConfigured(r *v1.Route)
- func MarkIngressReady(r *v1.Route)
- func MarkRevisionNameTaken(service *v1.Service)
- func MarkRevisionReady(r *v1.Revision)
- func MarkRouteNotOwned(service *v1.Service)
- func MarkServiceNotOwned(r *v1.Route)
- func MarkTrafficAssigned(r *v1.Route)
- func Revision(namespace, name string, ro ...RevisionOption) *v1.Revision
- func Route(namespace, name string, ro ...RouteOption) *v1.Route
- func Service(name, namespace string, so ...ServiceOption) *v1.Service
- func ServiceWithoutNamespace(name string, so ...ServiceOption) *v1.Service
- func WithAddress(r *v1.Route)
- func WithAnotherDomain(r *v1.Route)
- func WithConfigDeletionTimestamp(r *v1.Configuration)
- func WithConfigObservedGen(cfg *v1.Configuration)
- func WithConfigOwnersRemoved(cfg *v1.Configuration)
- func WithHTTPSDomain(r *v1.Route)
- func WithInitRevConditions(r *v1.Revision)
- func WithInitRouteConditions(rt *v1.Route)
- func WithInitSvcConditions(s *v1.Service)
- func WithLocalDomain(r *v1.Route)
- func WithLogURL(r *v1.Revision)
- func WithNamedRevision(s *v1.Service)
- func WithOutOfDateConfig(s *v1.Service)
- func WithReadyCertificateName(name string) func(*v1.Route)
- func WithReadyRoute(s *v1.Service)
- func WithRevisionDeletionTimestamp(r *v1.Revision)
- func WithRouteConditionsAutoTLSDisabled(rt *v1.Route)
- func WithRouteConditionsHTTPDowngrade(rt *v1.Route)
- func WithRouteConditionsTLSNotEnabledForClusterLocalMessage(rt *v1.Route)
- func WithRouteFinalizer(r *v1.Route)
- func WithRouteObservedGeneration(r *v1.Route)
- func WithRouteOwnersRemoved(r *v1.Route)
- func WithRunLatestRollout(s *v1.Service)
- func WithServiceDefaults(svc *v1.Service)
- func WithServiceDeletionTimestamp(r *v1.Service)
- func WithServiceObservedGenFailure(s *v1.Service)
- func WithServiceObservedGeneration(svc *v1.Service)
- func WithServiceStatusRouteNotReady(s *v1.Service)
- func WithSvcStatusAddress(s *v1.Service)
- func WithSvcStatusDomain(s *v1.Service)
- func WithURL(r *v1.Route)
- type ConfigOption
- func MarkLatestCreatedFailed(msg string) ConfigOption
- func MarkRevisionCreationFailed(msg string) ConfigOption
- func WithConfigAnn(key, value string) ConfigOption
- func WithConfigContainerConcurrency(cc int64) ConfigOption
- func WithConfigEnv(evs ...corev1.EnvVar) ConfigOption
- func WithConfigGeneration(gen int64) ConfigOption
- func WithConfigLabel(key, value string) ConfigOption
- func WithConfigReadinessProbe(p *corev1.Probe) ConfigOption
- func WithConfigRevisionTimeoutSeconds(revisionTimeoutSeconds int64) ConfigOption
- func WithLatestCreated(name string) ConfigOption
- func WithLatestReady(name string) ConfigOption
- type RevisionOption
- func MarkActivating(reason, message string) RevisionOption
- func MarkContainerExiting(exitCode int32, message string) RevisionOption
- func MarkDeploying(reason string) RevisionOption
- func MarkInactive(reason, message string) RevisionOption
- func MarkProgressDeadlineExceeded(message string) RevisionOption
- func MarkResourceNotOwned(kind, name string) RevisionOption
- func MarkResourcesUnavailable(reason, message string) RevisionOption
- func WithContainerStatuses(containerStatus []v1.ContainerStatus) RevisionOption
- func WithCreationTimestamp(t time.Time) RevisionOption
- func WithImagePullSecrets(secretName string) RevisionOption
- func WithRevContainerConcurrency(cc int64) RevisionOption
- func WithRevName(name string) RevisionOption
- func WithRevStatus(st v1.RevisionStatus) RevisionOption
- func WithRevisionAnn(key, value string) RevisionOption
- func WithRevisionInitContainers() RevisionOption
- func WithRevisionLabel(key, value string) RevisionOption
- func WithRevisionObservedGeneration(gen int64) RevisionOption
- func WithRevisionPVC() RevisionOption
- func WithRevisionPreserveAnnotation() RevisionOption
- func WithRoutingState(s v1.RoutingState, c clock.PassiveClock) RevisionOption
- func WithRoutingStateModified(t time.Time) RevisionOption
- type RouteOption
- func MarkConfigurationFailed(name string) RouteOption
- func MarkConfigurationNotReady(name string) RouteOption
- func MarkMissingTrafficTarget(kind, revision string) RouteOption
- func MarkUnknownTrafficError(msg string) RouteOption
- func WithConfigTarget(config string) RouteOption
- func WithHost(host string) RouteOption
- func WithIngressClass(ingressClass string) RouteOption
- func WithPropagatedStatus(status netv1alpha1.IngressStatus) RouteOption
- func WithRevTarget(revision string) RouteOption
- func WithRouteAnnotation(annotations map[string]string) RouteOption
- func WithRouteDeletionTimestamp(t *metav1.Time) RouteOption
- func WithRouteGeneration(generation int64) RouteOption
- func WithRouteLabel(labels map[string]string) RouteOption
- func WithRouteUID(uid types.UID) RouteOption
- func WithSpecTraffic(traffic ...v1.TrafficTarget) RouteOption
- func WithStatusTraffic(traffic ...v1.TrafficTarget) RouteOption
- type ServiceOption
- func WithBYORevisionName(name string) ServiceOption
- func WithConfigAnnotations(annotations map[string]string) ServiceOption
- func WithConfigSpec(config *v1.ConfigurationSpec) ServiceOption
- func WithEnv(evs ...corev1.EnvVar) ServiceOption
- func WithEnvFrom(evs ...corev1.EnvFromSource) ServiceOption
- func WithFailedConfig(name, reason, message string) ServiceOption
- func WithFailedRoute(reason, message string) ServiceOption
- func WithInitContainer(p corev1.Container) ServiceOption
- func WithNamedPort(name string) ServiceOption
- func WithNumberedPort(number int32) ServiceOption
- func WithPodSecurityContext(secCtx corev1.PodSecurityContext) ServiceOption
- func WithReadinessProbe(p *corev1.Probe) ServiceOption
- func WithReadyConfig(name string) ServiceOption
- func WithResourceRequirements(resourceRequirements corev1.ResourceRequirements) ServiceOption
- func WithRevisionTimeoutSeconds(revisionTimeoutSeconds int64) ServiceOption
- func WithRouteSpec(route v1.RouteSpec) ServiceOption
- func WithSecurityContext(sc *corev1.SecurityContext) ServiceOption
- func WithServiceAccountName(serviceAccountName string) ServiceOption
- func WithServiceAnnotation(k, v string) ServiceOption
- func WithServiceAnnotationRemoved(k string) ServiceOption
- func WithServiceAnnotations(annotations map[string]string) ServiceOption
- func WithServiceGeneration(generation int64) ServiceOption
- func WithServiceImage(img string) ServiceOption
- func WithServiceLabel(key, value string) ServiceOption
- func WithServiceLatestReadyRevision(lrr string) ServiceOption
- func WithServiceTemplateMeta(m metav1.ObjectMeta) ServiceOption
- func WithSvcStatusTraffic(targets ...v1.TrafficTarget) ServiceOption
- func WithTrafficTarget(tt []v1.TrafficTarget) 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 DefaultService ¶ added in v0.13.0
func DefaultService(name, namespace string, so ...ServiceOption) *v1.Service
DefaultService creates a service with ServiceOptions and with default values set
func MarkActive ¶ added in v0.13.0
MarkActive calls .Status.MarkActive on the Revision.
func MarkCertificateNotOwned ¶ added in v0.13.0
MarkCertificateNotOwned calls the method of the same name on .Status
func MarkCertificateNotReady ¶ added in v0.13.0
MarkCertificateNotReady calls the method of the same name on .Status
func MarkCertificateReady ¶ added in v0.13.0
MarkCertificateReady calls the method of the same name on .Status
func MarkConfigurationNotOwned ¶ added in v0.13.0
MarkConfigurationNotOwned calls the function of the same name on the Service's status.
func MarkConfigurationNotReconciled ¶ added in v0.13.0
MarkConfigurationNotReconciled calls the function of the same name on the Service's status.
func MarkContainerMissing ¶ added in v0.13.0
MarkContainerMissing calls .Status.MarkContainerMissing on the Revision.
func MarkInRollout ¶ added in v0.30.2
MarkInRollout marks the route to be in process of rolling out.
func MarkIngressNotConfigured ¶ added in v0.13.0
MarkIngressNotConfigured calls the method of the same name on .Status
func MarkIngressReady ¶ added in v0.13.0
MarkIngressReady propagates a Ready=True Ingress status to the Route.
func MarkRevisionNameTaken ¶ added in v0.13.0
MarkRevisionNameTaken calls the function of the same name on the Service's status
func MarkRevisionReady ¶ added in v0.13.0
MarkRevisionReady calls the necessary helpers to make the Revision Ready=True.
func MarkRouteNotOwned ¶ added in v0.13.0
MarkRouteNotOwned calls the function of the same name on the Service's status.
func MarkServiceNotOwned ¶ added in v0.13.0
MarkServiceNotOwned calls the function of the same name on the Service's status.
func MarkTrafficAssigned ¶ added in v0.13.0
MarkTrafficAssigned calls the method of the same name on .Status
func Revision ¶ added in v0.30.2
func Revision(namespace, name string, ro ...RevisionOption) *v1.Revision
Revision creates a revision object with given ns/name and options.
func Route ¶ added in v0.13.0
func Route(namespace, name string, ro ...RouteOption) *v1.Route
Route creates a route with RouteOptions
func Service ¶
func Service(name, namespace string, so ...ServiceOption) *v1.Service
Service creates a service with ServiceOptions
func ServiceWithoutNamespace ¶
func ServiceWithoutNamespace(name string, so ...ServiceOption) *v1.Service
ServiceWithoutNamespace creates a service with ServiceOptions but without a specific namespace
func WithAddress ¶ added in v0.13.0
WithAddress sets the .Status.Address field to the prototypical internal hostname.
func WithAnotherDomain ¶ added in v0.13.0
WithAnotherDomain sets the .Status.Domain field to an atypical domain.
func WithConfigDeletionTimestamp ¶ added in v0.13.0
func WithConfigDeletionTimestamp(r *v1.Configuration)
WithConfigDeletionTimestamp sets the DeletionTimestamp on the Config.
func WithConfigObservedGen ¶ added in v0.30.2
func WithConfigObservedGen(cfg *v1.Configuration)
WithConfigObservedGen sets the observed generation of the Configuration.
func WithConfigOwnersRemoved ¶ added in v0.13.0
func WithConfigOwnersRemoved(cfg *v1.Configuration)
WithConfigOwnersRemoved clears the owner references of this Configuration.
func WithHTTPSDomain ¶ added in v0.13.0
WithHTTPSDomain sets the .Status.URL field to a https-domain based on the name and namespace.
func WithInitRevConditions ¶ added in v0.13.0
WithInitRevConditions calls .Status.InitializeConditions() on a Revision.
func WithInitRouteConditions ¶ added in v0.13.0
WithInitRouteConditions initializes the Service's conditions.
func WithInitSvcConditions ¶ added in v0.13.0
WithInitSvcConditions initializes the Service's conditions.
func WithLocalDomain ¶ added in v0.13.0
WithLocalDomain sets the .Status.Domain field to use ClusterDomain suffix.
func WithLogURL ¶ added in v0.13.0
WithLogURL sets the .Status.LogURL to the expected value.
func WithNamedRevision ¶ added in v0.13.0
WithNamedRevision configures the Service to use BYO Revision in the template spec and reference that same revision name in the route spec.
func WithOutOfDateConfig ¶ added in v0.13.0
WithOutOfDateConfig reflects the Configuration's readiness in the Service resource.
func WithReadyCertificateName ¶ added in v0.13.0
WithReadyCertificateName marks the certificate specified by name as ready.
func WithReadyRoute ¶ added in v0.13.0
WithReadyRoute reflects the Route's readiness in the Service resource.
func WithRevisionDeletionTimestamp ¶ added in v0.13.0
WithRevisionDeletionTimestamp will set the DeletionTimestamp on the Revision.
func WithRouteConditionsAutoTLSDisabled ¶ added in v0.30.2
WithRouteConditionsAutoTLSDisabled calls MarkTLSNotEnabled with AutoTLSNotEnabledMessage after initialized the Service's conditions.
func WithRouteConditionsHTTPDowngrade ¶ added in v0.30.2
WithRouteConditionsHTTPDowngrade calls MarkHTTPDowngrade after initialized the Service's conditions.
func WithRouteConditionsTLSNotEnabledForClusterLocalMessage ¶ added in v0.30.2
WithRouteConditionsTLSNotEnabledForClusterLocalMessage calls MarkTLSNotEnabled with TLSNotEnabledForClusterLocalMessage after initialized the Service's conditions.
func WithRouteFinalizer ¶ added in v0.13.0
WithRouteFinalizer adds the Route finalizer to the Route.
func WithRouteObservedGeneration ¶ added in v0.13.0
WithRouteObservedGeneration sets the route's observed generation to it's generation
func WithRouteOwnersRemoved ¶ added in v0.13.0
WithRouteOwnersRemoved clears the owner references of this Route.
func WithRunLatestRollout ¶ added in v0.13.0
WithRunLatestRollout configures the Service to use a "runLatest" rollout.
func WithServiceDefaults ¶ added in v0.12.0
WithServiceDefaults will set the default values on the service.
func WithServiceDeletionTimestamp ¶ added in v0.13.0
WithServiceDeletionTimestamp will set the DeletionTimestamp on the Service.
func WithServiceObservedGenFailure ¶ added in v0.30.2
WithServiceObservedGenFailure marks the top level condition as unknown when the reconciler does not set any condition during reconciliation of a new generation.
func WithServiceObservedGeneration ¶ added in v0.13.0
WithServiceObservedGeneration sets the service's observed generation to it's generation
func WithServiceStatusRouteNotReady ¶ added in v0.13.0
WithServiceStatusRouteNotReady sets the `RoutesReady` condition on the service to `Unknown`.
func WithSvcStatusAddress ¶ added in v0.13.0
WithSvcStatusAddress updates the service's status with the address.
func WithSvcStatusDomain ¶ added in v0.13.0
WithSvcStatusDomain propagates the domain name to the status of the Service.
Types ¶
type ConfigOption ¶
type ConfigOption func(*v1.Configuration)
ConfigOption enables further configuration of a Configuration.
func MarkLatestCreatedFailed ¶ added in v0.13.0
func MarkLatestCreatedFailed(msg string) ConfigOption
MarkLatestCreatedFailed calls .Status.MarkLatestCreatedFailed.
func MarkRevisionCreationFailed ¶ added in v0.13.0
func MarkRevisionCreationFailed(msg string) ConfigOption
MarkRevisionCreationFailed calls .Status.MarkRevisionCreationFailed.
func WithConfigAnn ¶ added in v0.30.2
func WithConfigAnn(key, value string) ConfigOption
WithConfigAnn attaches a particular label to the configuration.
func WithConfigContainerConcurrency ¶ added in v0.13.0
func WithConfigContainerConcurrency(cc int64) ConfigOption
WithConfigContainerConcurrency sets the given Configuration's concurrency.
func WithConfigEnv ¶ added in v0.14.0
func WithConfigEnv(evs ...corev1.EnvVar) ConfigOption
WithConfigEnv configures the Service to use the provided environment variables.
func WithConfigGeneration ¶ added in v0.30.2
func WithConfigGeneration(gen int64) ConfigOption
WithConfigGeneration sets the generation of the Configuration.
func WithConfigLabel ¶ added in v0.13.0
func WithConfigLabel(key, value string) ConfigOption
WithConfigLabel attaches a particular label to the configuration.
func WithConfigReadinessProbe ¶
func WithConfigReadinessProbe(p *corev1.Probe) ConfigOption
WithConfigReadinessProbe sets the provided probe to be the readiness probe on the configuration.
func WithConfigRevisionTimeoutSeconds ¶ added in v0.14.0
func WithConfigRevisionTimeoutSeconds(revisionTimeoutSeconds int64) ConfigOption
WithConfigRevisionTimeoutSeconds sets revision timeout.
func WithLatestCreated ¶ added in v0.13.0
func WithLatestCreated(name string) ConfigOption
WithLatestCreated initializes the .status.latestCreatedRevisionName to be the name of the latest revision that the Configuration would have created.
func WithLatestReady ¶ added in v0.13.0
func WithLatestReady(name string) ConfigOption
WithLatestReady initializes the .status.latestReadyRevisionName to be the name of the latest revision that the Configuration would have created.
type RevisionOption ¶ added in v0.13.0
RevisionOption enables further configuration of a Revision.
func MarkActivating ¶ added in v0.13.0
func MarkActivating(reason, message string) RevisionOption
MarkActivating calls .Status.MarkActivating on the Revision.
func MarkContainerExiting ¶ added in v0.13.0
func MarkContainerExiting(exitCode int32, message string) RevisionOption
MarkContainerExiting calls .Status.MarkContainerExiting on the Revision.
func MarkDeploying ¶ added in v0.13.0
func MarkDeploying(reason string) RevisionOption
MarkDeploying calls .Status.MarkDeploying on the Revision.
func MarkInactive ¶ added in v0.13.0
func MarkInactive(reason, message string) RevisionOption
MarkInactive calls .Status.MarkInactive on the Revision.
func MarkProgressDeadlineExceeded ¶ added in v0.13.0
func MarkProgressDeadlineExceeded(message string) RevisionOption
MarkProgressDeadlineExceeded calls the method of the same name on the Revision with the message we expect the Revision Reconciler to pass.
func MarkResourceNotOwned ¶ added in v0.13.0
func MarkResourceNotOwned(kind, name string) RevisionOption
MarkResourceNotOwned calls the function of the same name on the Revision's status.
func MarkResourcesUnavailable ¶ added in v0.13.0
func MarkResourcesUnavailable(reason, message string) RevisionOption
MarkResourcesUnavailable calls .Status.MarkResourcesUnavailable on the Revision.
func WithContainerStatuses ¶ added in v0.30.2
func WithContainerStatuses(containerStatus []v1.ContainerStatus) RevisionOption
WithContainerStatuses sets the .Status.ContainerStatuses to the Revision.
func WithCreationTimestamp ¶ added in v0.13.0
func WithCreationTimestamp(t time.Time) RevisionOption
WithCreationTimestamp sets the Revision's timestamp to the provided time. TODO(mattmoor): Ideally this could be a more generic Option and use meta.Accessor, but unfortunately Go's type system cannot support that.
func WithImagePullSecrets ¶ added in v0.13.0
func WithImagePullSecrets(secretName string) RevisionOption
WithImagePullSecrets updates the revision spec ImagePullSecrets to the provided secrets
func WithRevContainerConcurrency ¶ added in v0.13.0
func WithRevContainerConcurrency(cc int64) RevisionOption
WithRevContainerConcurrency sets the given Revision's concurrency.
func WithRevName ¶ added in v0.13.0
func WithRevName(name string) RevisionOption
WithRevName sets the name of the revision
func WithRevStatus ¶ added in v0.13.0
func WithRevStatus(st v1.RevisionStatus) RevisionOption
WithRevStatus is a generic escape hatch for creating hard-to-craft status orientations.
func WithRevisionAnn ¶ added in v0.30.2
func WithRevisionAnn(key, value string) RevisionOption
WithRevisionAnn attaches a particular label to the revision.
func WithRevisionInitContainers ¶ added in v0.30.2
func WithRevisionInitContainers() RevisionOption
func WithRevisionLabel ¶ added in v0.13.0
func WithRevisionLabel(key, value string) RevisionOption
WithRevisionLabel attaches a particular label to the revision.
func WithRevisionObservedGeneration ¶ added in v0.30.2
func WithRevisionObservedGeneration(gen int64) RevisionOption
WithRevisionObservedGeneration sets the observed generation on the revision status.
func WithRevisionPVC ¶ added in v0.30.2
func WithRevisionPVC() RevisionOption
func WithRevisionPreserveAnnotation ¶ added in v0.30.2
func WithRevisionPreserveAnnotation() RevisionOption
WithRevisionPreserveAnnotation updates the annotation with preserve key.
func WithRoutingState ¶ added in v0.30.2
func WithRoutingState(s v1.RoutingState, c clock.PassiveClock) RevisionOption
WithRoutingState updates the annotation to the provided timestamp.
func WithRoutingStateModified ¶ added in v0.30.2
func WithRoutingStateModified(t time.Time) RevisionOption
WithRoutingStateModified updates the annotation to the provided timestamp.
type RouteOption ¶
RouteOption enables further configuration of a Route.
func MarkConfigurationFailed ¶ added in v0.13.0
func MarkConfigurationFailed(name string) RouteOption
MarkConfigurationFailed calls the method of the same name on .Status
func MarkConfigurationNotReady ¶ added in v0.13.0
func MarkConfigurationNotReady(name string) RouteOption
MarkConfigurationNotReady calls the method of the same name on .Status
func MarkMissingTrafficTarget ¶ added in v0.13.0
func MarkMissingTrafficTarget(kind, revision string) RouteOption
MarkMissingTrafficTarget calls the method of the same name on .Status
func MarkUnknownTrafficError ¶ added in v0.30.2
func MarkUnknownTrafficError(msg string) RouteOption
MarkUnknownTrafficError calls the method of the same name on .Status
func WithConfigTarget ¶ added in v0.13.0
func WithConfigTarget(config string) RouteOption
WithConfigTarget sets the Route's traffic block to point at a particular Configuration.
func WithHost ¶ added in v0.30.2
func WithHost(host string) RouteOption
WithHost sets the .Status.Domain field with domain from arg.
func WithIngressClass ¶ added in v0.13.0
func WithIngressClass(ingressClass string) RouteOption
WithIngressClass sets the ingress class annotation on the Route.
func WithPropagatedStatus ¶ added in v0.13.3
func WithPropagatedStatus(status netv1alpha1.IngressStatus) RouteOption
WithPropagatedStatus propagates the given IngressStatus into the routes status.
func WithRevTarget ¶ added in v0.13.0
func WithRevTarget(revision string) RouteOption
WithRevTarget sets the Route's traffic block to point at a particular Revision.
func WithRouteAnnotation ¶ added in v0.13.0
func WithRouteAnnotation(annotations map[string]string) RouteOption
WithRouteAnnotation sets the specified annotation on the Route.
func WithRouteDeletionTimestamp ¶ added in v0.13.0
func WithRouteDeletionTimestamp(t *metav1.Time) RouteOption
WithRouteDeletionTimestamp adds the Route finalizer to the Route.
func WithRouteGeneration ¶ added in v0.13.0
func WithRouteGeneration(generation int64) RouteOption
WithRouteGeneration sets the route's generation
func WithRouteLabel ¶ added in v0.13.0
func WithRouteLabel(labels map[string]string) RouteOption
WithRouteLabel sets the specified label on the Route.
func WithRouteUID ¶ added in v0.13.0
func WithRouteUID(uid types.UID) RouteOption
WithRouteUID sets the Route's UID
func WithSpecTraffic ¶ added in v0.13.0
func WithSpecTraffic(traffic ...v1.TrafficTarget) RouteOption
WithSpecTraffic sets the Route's traffic block to the specified traffic targets.
func WithStatusTraffic ¶ added in v0.13.0
func WithStatusTraffic(traffic ...v1.TrafficTarget) RouteOption
WithStatusTraffic sets the Route's status traffic block to the specified traffic targets.
type ServiceOption ¶
ServiceOption enables further configuration of a Service.
func WithBYORevisionName ¶ added in v0.14.0
func WithBYORevisionName(name string) ServiceOption
WithBYORevisionName sets the given name to the config spec
func WithConfigAnnotations ¶ added in v0.14.0
func WithConfigAnnotations(annotations map[string]string) ServiceOption
WithConfigAnnotations assigns config annotations to a service
func WithConfigSpec ¶ added in v0.13.0
func WithConfigSpec(config *v1.ConfigurationSpec) ServiceOption
WithConfigSpec configures the Service to use the given config spec
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 WithFailedConfig ¶ added in v0.13.0
func WithFailedConfig(name, reason, message string) ServiceOption
WithFailedConfig reflects the Configuration's failure in the Service resource. The failing revision's name is reflected in LatestCreated.
func WithFailedRoute ¶ added in v0.13.0
func WithFailedRoute(reason, message string) ServiceOption
WithFailedRoute reflects a Route's failure in the Service resource.
func WithInitContainer ¶ added in v0.30.2
func WithInitContainer(p corev1.Container) ServiceOption
WithInitContainer adds init container to a service.
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 WithPodSecurityContext ¶ added in v0.30.2
func WithPodSecurityContext(secCtx corev1.PodSecurityContext) ServiceOption
WithPodSecurityContext assigns security context to a service.
func WithReadinessProbe ¶ added in v0.14.0
func WithReadinessProbe(p *corev1.Probe) ServiceOption
WithReadinessProbe sets the provided probe to be the readiness probe on the service.
func WithReadyConfig ¶ added in v0.13.0
func WithReadyConfig(name string) ServiceOption
WithReadyConfig reflects the Configuration's readiness in the Service resource. This must coincide with the setting of Latest{Created,Ready} to the provided revision name.
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 WithRouteSpec ¶ added in v0.13.0
func WithRouteSpec(route v1.RouteSpec) ServiceOption
WithRouteSpec configures the Service to use the given route spec
func WithSecurityContext ¶
func WithSecurityContext(sc *corev1.SecurityContext) ServiceOption
WithSecurityContext configures the Service to use the provided security context.
func WithServiceAccountName ¶
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 WithServiceAnnotations ¶ added in v0.13.0
func WithServiceAnnotations(annotations map[string]string) ServiceOption
WithServiceAnnotations adds the supplied annotations to the Service
func WithServiceGeneration ¶ added in v0.13.0
func WithServiceGeneration(generation int64) ServiceOption
WithServiceGeneration sets the service's generation
func WithServiceImage ¶
func WithServiceImage(img string) ServiceOption
WithServiceImage sets the container image to be the provided string.
func WithServiceLabel ¶ added in v0.13.0
func WithServiceLabel(key, value string) ServiceOption
WithServiceLabel attaches a particular label to the service.
func WithServiceLatestReadyRevision ¶ added in v0.13.0
func WithServiceLatestReadyRevision(lrr string) ServiceOption
WithServiceLatestReadyRevision sets the latest ready revision on the Service's status.
func WithServiceTemplateMeta ¶
func WithServiceTemplateMeta(m metav1.ObjectMeta) ServiceOption
WithServiceTemplateMeta sets the container image to be the provided string.
func WithSvcStatusTraffic ¶ added in v0.13.0
func WithSvcStatusTraffic(targets ...v1.TrafficTarget) ServiceOption
WithSvcStatusTraffic sets the Service's status traffic block to the specified traffic targets.
func WithTrafficTarget ¶ added in v0.30.2
func WithTrafficTarget(tt []v1.TrafficTarget) ServiceOption
WithTrafficTarget sets the traffic to be the provided traffic target.
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.