Documentation ¶
Overview ¶
Package v1 contains the Serving v1 API types.
Index ¶
- Constants
- Variables
- func ExitCodeReason(exitCode int32) string
- func HasDefaultConfigurationName(ctx context.Context) bool
- func IsConfigurationCondition(t apis.ConditionType) bool
- func IsRevisionCondition(t apis.ConditionType) bool
- func IsRouteCondition(t apis.ConditionType) bool
- func IsServiceCondition(t apis.ConditionType) bool
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- func ResourceNotOwnedMessage(kind, name string) string
- func RevisionContainerExitingMessage(message string) string
- func RevisionContainerMissingMessage(image string, message string) string
- func RoutingStateModifiedString(t time.Time) string
- func WithDefaultConfigurationName(ctx context.Context) context.Context
- func WithPreviousConfigurationSpec(ctx context.Context, spec *ConfigurationSpec) context.Context
- type Configuration
- func (sink *Configuration) ConvertFrom(_ context.Context, source apis.Convertible) error
- func (source *Configuration) ConvertTo(_ context.Context, sink apis.Convertible) error
- func (in *Configuration) DeepCopy() *Configuration
- func (in *Configuration) DeepCopyInto(out *Configuration)
- func (in *Configuration) DeepCopyObject() runtime.Object
- func (*Configuration) GetConditionSet() apis.ConditionSet
- func (*Configuration) GetGroupVersionKind() schema.GroupVersionKind
- func (t *Configuration) GetStatus() *duckv1.Status
- func (c *Configuration) IsFailed() bool
- func (c *Configuration) IsLatestReadyRevisionNameUpToDate() bool
- func (c *Configuration) IsReady() bool
- func (c *Configuration) SetDefaults(ctx context.Context)
- func (c *Configuration) Validate(ctx context.Context) (errs *apis.FieldError)
- type ConfigurationList
- type ConfigurationSpec
- func (in *ConfigurationSpec) DeepCopy() *ConfigurationSpec
- func (in *ConfigurationSpec) DeepCopyInto(out *ConfigurationSpec)
- func (cs *ConfigurationSpec) GetTemplate() *RevisionTemplateSpec
- func (cs *ConfigurationSpec) SetDefaults(ctx context.Context)
- func (cs *ConfigurationSpec) Validate(ctx context.Context) *apis.FieldError
- type ConfigurationStatus
- func (in *ConfigurationStatus) DeepCopy() *ConfigurationStatus
- func (in *ConfigurationStatus) DeepCopyInto(out *ConfigurationStatus)
- func (cs *ConfigurationStatus) InitializeConditions()
- func (cs *ConfigurationStatus) MarkLatestCreatedFailed(name, message string)
- func (cs *ConfigurationStatus) MarkLatestReadyDeleted()
- func (cs *ConfigurationStatus) MarkRevisionCreationFailed(message string)
- func (cs *ConfigurationStatus) SetLatestCreatedRevisionName(name string)
- func (cs *ConfigurationStatus) SetLatestReadyRevisionName(name string)
- type ConfigurationStatusFields
- type ContainerStatus
- type Revision
- func (sink *Revision) ConvertFrom(_ context.Context, source apis.Convertible) error
- func (source *Revision) ConvertTo(_ context.Context, sink apis.Convertible) error
- func (in *Revision) DeepCopy() *Revision
- func (in *Revision) DeepCopyInto(out *Revision)
- func (in *Revision) DeepCopyObject() runtime.Object
- func (*Revision) GetConditionSet() apis.ConditionSet
- func (r *Revision) GetGroupVersionKind() schema.GroupVersionKind
- func (r *Revision) GetProtocol() net.ProtocolType
- func (r *Revision) GetRoutingState() RoutingState
- func (r *Revision) GetRoutingStateModified() time.Time
- func (t *Revision) GetStatus() *duckv1.Status
- func (r *Revision) IsFailed() bool
- func (r *Revision) IsReady() bool
- func (r *Revision) SetDefaults(ctx context.Context)
- func (r *Revision) SetRoutingState(state RoutingState, tm time.Time)
- func (r *Revision) Validate(ctx context.Context) *apis.FieldError
- func (r *Revision) ValidateLabels() (errs *apis.FieldError)
- type RevisionList
- type RevisionSpec
- func (in *RevisionSpec) DeepCopy() *RevisionSpec
- func (in *RevisionSpec) DeepCopyInto(out *RevisionSpec)
- func (rs *RevisionSpec) GetContainer() *corev1.Container
- func (rs *RevisionSpec) GetContainerConcurrency() int64
- func (rs *RevisionSpec) GetSidecarContainers() []*corev1.Container
- func (rs *RevisionSpec) SetDefaults(ctx context.Context)
- func (rs *RevisionSpec) Validate(ctx context.Context) *apis.FieldError
- type RevisionStatus
- func (in *RevisionStatus) DeepCopy() *RevisionStatus
- func (in *RevisionStatus) DeepCopyInto(out *RevisionStatus)
- func (rs *RevisionStatus) InitializeConditions()
- func (rs *RevisionStatus) IsActivationRequired() bool
- func (rs *RevisionStatus) MarkActiveFalse(reason, message string)
- func (rs *RevisionStatus) MarkActiveTrue()
- func (rs *RevisionStatus) MarkActiveUnknown(reason, message string)
- func (rs *RevisionStatus) MarkContainerHealthyFalse(reason, message string)
- func (rs *RevisionStatus) MarkContainerHealthyTrue()
- func (rs *RevisionStatus) MarkContainerHealthyUnknown(reason, message string)
- func (rs *RevisionStatus) MarkResourcesAvailableFalse(reason, message string)
- func (rs *RevisionStatus) MarkResourcesAvailableTrue()
- func (rs *RevisionStatus) MarkResourcesAvailableUnknown(reason, message string)
- func (rs *RevisionStatus) PropagateAutoscalerStatus(ps *autoscalingv1alpha1.PodAutoscalerStatus)
- func (rs *RevisionStatus) PropagateDeploymentStatus(original *appsv1.DeploymentStatus)
- func (rs *RevisionStatus) Validate(_ context.Context) *apis.FieldError
- type RevisionTemplateSpec
- func (in *RevisionTemplateSpec) DeepCopy() *RevisionTemplateSpec
- func (in *RevisionTemplateSpec) DeepCopyInto(out *RevisionTemplateSpec)
- func (rts *RevisionTemplateSpec) SetDefaults(ctx context.Context)
- func (rts *RevisionTemplateSpec) Validate(ctx context.Context) *apis.FieldError
- func (rts *RevisionTemplateSpec) VerifyNameChange(_ context.Context, og *RevisionTemplateSpec) *apis.FieldError
- type Route
- func (sink *Route) ConvertFrom(_ context.Context, source apis.Convertible) error
- func (source *Route) ConvertTo(_ context.Context, sink apis.Convertible) error
- func (in *Route) DeepCopy() *Route
- func (in *Route) DeepCopyInto(out *Route)
- func (in *Route) DeepCopyObject() runtime.Object
- func (*Route) GetConditionSet() apis.ConditionSet
- func (r *Route) GetGroupVersionKind() schema.GroupVersionKind
- func (t *Route) GetStatus() *duckv1.Status
- func (r *Route) IsFailed() bool
- func (r *Route) IsReady() bool
- func (r *Route) RolloutDuration() time.Duration
- func (r *Route) SetDefaults(ctx context.Context)
- func (r *Route) Validate(ctx context.Context) *apis.FieldError
- type RouteList
- type RouteSpec
- type RouteStatus
- func (in *RouteStatus) DeepCopy() *RouteStatus
- func (in *RouteStatus) DeepCopyInto(out *RouteStatus)
- func (rs *RouteStatus) InitializeConditions()
- func (rs *RouteStatus) MarkCertificateNotOwned(name string)
- func (rs *RouteStatus) MarkCertificateNotReady(c *v1alpha1.Certificate)
- func (rs *RouteStatus) MarkCertificateProvisionFailed(c *v1alpha1.Certificate)
- func (rs *RouteStatus) MarkCertificateReady(name string)
- func (rs *RouteStatus) MarkConfigurationFailed(name string)
- func (rs *RouteStatus) MarkConfigurationNotReady(name string)
- func (rs *RouteStatus) MarkEndpointNotOwned(name string)
- func (rs *RouteStatus) MarkHTTPDowngrade(name string)
- func (rs *RouteStatus) MarkIngressNotConfigured()
- func (rs *RouteStatus) MarkIngressRolloutInProgress()
- func (rs *RouteStatus) MarkMissingTrafficTarget(kind, name string)
- func (rs *RouteStatus) MarkRevisionFailed(name string)
- func (rs *RouteStatus) MarkRevisionNotReady(name string)
- func (rs *RouteStatus) MarkRevisionTargetTrafficError(reason, msg string)
- func (rs *RouteStatus) MarkServiceNotOwned(name string)
- func (rs *RouteStatus) MarkTLSNotEnabled(msg string)
- func (rs *RouteStatus) MarkTrafficAssigned()
- func (rs *RouteStatus) MarkUnknownTrafficError(msg string)
- func (rs *RouteStatus) PropagateIngressStatus(cs v1alpha1.IngressStatus)
- type RouteStatusFields
- type RoutingState
- type Service
- func (sink *Service) ConvertFrom(_ context.Context, source apis.Convertible) error
- func (source *Service) ConvertTo(_ context.Context, sink apis.Convertible) error
- func (in *Service) DeepCopy() *Service
- func (in *Service) DeepCopyInto(out *Service)
- func (in *Service) DeepCopyObject() runtime.Object
- func (*Service) GetConditionSet() apis.ConditionSet
- func (s *Service) GetGroupVersionKind() schema.GroupVersionKind
- func (t *Service) GetStatus() *duckv1.Status
- func (s *Service) IsFailed() bool
- func (s *Service) IsReady() bool
- func (s *Service) SetDefaults(ctx context.Context)
- func (s *Service) Validate(ctx context.Context) (errs *apis.FieldError)
- type ServiceList
- type ServiceSpec
- type ServiceStatus
- func (in *ServiceStatus) DeepCopy() *ServiceStatus
- func (in *ServiceStatus) DeepCopyInto(out *ServiceStatus)
- func (ss *ServiceStatus) InitializeConditions()
- func (ss *ServiceStatus) MarkConfigurationNotOwned(name string)
- func (ss *ServiceStatus) MarkConfigurationNotReconciled()
- func (ss *ServiceStatus) MarkRevisionNameTaken(name string)
- func (ss *ServiceStatus) MarkRouteNotOwned(name string)
- func (ss *ServiceStatus) MarkRouteNotReconciled()
- func (ss *ServiceStatus) MarkRouteNotYetReady()
- func (ss *ServiceStatus) PropagateConfigurationStatus(cs *ConfigurationStatus)
- func (ss *ServiceStatus) PropagateRouteStatus(rs *RouteStatus)
- type TrafficTarget
Constants ¶
const ( // DefaultUserPort is the system default port value exposed on the user-container. DefaultUserPort = 8080 // UserPortName is the name that will be used for the Port on the // Deployment and Pod created by a Revision. This name will be set regardless of if // a user specifies a port or the default value is chosen. UserPortName = "user-port" // QueueAdminPortName specifies the port name for // health check and lifecycle hooks for queue-proxy. QueueAdminPortName = "http-queueadm" // AutoscalingQueueMetricsPortName specifies the port name to use for metrics // emitted by queue-proxy for autoscaler. AutoscalingQueueMetricsPortName = "http-autometric" // UserQueueMetricsPortName specifies the port name to use for metrics // emitted by queue-proxy for end user. UserQueueMetricsPortName = "http-usermetric" )
const ( // ReasonContainerMissing defines the reason for marking container healthiness status // as false if the a container image for the revision is missing. ReasonContainerMissing = "ContainerMissing" // ReasonResolvingDigests defines the reason for marking container healthiness status // as unknown if the digests for the container images are being resolved. ReasonResolvingDigests = "ResolvingDigests" // ReasonDeploying defines the reason for marking revision availability status as // unknown if the revision is still deploying. ReasonDeploying = "Deploying" // ReasonNotOwned defines the reason for marking revision availability status as // false due to resource ownership issues. ReasonNotOwned = "NotOwned" // ReasonProgressDeadlineExceeded defines the reason for marking revision availability // status as false if progress has exceeded the deadline. ReasonProgressDeadlineExceeded = "ProgressDeadlineExceeded" )
const ( // RevisionConditionReady is set when the revision is starting to materialize // runtime resources, and becomes true when those resources are ready. RevisionConditionReady = apis.ConditionReady // RevisionConditionResourcesAvailable is set when underlying // Kubernetes resources have been provisioned. RevisionConditionResourcesAvailable apis.ConditionType = "ResourcesAvailable" // RevisionConditionContainerHealthy is set when the revision readiness check completes. RevisionConditionContainerHealthy apis.ConditionType = "ContainerHealthy" // RevisionConditionActive is set when the revision is receiving traffic. RevisionConditionActive apis.ConditionType = "Active" )
const ( // RouteConditionReady is set when the service is configured // and has available backends ready to receive traffic. RouteConditionReady = apis.ConditionReady // RouteConditionAllTrafficAssigned is set to False when the // service is not configured properly or has no available // backends ready to receive traffic. RouteConditionAllTrafficAssigned apis.ConditionType = "AllTrafficAssigned" // RouteConditionIngressReady is set to False when the // Ingress fails to become Ready. RouteConditionIngressReady apis.ConditionType = "IngressReady" // RouteConditionCertificateProvisioned is set to False when the // Knative Certificates fail to be provisioned for the Route. RouteConditionCertificateProvisioned apis.ConditionType = "CertificateProvisioned" )
const ( // ServiceConditionReady is set when the service is configured // and has available backends ready to receive traffic. ServiceConditionReady = apis.ConditionReady // ServiceConditionRoutesReady is set when the service's underlying // routes have reported readiness. ServiceConditionRoutesReady apis.ConditionType = "RoutesReady" // ServiceConditionConfigurationsReady is set when the service's underlying // configurations have reported readiness. ServiceConditionConfigurationsReady apis.ConditionType = "ConfigurationsReady" )
ConditionType represents a Service condition value
const ( // ConfigurationConditionReady is set when the configuration's latest // underlying revision has reported readiness. ConfigurationConditionReady = apis.ConditionReady )
const ( // ExternalDomainTLSNotEnabledMessage is the message which is set on the // RouteConditionCertificateProvisioned condition when it is set to True // because external-domain-tls was not enabled. ExternalDomainTLSNotEnabledMessage = "external-domain-tls is not enabled" )
Variables ¶
var ( // SchemeBuilder registers the addKnownTypes function. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme applies all the stored functions to the scheme. AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: serving.GroupName, Version: "v1"}
SchemeGroupVersion is group version used to register these objects.
Functions ¶
func ExitCodeReason ¶ added in v0.13.0
ExitCodeReason constructs the status message from an exit code
func HasDefaultConfigurationName ¶
HasDefaultConfigurationName checks to see whether the given context has been marked as having a default configurationName.
func IsConfigurationCondition ¶ added in v0.13.0
func IsConfigurationCondition(t apis.ConditionType) bool
IsConfigurationCondition returns true if the given ConditionType is a ConfigurationCondition.
func IsRevisionCondition ¶ added in v0.13.0
func IsRevisionCondition(t apis.ConditionType) bool
IsRevisionCondition returns true if the ConditionType is a revision condition type
func IsRouteCondition ¶ added in v0.13.0
func IsRouteCondition(t apis.ConditionType) bool
IsRouteCondition returns true if the ConditionType is a route condition type
func IsServiceCondition ¶ added in v0.13.0
func IsServiceCondition(t apis.ConditionType) bool
IsServiceCondition returns true if the ConditionType is a service condition type
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource.
func ResourceNotOwnedMessage ¶ added in v0.13.0
ResourceNotOwnedMessage constructs the status message if ownership on the resource is not right.
func RevisionContainerExitingMessage ¶ added in v0.13.0
RevisionContainerExitingMessage constructs the status message if a container fails to come up.
func RevisionContainerMissingMessage ¶ added in v0.13.0
RevisionContainerMissingMessage constructs the status message if a given image cannot be pulled correctly.
func RoutingStateModifiedString ¶ added in v0.17.0
RoutingStateModifiedString gives a formatted now timestamp.
func WithDefaultConfigurationName ¶
WithDefaultConfigurationName notes on the context for nested validation that there is a default configuration name, which affects how an empty configurationName is validated.
func WithPreviousConfigurationSpec ¶ added in v0.36.0
func WithPreviousConfigurationSpec(ctx context.Context, spec *ConfigurationSpec) context.Context
WithPreviousConfigurationSpec stores the pre-update ConfigurationSpec in the context, to allow ConfigurationSpec.SetDefaults to determine whether the update would create a new Revision.
Types ¶
type Configuration ¶
type Configuration struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // +optional Spec ConfigurationSpec `json:"spec,omitempty"` // +optional Status ConfigurationStatus `json:"status,omitempty"` }
Configuration represents the "floating HEAD" of a linear history of Revisions. Users create new Revisions by updating the Configuration's spec. The "latest created" revision's name is available under status, as is the "latest ready" revision's name. See also: https://github.com/knative/serving/blob/main/docs/spec/overview.md#configuration
func (*Configuration) ConvertFrom ¶ added in v0.13.0
func (sink *Configuration) ConvertFrom(_ context.Context, source apis.Convertible) error
ConvertFrom implements apis.Convertible
func (*Configuration) ConvertTo ¶ added in v0.13.0
func (source *Configuration) ConvertTo(_ context.Context, sink apis.Convertible) error
ConvertTo implements apis.Convertible
func (*Configuration) DeepCopy ¶
func (in *Configuration) DeepCopy() *Configuration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Configuration.
func (*Configuration) DeepCopyInto ¶
func (in *Configuration) DeepCopyInto(out *Configuration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Configuration) DeepCopyObject ¶
func (in *Configuration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Configuration) GetConditionSet ¶ added in v0.15.0
func (*Configuration) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*Configuration) GetGroupVersionKind ¶
func (*Configuration) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns the GroupVersionKind.
func (*Configuration) GetStatus ¶ added in v0.15.0
func (t *Configuration) GetStatus() *duckv1.Status
GetStatus retrieves the status of the Configuration. Implements the KRShaped interface.
func (*Configuration) IsFailed ¶ added in v0.16.0
func (c *Configuration) IsFailed() bool
IsFailed returns true if the resource has observed the latest generation and ready is false.
func (*Configuration) IsLatestReadyRevisionNameUpToDate ¶ added in v0.16.0
func (c *Configuration) IsLatestReadyRevisionNameUpToDate() bool
IsLatestReadyRevisionNameUpToDate returns true if the Configuration is ready and LatestCreateRevisionName is equal to LatestReadyRevisionName. Otherwise it returns false.
func (*Configuration) IsReady ¶ added in v0.16.0
func (c *Configuration) IsReady() bool
IsReady returns true if the Status condition ConfigurationConditionReady is true and the latest spec has been observed.
func (*Configuration) SetDefaults ¶
func (c *Configuration) SetDefaults(ctx context.Context)
SetDefaults implements apis.Defaultable
func (*Configuration) Validate ¶
func (c *Configuration) Validate(ctx context.Context) (errs *apis.FieldError)
Validate makes sure that Configuration is properly configured.
type ConfigurationList ¶
type ConfigurationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Configuration `json:"items"` }
ConfigurationList is a list of Configuration resources
func (*ConfigurationList) DeepCopy ¶
func (in *ConfigurationList) DeepCopy() *ConfigurationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationList.
func (*ConfigurationList) DeepCopyInto ¶
func (in *ConfigurationList) DeepCopyInto(out *ConfigurationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConfigurationList) DeepCopyObject ¶
func (in *ConfigurationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ConfigurationSpec ¶
type ConfigurationSpec struct { // Template holds the latest specification for the Revision to be stamped out. // +optional Template RevisionTemplateSpec `json:"template"` }
ConfigurationSpec holds the desired state of the Configuration (from the client).
func (*ConfigurationSpec) DeepCopy ¶
func (in *ConfigurationSpec) DeepCopy() *ConfigurationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationSpec.
func (*ConfigurationSpec) DeepCopyInto ¶
func (in *ConfigurationSpec) DeepCopyInto(out *ConfigurationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConfigurationSpec) GetTemplate ¶ added in v0.13.0
func (cs *ConfigurationSpec) GetTemplate() *RevisionTemplateSpec
GetTemplate returns a pointer to the relevant RevisionTemplateSpec field. It is never nil and should be exactly the specified template as guaranteed by validation.
func (*ConfigurationSpec) SetDefaults ¶
func (cs *ConfigurationSpec) SetDefaults(ctx context.Context)
SetDefaults implements apis.Defaultable
func (*ConfigurationSpec) Validate ¶
func (cs *ConfigurationSpec) Validate(ctx context.Context) *apis.FieldError
Validate implements apis.Validatable
type ConfigurationStatus ¶
type ConfigurationStatus struct { duckv1.Status `json:",inline"` ConfigurationStatusFields `json:",inline"` }
ConfigurationStatus communicates the observed state of the Configuration (from the controller).
func (*ConfigurationStatus) DeepCopy ¶
func (in *ConfigurationStatus) DeepCopy() *ConfigurationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationStatus.
func (*ConfigurationStatus) DeepCopyInto ¶
func (in *ConfigurationStatus) DeepCopyInto(out *ConfigurationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConfigurationStatus) InitializeConditions ¶ added in v0.13.0
func (cs *ConfigurationStatus) InitializeConditions()
InitializeConditions sets the initial values to the conditions.
func (*ConfigurationStatus) MarkLatestCreatedFailed ¶ added in v0.13.0
func (cs *ConfigurationStatus) MarkLatestCreatedFailed(name, message string)
MarkLatestCreatedFailed marks the ConfigurationConditionReady condition to indicate that the Revision failed.
func (*ConfigurationStatus) MarkLatestReadyDeleted ¶ added in v0.13.0
func (cs *ConfigurationStatus) MarkLatestReadyDeleted()
MarkLatestReadyDeleted marks the ConfigurationConditionReady condition to indicate that the Revision was deleted.
func (*ConfigurationStatus) MarkRevisionCreationFailed ¶ added in v0.13.0
func (cs *ConfigurationStatus) MarkRevisionCreationFailed(message string)
MarkRevisionCreationFailed marks the ConfigurationConditionReady condition to indicate the Revision creation failed.
func (*ConfigurationStatus) SetLatestCreatedRevisionName ¶ added in v0.13.0
func (cs *ConfigurationStatus) SetLatestCreatedRevisionName(name string)
SetLatestCreatedRevisionName sets the LatestCreatedRevisionName on the revision and sets the ConfigurationConditionReady state to unknown if this does not match the LatestReadyRevisionName.
func (*ConfigurationStatus) SetLatestReadyRevisionName ¶ added in v0.13.0
func (cs *ConfigurationStatus) SetLatestReadyRevisionName(name string)
SetLatestReadyRevisionName sets the LatestReadyRevisionName on the revision. If this matches the LatestCreatedRevisionName, the ConfigurationConditionReady condition is set to true.
type ConfigurationStatusFields ¶
type ConfigurationStatusFields struct { // LatestReadyRevisionName holds the name of the latest Revision stamped out // from this Configuration that has had its "Ready" condition become "True". // +optional LatestReadyRevisionName string `json:"latestReadyRevisionName,omitempty"` // LatestCreatedRevisionName is the last revision that was created from this // Configuration. It might not be ready yet, for that use LatestReadyRevisionName. // +optional LatestCreatedRevisionName string `json:"latestCreatedRevisionName,omitempty"` }
ConfigurationStatusFields holds the fields of Configuration's status that are not generally shared. This is defined separately and inlined so that other types can readily consume these fields via duck typing.
func (*ConfigurationStatusFields) DeepCopy ¶
func (in *ConfigurationStatusFields) DeepCopy() *ConfigurationStatusFields
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationStatusFields.
func (*ConfigurationStatusFields) DeepCopyInto ¶
func (in *ConfigurationStatusFields) DeepCopyInto(out *ConfigurationStatusFields)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ContainerStatus ¶ added in v0.18.0
type ContainerStatus struct { Name string `json:"name,omitempty"` ImageDigest string `json:"imageDigest,omitempty"` }
ContainerStatus holds the information of container name and image digest value
func (*ContainerStatus) DeepCopy ¶ added in v0.18.0
func (in *ContainerStatus) DeepCopy() *ContainerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerStatus.
func (*ContainerStatus) DeepCopyInto ¶ added in v0.18.0
func (in *ContainerStatus) DeepCopyInto(out *ContainerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Revision ¶
type Revision struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // +optional Spec RevisionSpec `json:"spec,omitempty"` // +optional Status RevisionStatus `json:"status,omitempty"` }
Revision is an immutable snapshot of code and configuration. A revision references a container image. Revisions are created by updates to a Configuration.
See also: https://github.com/knative/serving/blob/main/docs/spec/overview.md#revision
func (*Revision) ConvertFrom ¶ added in v0.13.0
ConvertFrom implements apis.Convertible
func (*Revision) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Revision.
func (*Revision) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Revision) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Revision) GetConditionSet ¶ added in v0.15.0
func (*Revision) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*Revision) GetGroupVersionKind ¶
func (r *Revision) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns the GroupVersionKind.
func (*Revision) GetProtocol ¶ added in v0.13.0
func (r *Revision) GetProtocol() net.ProtocolType
GetProtocol returns the app level network protocol.
func (*Revision) GetRoutingState ¶ added in v0.17.0
func (r *Revision) GetRoutingState() RoutingState
GetRoutingState retrieves the RoutingState label.
func (*Revision) GetRoutingStateModified ¶ added in v0.17.0
GetRoutingStateModified retrieves the RoutingStateModified annotation.
func (*Revision) GetStatus ¶ added in v0.15.0
GetStatus retrieves the status of the Revision. Implements the KRShaped interface.
func (*Revision) IsFailed ¶ added in v0.16.0
IsFailed returns true if the resource has observed the latest generation and ready is false.
func (*Revision) IsReady ¶ added in v0.16.0
IsReady returns true if the Status condition RevisionConditionReady is true and the latest spec has been observed.
func (*Revision) SetDefaults ¶
SetDefaults implements apis.Defaultable
func (*Revision) SetRoutingState ¶ added in v0.17.0
func (r *Revision) SetRoutingState(state RoutingState, tm time.Time)
SetRoutingState sets the routingState label on this Revision and updates the routingStateModified annotation.
func (*Revision) Validate ¶
func (r *Revision) Validate(ctx context.Context) *apis.FieldError
Validate ensures Revision is properly configured.
func (*Revision) ValidateLabels ¶
func (r *Revision) ValidateLabels() (errs *apis.FieldError)
ValidateLabels function validates service labels
type RevisionList ¶
type RevisionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Revision `json:"items"` }
RevisionList is a list of Revision resources
func (*RevisionList) DeepCopy ¶
func (in *RevisionList) DeepCopy() *RevisionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevisionList.
func (*RevisionList) DeepCopyInto ¶
func (in *RevisionList) DeepCopyInto(out *RevisionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RevisionList) DeepCopyObject ¶
func (in *RevisionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RevisionSpec ¶
type RevisionSpec struct { corev1.PodSpec `json:",inline"` // ContainerConcurrency specifies the maximum allowed in-flight (concurrent) // requests per container of the Revision. Defaults to `0` which means // concurrency to the application is not limited, and the system decides the // target concurrency for the autoscaler. // +optional ContainerConcurrency *int64 `json:"containerConcurrency,omitempty"` // TimeoutSeconds is the maximum duration in seconds that the request instance // is allowed to respond to a request. If unspecified, a system default will // be provided. // +optional TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"` // ResponseStartTimeoutSeconds is the maximum duration in seconds that the request // routing layer will wait for a request delivered to a container to begin // sending any network traffic. // +optional ResponseStartTimeoutSeconds *int64 `json:"responseStartTimeoutSeconds,omitempty"` // IdleTimeoutSeconds is the maximum duration in seconds a request will be allowed // to stay open while not receiving any bytes from the user's application. If // unspecified, a system default will be provided. // +optional IdleTimeoutSeconds *int64 `json:"idleTimeoutSeconds,omitempty"` }
RevisionSpec holds the desired state of the Revision (from the client).
func (*RevisionSpec) DeepCopy ¶
func (in *RevisionSpec) DeepCopy() *RevisionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevisionSpec.
func (*RevisionSpec) DeepCopyInto ¶
func (in *RevisionSpec) DeepCopyInto(out *RevisionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RevisionSpec) GetContainer ¶ added in v0.13.0
func (rs *RevisionSpec) GetContainer() *corev1.Container
GetContainer returns a pointer to the relevant corev1.Container field. It is never nil and should be exactly the specified container if len(containers) == 1 or if there are multiple containers it returns the container which has Ports as guaranteed by validation. Note: If you change this function, also update GetSidecarContainers.
func (*RevisionSpec) GetContainerConcurrency ¶
func (rs *RevisionSpec) GetContainerConcurrency() int64
GetContainerConcurrency returns the container concurrency. If container concurrency is not set, the default value will be returned. We use the original default (0) here for backwards compatibility. Previous versions of Knative equated unspecified and zero, so to avoid changing the value used by Revisions with unspecified values when a different default is configured, we use the original default instead of the configured default to remain safe across upgrades.
func (*RevisionSpec) GetSidecarContainers ¶ added in v0.41.0
func (rs *RevisionSpec) GetSidecarContainers() []*corev1.Container
GetSidecarContainers returns a slice of pointers to all sidecar containers. If len(containers) == 1 OR only one container with a user-port exists, it will return an empty slice. It is the "rest" of GetContainer.
func (*RevisionSpec) SetDefaults ¶
func (rs *RevisionSpec) SetDefaults(ctx context.Context)
SetDefaults implements apis.Defaultable
func (*RevisionSpec) Validate ¶
func (rs *RevisionSpec) Validate(ctx context.Context) *apis.FieldError
Validate implements apis.Validatable
type RevisionStatus ¶
type RevisionStatus struct { duckv1.Status `json:",inline"` // LogURL specifies the generated logging url for this particular revision // based on the revision url template specified in the controller's config. // +optional LogURL string `json:"logUrl,omitempty"` // ContainerStatuses is a slice of images present in .Spec.Container[*].Image // to their respective digests and their container name. // The digests are resolved during the creation of Revision. // ContainerStatuses holds the container name and image digests // for both serving and non serving containers. // ref: http://bit.ly/image-digests // +optional ContainerStatuses []ContainerStatus `json:"containerStatuses,omitempty"` // InitContainerStatuses is a slice of images present in .Spec.InitContainer[*].Image // to their respective digests and their container name. // The digests are resolved during the creation of Revision. // ContainerStatuses holds the container name and image digests // for both serving and non serving containers. // ref: http://bit.ly/image-digests // +optional InitContainerStatuses []ContainerStatus `json:"initContainerStatuses,omitempty"` // ActualReplicas reflects the amount of ready pods running this revision. // +optional ActualReplicas *int32 `json:"actualReplicas,omitempty"` // DesiredReplicas reflects the desired amount of pods running this revision. // +optional DesiredReplicas *int32 `json:"desiredReplicas,omitempty"` }
RevisionStatus communicates the observed state of the Revision (from the controller).
func (*RevisionStatus) DeepCopy ¶
func (in *RevisionStatus) DeepCopy() *RevisionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevisionStatus.
func (*RevisionStatus) DeepCopyInto ¶
func (in *RevisionStatus) DeepCopyInto(out *RevisionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RevisionStatus) InitializeConditions ¶ added in v0.13.0
func (rs *RevisionStatus) InitializeConditions()
InitializeConditions sets the initial values to the conditions.
func (*RevisionStatus) IsActivationRequired ¶ added in v0.13.0
func (rs *RevisionStatus) IsActivationRequired() bool
IsActivationRequired returns true if activation is required.
func (*RevisionStatus) MarkActiveFalse ¶ added in v0.13.0
func (rs *RevisionStatus) MarkActiveFalse(reason, message string)
MarkActiveFalse marks Active status on revision as False
func (*RevisionStatus) MarkActiveTrue ¶ added in v0.13.0
func (rs *RevisionStatus) MarkActiveTrue()
MarkActiveTrue marks Active status on revision as True
func (*RevisionStatus) MarkActiveUnknown ¶ added in v0.13.0
func (rs *RevisionStatus) MarkActiveUnknown(reason, message string)
MarkActiveUnknown marks Active status on revision as Unknown
func (*RevisionStatus) MarkContainerHealthyFalse ¶ added in v0.13.0
func (rs *RevisionStatus) MarkContainerHealthyFalse(reason, message string)
MarkContainerHealthyFalse marks ContainerHealthy status on revision as False
func (*RevisionStatus) MarkContainerHealthyTrue ¶ added in v0.13.0
func (rs *RevisionStatus) MarkContainerHealthyTrue()
MarkContainerHealthyTrue marks ContainerHealthy status on revision as True
func (*RevisionStatus) MarkContainerHealthyUnknown ¶ added in v0.13.0
func (rs *RevisionStatus) MarkContainerHealthyUnknown(reason, message string)
MarkContainerHealthyUnknown marks ContainerHealthy status on revision as Unknown
func (*RevisionStatus) MarkResourcesAvailableFalse ¶ added in v0.13.0
func (rs *RevisionStatus) MarkResourcesAvailableFalse(reason, message string)
MarkResourcesAvailableFalse marks ResourcesAvailable status on revision as False
func (*RevisionStatus) MarkResourcesAvailableTrue ¶ added in v0.13.0
func (rs *RevisionStatus) MarkResourcesAvailableTrue()
MarkResourcesAvailableTrue marks ResourcesAvailable status on revision as True
func (*RevisionStatus) MarkResourcesAvailableUnknown ¶ added in v0.13.0
func (rs *RevisionStatus) MarkResourcesAvailableUnknown(reason, message string)
MarkResourcesAvailableUnknown marks ResourcesAvailable status on revision as Unknown
func (*RevisionStatus) PropagateAutoscalerStatus ¶ added in v0.13.0
func (rs *RevisionStatus) PropagateAutoscalerStatus(ps *autoscalingv1alpha1.PodAutoscalerStatus)
PropagateAutoscalerStatus propagates autoscaler's status to the revision's status.
func (*RevisionStatus) PropagateDeploymentStatus ¶ added in v0.13.0
func (rs *RevisionStatus) PropagateDeploymentStatus(original *appsv1.DeploymentStatus)
PropagateDeploymentStatus takes the Deployment status and applies its values to the Revision status.
func (*RevisionStatus) Validate ¶
func (rs *RevisionStatus) Validate(_ context.Context) *apis.FieldError
Validate implements apis.Validatable
type RevisionTemplateSpec ¶
type RevisionTemplateSpec struct { // +kubebuilder:pruning:PreserveUnknownFields // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // +optional Spec RevisionSpec `json:"spec,omitempty"` }
RevisionTemplateSpec describes the data a revision should have when created from a template. Based on: https://github.com/kubernetes/api/blob/e771f807/core/v1/types.go#L3179-L3190
func (*RevisionTemplateSpec) DeepCopy ¶
func (in *RevisionTemplateSpec) DeepCopy() *RevisionTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevisionTemplateSpec.
func (*RevisionTemplateSpec) DeepCopyInto ¶
func (in *RevisionTemplateSpec) DeepCopyInto(out *RevisionTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RevisionTemplateSpec) SetDefaults ¶
func (rts *RevisionTemplateSpec) SetDefaults(ctx context.Context)
SetDefaults implements apis.Defaultable
func (*RevisionTemplateSpec) Validate ¶
func (rts *RevisionTemplateSpec) Validate(ctx context.Context) *apis.FieldError
Validate implements apis.Validatable
func (*RevisionTemplateSpec) VerifyNameChange ¶
func (rts *RevisionTemplateSpec) VerifyNameChange(_ context.Context, og *RevisionTemplateSpec) *apis.FieldError
VerifyNameChange checks that if a user brought their own name previously that it changes at the appropriate times.
type Route ¶
type Route struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds the desired state of the Route (from the client). // +optional Spec RouteSpec `json:"spec,omitempty"` // Status communicates the observed state of the Route (from the controller). // +optional Status RouteStatus `json:"status,omitempty"` }
Route is responsible for configuring ingress over a collection of Revisions. Some of the Revisions a Route distributes traffic over may be specified by referencing the Configuration responsible for creating them; in these cases the Route is additionally responsible for monitoring the Configuration for "latest ready revision" changes, and smoothly rolling out latest revisions. See also: https://github.com/knative/serving/blob/main/docs/spec/overview.md#route
func (*Route) ConvertFrom ¶ added in v0.13.0
ConvertFrom implements apis.Convertible
func (*Route) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route.
func (*Route) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Route) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Route) GetConditionSet ¶ added in v0.15.0
func (*Route) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*Route) GetGroupVersionKind ¶
func (r *Route) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns the GroupVersionKind.
func (*Route) GetStatus ¶ added in v0.15.0
GetStatus retrieves the status of the Route. Implements the KRShaped interface.
func (*Route) IsFailed ¶ added in v0.16.0
IsFailed returns true if the resource has observed the latest generation and ready is false.
func (*Route) IsReady ¶ added in v0.16.0
IsReady returns true if the Status condition RouteConditionReady is true and the latest spec has been observed.
func (*Route) RolloutDuration ¶ added in v0.21.0
RolloutDuration returns the rollout duration specified as an annotation. 0 is returned if missing or cannot be parsed.
func (*Route) SetDefaults ¶
SetDefaults implements apis.Defaultable
type RouteList ¶
type RouteList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Route `json:"items"` }
RouteList is a list of Route resources
func (*RouteList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteList.
func (*RouteList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RouteList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RouteSpec ¶
type RouteSpec struct { // Traffic specifies how to distribute traffic over a collection of // revisions and configurations. // +optional Traffic []TrafficTarget `json:"traffic,omitempty"` }
RouteSpec holds the desired state of the Route (from the client).
func (*RouteSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteSpec.
func (*RouteSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RouteSpec) SetDefaults ¶
SetDefaults implements apis.Defaultable
type RouteStatus ¶
type RouteStatus struct { duckv1.Status `json:",inline"` RouteStatusFields `json:",inline"` }
RouteStatus communicates the observed state of the Route (from the controller).
func (*RouteStatus) DeepCopy ¶
func (in *RouteStatus) DeepCopy() *RouteStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteStatus.
func (*RouteStatus) DeepCopyInto ¶
func (in *RouteStatus) DeepCopyInto(out *RouteStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RouteStatus) InitializeConditions ¶ added in v0.13.0
func (rs *RouteStatus) InitializeConditions()
InitializeConditions sets the initial values to the conditions.
func (*RouteStatus) MarkCertificateNotOwned ¶ added in v0.13.0
func (rs *RouteStatus) MarkCertificateNotOwned(name string)
MarkCertificateNotOwned changes the RouteConditionCertificateProvisioned status to be false with the reason being that there is an existing certificate with the name we wanted to use.
func (*RouteStatus) MarkCertificateNotReady ¶ added in v0.13.0
func (rs *RouteStatus) MarkCertificateNotReady(c *v1alpha1.Certificate)
MarkCertificateNotReady marks the RouteConditionCertificateProvisioned condition to indicate that the Certificate is not ready.
func (*RouteStatus) MarkCertificateProvisionFailed ¶ added in v0.13.0
func (rs *RouteStatus) MarkCertificateProvisionFailed(c *v1alpha1.Certificate)
MarkCertificateProvisionFailed marks the RouteConditionCertificateProvisioned condition to indicate that the Certificate provisioning failed.
func (*RouteStatus) MarkCertificateReady ¶ added in v0.13.0
func (rs *RouteStatus) MarkCertificateReady(name string)
MarkCertificateReady marks the RouteConditionCertificateProvisioned condition to indicate that the Certificate is ready.
func (*RouteStatus) MarkConfigurationFailed ¶ added in v0.13.0
func (rs *RouteStatus) MarkConfigurationFailed(name string)
MarkConfigurationFailed marks the RouteConditionAllTrafficAssigned condition to indicate the Revision has failed.
func (*RouteStatus) MarkConfigurationNotReady ¶ added in v0.13.0
func (rs *RouteStatus) MarkConfigurationNotReady(name string)
MarkConfigurationNotReady marks the RouteConditionAllTrafficAssigned condition to indiciate the Revision is not yet ready.
func (*RouteStatus) MarkEndpointNotOwned ¶ added in v0.26.0
func (rs *RouteStatus) MarkEndpointNotOwned(name string)
MarkEndpointNotOwned changes the IngressReady status to be false with the reason being that there is a pre-existing placeholder endpoint with the name we wanted to use.
func (*RouteStatus) MarkHTTPDowngrade ¶ added in v0.15.0
func (rs *RouteStatus) MarkHTTPDowngrade(name string)
MarkHTTPDowngrade sets RouteConditionCertificateProvisioned to true when plain HTTP is enabled even when Certificated is not ready.
func (*RouteStatus) MarkIngressNotConfigured ¶ added in v0.13.0
func (rs *RouteStatus) MarkIngressNotConfigured()
MarkIngressNotConfigured changes the IngressReady condition to be unknown to reflect that the Ingress does not yet have a Status
func (*RouteStatus) MarkIngressRolloutInProgress ¶ added in v0.20.0
func (rs *RouteStatus) MarkIngressRolloutInProgress()
MarkIngressRolloutInProgress changes the IngressReady condition to be unknown to reflect that a gradual rollout of the latest new revision (or stacked revisions) is in progress.
func (*RouteStatus) MarkMissingTrafficTarget ¶ added in v0.13.0
func (rs *RouteStatus) MarkMissingTrafficTarget(kind, name string)
MarkMissingTrafficTarget marks the RouteConditionAllTrafficAssigned condition to indicate a reference traffic target was not found.
func (*RouteStatus) MarkRevisionFailed ¶ added in v0.13.0
func (rs *RouteStatus) MarkRevisionFailed(name string)
MarkRevisionFailed marks the RouteConditionAllTrafficAssigned condition to indiciate the Revision has failed.
func (*RouteStatus) MarkRevisionNotReady ¶ added in v0.13.0
func (rs *RouteStatus) MarkRevisionNotReady(name string)
MarkRevisionNotReady marks the RouteConditionAllTrafficAssigned condition to indiciate the Revision is not yet ready.
func (*RouteStatus) MarkRevisionTargetTrafficError ¶ added in v0.41.0
func (rs *RouteStatus) MarkRevisionTargetTrafficError(reason, msg string)
MarkRevisionTargetTrafficError marks the RouteConditionAllTrafficAssigned condition to indicate an error has occurred wrt a revision target.
func (*RouteStatus) MarkServiceNotOwned ¶ added in v0.13.0
func (rs *RouteStatus) MarkServiceNotOwned(name string)
MarkServiceNotOwned changes the IngressReady status to be false with the reason being that there is a pre-existing placeholder service with the name we wanted to use.
func (*RouteStatus) MarkTLSNotEnabled ¶ added in v0.16.0
func (rs *RouteStatus) MarkTLSNotEnabled(msg string)
MarkTLSNotEnabled sets RouteConditionCertificateProvisioned to true when certificate config such as external-domain-tls is not enabled or private cluster-local service.
func (*RouteStatus) MarkTrafficAssigned ¶ added in v0.13.0
func (rs *RouteStatus) MarkTrafficAssigned()
MarkTrafficAssigned marks the RouteConditionAllTrafficAssigned condition true.
func (*RouteStatus) MarkUnknownTrafficError ¶ added in v0.13.0
func (rs *RouteStatus) MarkUnknownTrafficError(msg string)
MarkUnknownTrafficError marks the RouteConditionAllTrafficAssigned condition to indicate an error has occurred.
func (*RouteStatus) PropagateIngressStatus ¶ added in v0.13.0
func (rs *RouteStatus) PropagateIngressStatus(cs v1alpha1.IngressStatus)
PropagateIngressStatus update RouteConditionIngressReady condition in RouteStatus according to IngressStatus.
type RouteStatusFields ¶
type RouteStatusFields struct { // URL holds the url that will distribute traffic over the provided traffic targets. // It generally has the form http[s]://{route-name}.{route-namespace}.{cluster-level-suffix} // +optional URL *apis.URL `json:"url,omitempty"` // Address holds the information needed for a Route to be the target of an event. // +optional Address *duckv1.Addressable `json:"address,omitempty"` // Traffic holds the configured traffic distribution. // These entries will always contain RevisionName references. // When ConfigurationName appears in the spec, this will hold the // LatestReadyRevisionName that we last observed. // +optional Traffic []TrafficTarget `json:"traffic,omitempty"` }
RouteStatusFields holds the fields of Route's status that are not generally shared. This is defined separately and inlined so that other types can readily consume these fields via duck typing.
func (*RouteStatusFields) DeepCopy ¶
func (in *RouteStatusFields) DeepCopy() *RouteStatusFields
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteStatusFields.
func (*RouteStatusFields) DeepCopyInto ¶
func (in *RouteStatusFields) DeepCopyInto(out *RouteStatusFields)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RoutingState ¶ added in v0.17.0
type RoutingState string
RoutingState represents states of a revision with regards to serving a route.
const ( // RoutingStateUnset is the empty value for routing state, this state is unexpected. RoutingStateUnset RoutingState = "" // RoutingStatePending is a state after a revision is created, but before // its routing state has been determined. It is treated like active for the purposes // of revision garbage collection. RoutingStatePending RoutingState = "pending" // RoutingStateActive is a state for a revision which is actively referenced by a Route. RoutingStateActive RoutingState = "active" // RoutingStateReserve is a state for a revision which is no longer referenced by a Route, // and is scaled down, but may be rapidly pinned to a route to be made active again. RoutingStateReserve RoutingState = "reserve" )
type Service ¶
type Service struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // +optional Spec ServiceSpec `json:"spec,omitempty"` // +optional Status ServiceStatus `json:"status,omitempty"` }
Service acts as a top-level container that manages a Route and Configuration which implement a network service. Service exists to provide a singular abstraction which can be access controlled, reasoned about, and which encapsulates software lifecycle decisions such as rollout policy and team resource ownership. Service acts only as an orchestrator of the underlying Routes and Configurations (much as a kubernetes Deployment orchestrates ReplicaSets), and its usage is optional but recommended.
The Service's controller will track the statuses of its owned Configuration and Route, reflecting their statuses and conditions as its own.
See also: https://github.com/knative/serving/blob/main/docs/spec/overview.md#service
func (*Service) ConvertFrom ¶ added in v0.13.0
ConvertFrom implements apis.Convertible
func (*Service) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.
func (*Service) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Service) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Service) GetConditionSet ¶ added in v0.15.0
func (*Service) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*Service) GetGroupVersionKind ¶
func (s *Service) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns the GroupVersionKind.
func (*Service) GetStatus ¶ added in v0.15.0
GetStatus retrieves the status of the Service. Implements the KRShaped interface.
func (*Service) IsFailed ¶ added in v0.16.0
IsFailed returns true if the resource has observed the latest generation and ready is false.
func (*Service) IsReady ¶ added in v0.16.0
IsReady returns if the service is ready to serve and the latest spec has been observed.
func (*Service) SetDefaults ¶
SetDefaults implements apis.Defaultable
type ServiceList ¶
type ServiceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Service `json:"items"` }
ServiceList is a list of Service resources
func (*ServiceList) DeepCopy ¶
func (in *ServiceList) DeepCopy() *ServiceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceList.
func (*ServiceList) DeepCopyInto ¶
func (in *ServiceList) DeepCopyInto(out *ServiceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceList) DeepCopyObject ¶
func (in *ServiceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ServiceSpec ¶
type ServiceSpec struct { // ServiceSpec inlines an unrestricted ConfigurationSpec. ConfigurationSpec `json:",inline"` // ServiceSpec inlines RouteSpec and restricts/defaults its fields // via webhook. In particular, this spec can only reference this // Service's configuration and revisions (which also influences // defaults). RouteSpec `json:",inline"` }
ServiceSpec represents the configuration for the Service object. A Service's specification is the union of the specifications for a Route and Configuration. The Service restricts what can be expressed in these fields, e.g. the Route must reference the provided Configuration; however, these limitations also enable friendlier defaulting, e.g. Route never needs a Configuration name, and may be defaulted to the appropriate "run latest" spec.
func (*ServiceSpec) DeepCopy ¶
func (in *ServiceSpec) DeepCopy() *ServiceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec.
func (*ServiceSpec) DeepCopyInto ¶
func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceSpec) SetDefaults ¶
func (ss *ServiceSpec) SetDefaults(ctx context.Context)
SetDefaults implements apis.Defaultable
func (*ServiceSpec) Validate ¶
func (ss *ServiceSpec) Validate(ctx context.Context) *apis.FieldError
Validate implements apis.Validatable
type ServiceStatus ¶
type ServiceStatus struct { duckv1.Status `json:",inline"` // In addition to inlining ConfigurationSpec, we also inline the fields // specific to ConfigurationStatus. ConfigurationStatusFields `json:",inline"` // In addition to inlining RouteSpec, we also inline the fields // specific to RouteStatus. RouteStatusFields `json:",inline"` }
ServiceStatus represents the Status stanza of the Service resource.
func (*ServiceStatus) DeepCopy ¶
func (in *ServiceStatus) DeepCopy() *ServiceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceStatus.
func (*ServiceStatus) DeepCopyInto ¶
func (in *ServiceStatus) DeepCopyInto(out *ServiceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceStatus) InitializeConditions ¶ added in v0.13.0
func (ss *ServiceStatus) InitializeConditions()
InitializeConditions sets the initial values to the conditions.
func (*ServiceStatus) MarkConfigurationNotOwned ¶ added in v0.13.0
func (ss *ServiceStatus) MarkConfigurationNotOwned(name string)
MarkConfigurationNotOwned surfaces a failure via the ConfigurationsReady status noting that the Configuration with the name we want has already been created and we do not own it.
func (*ServiceStatus) MarkConfigurationNotReconciled ¶ added in v0.13.0
func (ss *ServiceStatus) MarkConfigurationNotReconciled()
MarkConfigurationNotReconciled notes that the Configuration controller has not yet caught up to the desired changes we have specified.
func (*ServiceStatus) MarkRevisionNameTaken ¶ added in v0.13.0
func (ss *ServiceStatus) MarkRevisionNameTaken(name string)
MarkRevisionNameTaken notes that the Route has not been programmed because the revision name is taken by a conflicting revision definition.
func (*ServiceStatus) MarkRouteNotOwned ¶ added in v0.13.0
func (ss *ServiceStatus) MarkRouteNotOwned(name string)
MarkRouteNotOwned surfaces a failure via the RoutesReady status noting that the Route with the name we want has already been created and we do not own it.
func (*ServiceStatus) MarkRouteNotReconciled ¶ added in v0.13.0
func (ss *ServiceStatus) MarkRouteNotReconciled()
MarkRouteNotReconciled notes that the Route controller has not yet caught up to the desired changes we have specified.
func (*ServiceStatus) MarkRouteNotYetReady ¶ added in v0.13.0
func (ss *ServiceStatus) MarkRouteNotYetReady()
MarkRouteNotYetReady marks the service `RouteReady` condition to the `Unknown` state. See: #2430, for details.
func (*ServiceStatus) PropagateConfigurationStatus ¶ added in v0.13.0
func (ss *ServiceStatus) PropagateConfigurationStatus(cs *ConfigurationStatus)
PropagateConfigurationStatus takes the Configuration status and applies its values to the Service status.
func (*ServiceStatus) PropagateRouteStatus ¶ added in v0.13.0
func (ss *ServiceStatus) PropagateRouteStatus(rs *RouteStatus)
PropagateRouteStatus propagates route's status to the service's status.
type TrafficTarget ¶
type TrafficTarget struct { // Tag is optionally used to expose a dedicated url for referencing // this target exclusively. // +optional Tag string `json:"tag,omitempty"` // RevisionName of a specific revision to which to send this portion of // traffic. This is mutually exclusive with ConfigurationName. // +optional RevisionName string `json:"revisionName,omitempty"` // ConfigurationName of a configuration to whose latest revision we will send // this portion of traffic. When the "status.latestReadyRevisionName" of the // referenced configuration changes, we will automatically migrate traffic // from the prior "latest ready" revision to the new one. This field is never // set in Route's status, only its spec. This is mutually exclusive with // RevisionName. // +optional ConfigurationName string `json:"configurationName,omitempty"` // LatestRevision may be optionally provided to indicate that the latest // ready Revision of the Configuration should be used for this traffic // target. When provided LatestRevision must be true if RevisionName is // empty; it must be false when RevisionName is non-empty. // +optional LatestRevision *bool `json:"latestRevision,omitempty"` // Percent indicates that percentage based routing should be used and // the value indicates the percent of traffic that is be routed to this // Revision or Configuration. `0` (zero) mean no traffic, `100` means all // traffic. // When percentage based routing is being used the follow rules apply: // - the sum of all percent values must equal 100 // - when not specified, the implied value for `percent` is zero for // that particular Revision or Configuration // +optional Percent *int64 `json:"percent,omitempty"` // URL displays the URL for accessing named traffic targets. URL is displayed in // status, and is disallowed on spec. URL must contain a scheme (e.g. http://) and // a hostname, but may not contain anything else (e.g. basic auth, url path, etc.) // +optional URL *apis.URL `json:"url,omitempty"` }
TrafficTarget holds a single entry of the routing table for a Route.
func (*TrafficTarget) DeepCopy ¶
func (in *TrafficTarget) DeepCopy() *TrafficTarget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficTarget.
func (*TrafficTarget) DeepCopyInto ¶
func (in *TrafficTarget) DeepCopyInto(out *TrafficTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TrafficTarget) SetDefaults ¶
func (tt *TrafficTarget) SetDefaults(ctx context.Context)
SetDefaults implements apis.Defaultable
func (*TrafficTarget) Validate ¶
func (tt *TrafficTarget) Validate(ctx context.Context) *apis.FieldError
Validate verifies that TrafficTarget is properly configured.
Source Files ¶
- configuration_conversion.go
- configuration_defaults.go
- configuration_lifecycle.go
- configuration_types.go
- configuration_validation.go
- contexts.go
- doc.go
- register.go
- revision_conversion.go
- revision_defaults.go
- revision_helpers.go
- revision_lifecycle.go
- revision_types.go
- revision_validation.go
- route_conversion.go
- route_defaults.go
- route_lifecycle.go
- route_types.go
- route_validation.go
- service_conversion.go
- service_defaults.go
- service_lifecycle.go
- service_types.go
- service_validation.go
- zz_generated.deepcopy.go