Documentation ¶
Index ¶
- func DefaultService(name, namespace string, so ...ServiceOption) *v1alpha1.Service
- func MarkActive(r *v1alpha1.Revision)
- func MarkCertificateNotOwned(r *v1alpha1.Route)
- func MarkCertificateNotReady(r *v1alpha1.Route)
- func MarkCertificateReady(r *v1alpha1.Route)
- func MarkConfigurationNotOwned(service *v1alpha1.Service)
- func MarkConfigurationNotReconciled(service *v1alpha1.Service)
- func MarkContainerMissing(rev *v1alpha1.Revision)
- func MarkIngressNotConfigured(r *v1alpha1.Route)
- func MarkIngressReady(r *v1alpha1.Route)
- func MarkRevisionNameTaken(service *v1alpha1.Service)
- func MarkRevisionReady(r *v1alpha1.Revision)
- func MarkRouteNotOwned(service *v1alpha1.Service)
- func MarkServiceNotOwned(r *v1alpha1.Route)
- func MarkTrafficAssigned(r *v1alpha1.Route)
- func Route(namespace, name string, ro ...RouteOption) *v1alpha1.Route
- func Service(name, namespace string, so ...ServiceOption) *v1alpha1.Service
- func ServiceWithoutNamespace(name string, so ...ServiceOption) *v1alpha1.Service
- func WithAddress(r *v1alpha1.Route)
- func WithAnotherDomain(r *v1alpha1.Route)
- func WithConfigDeletionTimestamp(r *v1alpha1.Configuration)
- func WithConfigOwnersRemoved(cfg *v1alpha1.Configuration)
- func WithHTTPSDomain(r *v1alpha1.Route)
- func WithInitRevConditions(r *v1alpha1.Revision)
- func WithInitRouteConditions(rt *v1alpha1.Route)
- func WithInitSvcConditions(s *v1alpha1.Service)
- func WithInlineNamedRevision(s *v1alpha1.Service)
- func WithInlineRollout(s *v1alpha1.Service)
- func WithLocalDomain(r *v1alpha1.Route)
- func WithLogURL(r *v1alpha1.Revision)
- func WithObservedGen(cfg *v1alpha1.Configuration)
- func WithOutOfDateConfig(s *v1alpha1.Service)
- func WithReadyCertificateName(name string) func(*v1alpha1.Route)
- func WithReadyRoute(s *v1alpha1.Service)
- func WithRevisionDeletionTimestamp(r *v1alpha1.Revision)
- func WithRouteFinalizer(r *v1alpha1.Route)
- func WithRouteObservedGeneration(r *v1alpha1.Route)
- func WithRouteOwnersRemoved(r *v1alpha1.Route)
- func WithRunLatestRollout(s *v1alpha1.Service)
- func WithServiceDefaults(svc *v1alpha1.Service)
- func WithServiceDeletionTimestamp(r *v1alpha1.Service)
- func WithServiceObservedGeneration(svc *v1alpha1.Service)
- func WithServiceStatusRouteNotReady(s *v1alpha1.Service)
- func WithSvcStatusAddress(s *v1alpha1.Service)
- func WithSvcStatusDomain(s *v1alpha1.Service)
- func WithURL(r *v1alpha1.Route)
- type ConfigOption
- func MarkLatestCreatedFailed(msg string) ConfigOption
- func MarkRevisionCreationFailed(msg string) ConfigOption
- func WithConfigContainerConcurrency(cc int64) ConfigOption
- func WithConfigEnv(evs ...corev1.EnvVar) ConfigOption
- func WithConfigLabel(key, value string) ConfigOption
- func WithConfigReadinessProbe(p *corev1.Probe) ConfigOption
- func WithConfigRevisionTimeoutSeconds(revisionTimeoutSeconds int64) ConfigOption
- func WithCreatedAndReady(created, ready string) ConfigOption
- func WithGeneration(gen 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 WithCreationTimestamp(t time.Time) RevisionOption
- func WithImagePullSecrets(secretName string) RevisionOption
- func WithLastPinned(t time.Time) RevisionOption
- func WithRevContainerConcurrency(cc int64) RevisionOption
- func WithRevName(name string) RevisionOption
- func WithRevStatus(st v1alpha1.RevisionStatus) RevisionOption
- func WithRevisionLabel(key, value string) RevisionOption
- func WithServiceName(sn string) RevisionOption
- type RouteOption
- func MarkConfigurationFailed(name string) RouteOption
- func MarkConfigurationNotReady(name string) RouteOption
- func MarkMissingTrafficTarget(kind, revision string) RouteOption
- func WithConfigTarget(config string) RouteOption
- func WithIngressClass(ingressClass string) RouteOption
- func WithRevTarget(revision string) RouteOption
- func WithRouteAnnotation(annotation map[string]string) RouteOption
- func WithRouteGeneration(generation int64) RouteOption
- func WithRouteLabel(labels map[string]string) RouteOption
- func WithRouteUID(uid types.UID) RouteOption
- func WithSpecTraffic(traffic ...v1alpha1.TrafficTarget) RouteOption
- func WithStatusTraffic(traffic ...v1alpha1.TrafficTarget) RouteOption
- type ServiceOption
- func WithConfigAnnotations(annotations map[string]string) ServiceOption
- func WithContainerConcurrency(cc int) 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 WithInlineConfigSpec(config v1alpha1.ConfigurationSpec) ServiceOption
- func WithInlineRouteSpec(config v1alpha1.RouteSpec) ServiceOption
- func WithNamedPort(name string) ServiceOption
- func WithNumberedPort(number int32) ServiceOption
- func WithPinnedRollout(name string) ServiceOption
- func WithPinnedRolloutConfigSpec(name string, config v1alpha1.ConfigurationSpec) ServiceOption
- func WithReadinessProbe(p *corev1.Probe) ServiceOption
- func WithReadyConfig(name string) ServiceOption
- func WithReleaseRollout(names ...string) ServiceOption
- func WithReleaseRolloutAndPercentage(percentage int, names ...string) ServiceOption
- func WithReleaseRolloutAndPercentageConfigSpec(percentage int, config v1alpha1.ConfigurationSpec, names ...string) ServiceOption
- func WithResourceRequirements(resourceRequirements corev1.ResourceRequirements) ServiceOption
- func WithRevisionTimeoutSeconds(revisionTimeoutSeconds int64) ServiceOption
- func WithRouteStatus(targets ...v1alpha1.TrafficTarget) ServiceOption
- func WithRunLatestConfigSpec(config v1alpha1.ConfigurationSpec) ServiceOption
- func WithSecurityContext(sc *corev1.SecurityContext) ServiceOption
- func WithServiceAnnotations(annotations map[string]string) ServiceOption
- func WithServiceGeneration(generation int64) ServiceOption
- func WithServiceLabel(key, value string) ServiceOption
- func WithServiceLatestReadyRevision(lrr string) ServiceOption
- func WithSvcStatusTraffic(targets ...v1alpha1.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 ¶
func DefaultService(name, namespace string, so ...ServiceOption) *v1alpha1.Service
DefaultService creates a service with ServiceOptions and with default values set
func MarkActive ¶
MarkActive calls .Status.MarkActive on the Revision.
func MarkCertificateNotOwned ¶
MarkCertificateNotOwned calls the method of the same name on .Status
func MarkCertificateNotReady ¶
MarkCertificateNotReady calls the method of the same name on .Status
func MarkCertificateReady ¶
MarkCertificateReady calls the method of the same name on .Status
func MarkConfigurationNotOwned ¶
MarkConfigurationNotOwned calls the function of the same name on the Service's status.
func MarkConfigurationNotReconciled ¶
MarkConfigurationNotReconciled calls the function of the same name on the Service's status.
func MarkContainerMissing ¶
MarkContainerMissing calls .Status.MarkContainerMissing on the Revision.
func MarkIngressNotConfigured ¶
MarkIngressNotConfigured calls the method of the same name on .Status
func MarkIngressReady ¶
MarkIngressReady propagates a Ready=True Ingress status to the Route.
func MarkRevisionNameTaken ¶
MarkRevisionNameTake calls the function of the same name on the Service's status
func MarkRevisionReady ¶
MarkRevisionReady calls the necessary helpers to make the Revision Ready=True.
func MarkRouteNotOwned ¶
MarkRouteNotOwned calls the function of the same name on the Service's status.
func MarkServiceNotOwned ¶
MarkServiceNotOwned calls the function of the same name on the Service's status.
func MarkTrafficAssigned ¶
MarkTrafficAssigned calls the method of the same name on .Status
func Route ¶
func Route(namespace, name string, ro ...RouteOption) *v1alpha1.Route
Route creates a route with RouteOptions
func Service ¶
func Service(name, namespace string, so ...ServiceOption) *v1alpha1.Service
Service creates a service with ServiceOptions
func ServiceWithoutNamespace ¶
func ServiceWithoutNamespace(name string, so ...ServiceOption) *v1alpha1.Service
ServiceWithoutNamespace creates a service with ServiceOptions but without a specific namespace
func WithAddress ¶
WithAddress sets the .Status.Address field to the prototypical internal hostname.
func WithAnotherDomain ¶
WithAnotherDomain sets the .Status.Domain field to an atypical domain.
func WithConfigDeletionTimestamp ¶
func WithConfigDeletionTimestamp(r *v1alpha1.Configuration)
WithConfigDeletionTimestamp will set the DeletionTimestamp on the Config.
func WithConfigOwnersRemoved ¶
func WithConfigOwnersRemoved(cfg *v1alpha1.Configuration)
WithConfigOwnersRemoved clears the owner references of this Configuration.
func WithHTTPSDomain ¶
func WithInitRevConditions ¶
WithInitRevConditions calls .Status.InitializeConditions() on a Revision.
func WithInitRouteConditions ¶
WithInitRouteConditions initializes the Service's conditions.
func WithInitSvcConditions ¶
WithInitSvcConditions initializes the Service's conditions.
func WithInlineNamedRevision ¶
WithInlineNamedRevision configures the Service to use BYO Revision in the template spec and reference that same revision name in the route spec.
func WithInlineRollout ¶
WithInlineRollout configures the Service to be "run latest" via inline Route/Configuration
func WithLocalDomain ¶
WithLocalDomain sets the .Status.Domain field to use `svc.cluster.local` suffix.
func WithLogURL ¶
WithLogURL sets the .Status.LogURL to the expected value.
func WithObservedGen ¶
func WithObservedGen(cfg *v1alpha1.Configuration)
WithObservedGen sets the observed generation of the Configuration.
func WithOutOfDateConfig ¶
WithOutOfDateConfig reflects the Configuration's readiness in the Service resource.
func WithReadyCertificateName ¶
WithReadyCertificateName marks the certificate specified by name as ready.
func WithReadyRoute ¶
WithReadyRoute reflects the Route's readiness in the Service resource.
func WithRevisionDeletionTimestamp ¶
WithRevisionDeletionTimestamp will set the DeletionTimestamp on the Revision.
func WithRouteFinalizer ¶
WithRouteFinalizer adds the Route finalizer to the Route.
func WithRouteObservedGeneration ¶
WithRouteObservedGeneneration sets the route's observed generation to it's generation
func WithRouteOwnersRemoved ¶
WithRouteOwnersRemoved clears the owner references of this Route.
func WithRunLatestRollout ¶
WithRunLatestRollout configures the Service to use a "runLatest" rollout.
func WithServiceDefaults ¶
WithServiceDefaults will set the default values on the service.
func WithServiceDeletionTimestamp ¶
WithServiceDeletionTimestamp will set the DeletionTimestamp on the Service.
func WithServiceObservedGeneration ¶
WithServiceGeneration sets the service's observed generation to it's generation
func WithServiceStatusRouteNotReady ¶
WithServiceStatusRouteNotReady sets the `RoutesReady` condition on the service to `Unknown`.
func WithSvcStatusAddress ¶
WithSvcStatusAddress updates the service's status with the address.
func WithSvcStatusDomain ¶
WithSvcStatusDomain propagates the domain name to the status of the Service.
Types ¶
type ConfigOption ¶
type ConfigOption func(*v1alpha1.Configuration)
ConfigOption enables further configuration of a Configuration.
func MarkLatestCreatedFailed ¶
func MarkLatestCreatedFailed(msg string) ConfigOption
MarkLatestCreatedFailed calls .Status.MarkLatestCreatedFailed.
func MarkRevisionCreationFailed ¶
func MarkRevisionCreationFailed(msg string) ConfigOption
MarkRevisionCreationFailed calls .Status.MarkRevisionCreationFailed.
func WithConfigContainerConcurrency ¶
func WithConfigContainerConcurrency(cc int64) ConfigOption
WithConfigContainerConcurrency sets the given Configuration's concurrency.
func WithConfigEnv ¶
func WithConfigEnv(evs ...corev1.EnvVar) ConfigOption
WithConfigEnv configures the Service to use the provided environment variables.
func WithConfigLabel ¶
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 ¶
func WithConfigRevisionTimeoutSeconds(revisionTimeoutSeconds int64) ConfigOption
WithConfigRevisionTimeoutSeconds sets revision timeout.
func WithCreatedAndReady ¶
func WithCreatedAndReady(created, ready string) ConfigOption
WithCreatedAndReady sets the latest{Created,Ready}RevisionName on the Configuration.
func WithGeneration ¶
func WithGeneration(gen int64) ConfigOption
WithGeneration sets the generation of the Configuration.
func WithLatestCreated ¶
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 ¶
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 ¶
RevisionOption enables further configuration of a Revision.
func MarkActivating ¶
func MarkActivating(reason, message string) RevisionOption
MarkActivating calls .Status.MarkActivating on the Revision.
func MarkContainerExiting ¶
func MarkContainerExiting(exitCode int32, message string) RevisionOption
MarkContainerExiting calls .Status.MarkContainerExiting on the Revision.
func MarkDeploying ¶
func MarkDeploying(reason string) RevisionOption
MarkDeploying calls .Status.MarkDeploying on the Revision.
func MarkInactive ¶
func MarkInactive(reason, message string) RevisionOption
MarkInactive calls .Status.MarkInactive on the Revision.
func MarkProgressDeadlineExceeded ¶
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 ¶
func MarkResourceNotOwned(kind, name string) RevisionOption
MarkResourceNotOwned calls the function of the same name on the Revision's status.
func MarkResourcesUnavailable ¶
func MarkResourcesUnavailable(reason, message string) RevisionOption
MarkResourcesUnavailable calls .Status.MarkResourcesUnavailable on the Revision.
func WithCreationTimestamp ¶
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 ¶
func WithImagePullSecrets(secretName string) RevisionOption
WithImagePullSecrets updates the revision spec ImagePullSecrets to the provided secrets
func WithLastPinned ¶
func WithLastPinned(t time.Time) RevisionOption
WithLastPinned updates the "last pinned" annotation to the provided timestamp.
func WithRevContainerConcurrency ¶
func WithRevContainerConcurrency(cc int64) RevisionOption
WithRevContainerConcurrency sets the given Revision's concurrency.
func WithRevName ¶
func WithRevName(name string) RevisionOption
WithRevName sets the name of the revision
func WithRevStatus ¶
func WithRevStatus(st v1alpha1.RevisionStatus) RevisionOption
WithRevStatus is a generic escape hatch for creating hard-to-craft status orientations.
func WithRevisionLabel ¶
func WithRevisionLabel(key, value string) RevisionOption
WithRevisionLabel attaches a particular label to the revision.
func WithServiceName ¶
func WithServiceName(sn string) RevisionOption
WithServiceName propagates the given service name to the revision status.
type RouteOption ¶
RouteOption enables further configuration of a Route.
func MarkConfigurationFailed ¶
func MarkConfigurationFailed(name string) RouteOption
MarkConfigurationFailed calls the method of the same name on .Status
func MarkConfigurationNotReady ¶
func MarkConfigurationNotReady(name string) RouteOption
MarkConfigurationNotReady calls the method of the same name on .Status
func MarkMissingTrafficTarget ¶
func MarkMissingTrafficTarget(kind, revision string) RouteOption
MarkMissingTrafficTarget calls the method of the same name on .Status
func WithConfigTarget ¶
func WithConfigTarget(config string) RouteOption
WithConfigTarget sets the Route's traffic block to point at a particular Configuration.
func WithIngressClass ¶
func WithIngressClass(ingressClass string) RouteOption
WithIngressClass sets the ingress class annotation on the Route.
func WithRevTarget ¶
func WithRevTarget(revision string) RouteOption
WithRevTarget sets the Route's traffic block to point at a particular Revision.
func WithRouteAnnotation ¶
func WithRouteAnnotation(annotation map[string]string) RouteOption
WithRouteAnnotation sets the specified annotation on the Route.
func WithRouteGeneration ¶
func WithRouteGeneration(generation int64) RouteOption
WithRouteGeneration sets the route's generation
func WithRouteLabel ¶
func WithRouteLabel(labels map[string]string) RouteOption
WithRouteLabel sets the specified label on the Route.
func WithSpecTraffic ¶
func WithSpecTraffic(traffic ...v1alpha1.TrafficTarget) RouteOption
WithSpecTraffic sets the Route's traffic block to the specified traffic targets.
func WithStatusTraffic ¶
func WithStatusTraffic(traffic ...v1alpha1.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 WithConfigAnnotations ¶
func WithConfigAnnotations(annotations map[string]string) ServiceOption
WithConfigAnnotations assigns config annotations to a service
func WithContainerConcurrency ¶
func WithContainerConcurrency(cc int) ServiceOption
WithContainerConcurrency sets the container concurrency on the resource.
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 ¶
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 ¶
func WithFailedRoute(reason, message string) ServiceOption
WithFailedRoute reflects a Route's failure in the Service resource.
func WithInlineConfigSpec ¶
func WithInlineConfigSpec(config v1alpha1.ConfigurationSpec) ServiceOption
WithInlineConfigSpec configures the Service to use the given config spec
func WithInlineRouteSpec ¶
func WithInlineRouteSpec(config v1alpha1.RouteSpec) ServiceOption
WithInlineRouteSpec configures the Service to use the given route spec
func WithNamedPort ¶
func WithNamedPort(name string) ServiceOption
WithNamedPort sets the Service's port name to what's provided.
func WithNumberedPort ¶
func WithNumberedPort(number int32) ServiceOption
WithNumberedPort sets the Service's port number to what's provided.
func WithPinnedRollout ¶
func WithPinnedRollout(name string) ServiceOption
WithPinnedRollout configures the Service to use a "pinned" rollout, which is pinned to the named revision. Deprecated, since PinnedType is deprecated.
func WithPinnedRolloutConfigSpec ¶
func WithPinnedRolloutConfigSpec(name string, config v1alpha1.ConfigurationSpec) ServiceOption
WithPinnedRolloutConfigSpec WithPinnedRollout2
func WithReadinessProbe ¶
func WithReadinessProbe(p *corev1.Probe) ServiceOption
WithReadinessProbe sets the provided probe to be the readiness probe on the service.
func WithReadyConfig ¶
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 WithReleaseRollout ¶
func WithReleaseRollout(names ...string) ServiceOption
WithReleaseRollout configures the Service to use a "release" rollout, which spans the provided revisions.
func WithReleaseRolloutAndPercentage ¶
func WithReleaseRolloutAndPercentage(percentage int, names ...string) ServiceOption
WithReleaseRolloutAndPercentage configures the Service to use a "release" rollout, which spans the provided revisions.
func WithReleaseRolloutAndPercentageConfigSpec ¶
func WithReleaseRolloutAndPercentageConfigSpec(percentage int, config v1alpha1.ConfigurationSpec, names ...string) ServiceOption
WithReleaseRolloutAndPercentageConfigSpec configures the Service to use a "release" rollout, which spans the provided revisions.
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 WithRouteStatus ¶
func WithRouteStatus(targets ...v1alpha1.TrafficTarget) ServiceOption
WithRouteStatus sets the Service's status's route status field traffic block to the specified traffic targets.
func WithRunLatestConfigSpec ¶
func WithRunLatestConfigSpec(config v1alpha1.ConfigurationSpec) ServiceOption
WithRunLatestConfigSpec configures the Service to use a "runLatest" configuration
func WithSecurityContext ¶
func WithSecurityContext(sc *corev1.SecurityContext) ServiceOption
WithSecurityContext configures the Service to use the provided security context.
func WithServiceAnnotations ¶
func WithServiceAnnotations(annotations map[string]string) ServiceOption
func WithServiceGeneration ¶
func WithServiceGeneration(generation int64) ServiceOption
WithServiceGeneration sets the service's generation
func WithServiceLabel ¶
func WithServiceLabel(key, value string) ServiceOption
WithServiceLabel attaches a particular label to the service.
func WithServiceLatestReadyRevision ¶
func WithServiceLatestReadyRevision(lrr string) ServiceOption
WithServiceLatestReadyRevision sets the latest ready revision on the Service's status.
func WithSvcStatusTraffic ¶
func WithSvcStatusTraffic(targets ...v1alpha1.TrafficTarget) ServiceOption
WithSvcStatusTraffic sets the Service's status traffic block to the specified traffic targets.
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.