v1alpha1

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 14 Imported by: 181

README

Knative Serving API v1alpha1

This is the implementation of the Knative Serving API, which is specified in docs/spec/spec.md and verified via the conformance tests.

Updates to this implementation should include a corresponding change to the spec and the conformance tests. (#780)

Documentation

Overview

Package v1alpha1 contains the v1alpha1 versions of the serving apis. Api versions allow the api contract for a resource to be changed while keeping backward compatibility by support multiple concurrent versions of the same resource

Index

Constants

View Source
const (
	// DomainMappingConditionReady is set when the DomainMapping is configured
	// and the Ingress is ready.
	DomainMappingConditionReady = apis.ConditionReady

	// DomainMappingConditionReferenceResolved reflects whether the Ref
	// has been successfully resolved to an existing object.
	DomainMappingConditionReferenceResolved apis.ConditionType = "ReferenceResolved"

	// DomainMappingConditionIngressReady reflects the readiness of the
	// underlying Ingress resource.
	DomainMappingConditionIngressReady apis.ConditionType = "IngressReady"

	// DomainMappingConditionDomainClaimed reflects that the ClusterDomainClaim
	// for this DomainMapping exists, and is owned by this DomainMapping.
	DomainMappingConditionDomainClaimed apis.ConditionType = "DomainClaimed"

	// DomainMappingConditionCertificateProvisioned is set to False when the
	// Knative Certificates fail to be provisioned for the DomainMapping.
	DomainMappingConditionCertificateProvisioned apis.ConditionType = "CertificateProvisioned"
)
View Source
const (
	// AutoTLSNotEnabledMessage is the message which is set on the
	// DomainMappingConditionCertificateProvisioned condition when it is set to True
	// because AutoTLS was not enabled.
	AutoTLSNotEnabledMessage = "autoTLS is not enabled"
)
View Source
const (
	// ConditionTypeConvertible is a Warning condition that is set on
	// resources when they cannot be converted to warn of a forthcoming
	// breakage.
	ConditionTypeConvertible apis.ConditionType = "Convertible"
)

Variables

View Source
var (
	// SchemeBuilder registers the addKnownTypes function.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme applies all the stored functions to the scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: serving.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func ConvertErrorf added in v0.6.0

func ConvertErrorf(field, msg string, args ...interface{}) error

ConvertErrorf creates a CannotConvertError from the field name and format string.

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type CannotConvertError added in v0.6.0

type CannotConvertError struct {
	Message string
	Field   string
}

CannotConvertError is returned when a field cannot be converted.

func (*CannotConvertError) DeepCopy added in v0.6.0

func (in *CannotConvertError) DeepCopy() *CannotConvertError

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CannotConvertError.

func (*CannotConvertError) DeepCopyInto added in v0.6.0

func (in *CannotConvertError) DeepCopyInto(out *CannotConvertError)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CannotConvertError) Error added in v0.6.0

func (cce *CannotConvertError) Error() string

Error implements error

type DomainMapping added in v0.19.0

type DomainMapping struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the desired state of the DomainMapping.
	// More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	// +optional
	Spec DomainMappingSpec `json:"spec,omitempty"`

	// Status is the current state of the DomainMapping.
	// More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	// +optional
	Status DomainMappingStatus `json:"status,omitempty"`
}

DomainMapping is a mapping from a custom hostname to an Addressable.

func (*DomainMapping) DeepCopy added in v0.19.0

func (in *DomainMapping) DeepCopy() *DomainMapping

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainMapping.

func (*DomainMapping) DeepCopyInto added in v0.19.0

func (in *DomainMapping) DeepCopyInto(out *DomainMapping)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DomainMapping) DeepCopyObject added in v0.19.0

func (in *DomainMapping) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*DomainMapping) GetConditionSet added in v0.19.0

func (*DomainMapping) GetConditionSet() apis.ConditionSet

GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.

func (*DomainMapping) GetGroupVersionKind added in v0.19.0

func (dm *DomainMapping) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns the GroupVersionKind.

func (*DomainMapping) GetStatus added in v0.19.0

func (dm *DomainMapping) GetStatus() *duckv1.Status

GetStatus retrieves the status of the DomainMapping. Implements the KRShaped interface.

func (*DomainMapping) IsReady added in v0.19.0

func (dm *DomainMapping) IsReady() bool

IsReady returns true if the Status condition DomainMappingConditionReady is true and the latest spec has been observed.

func (*DomainMapping) SetDefaults added in v0.19.0

func (dm *DomainMapping) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable.

func (*DomainMapping) Validate added in v0.19.0

func (dm *DomainMapping) Validate(ctx context.Context) *apis.FieldError

Validate makes sure that DomainMapping is properly configured.

type DomainMappingList added in v0.19.0

type DomainMappingList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object metadata.
	// More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is the list of DomainMapping objects.
	Items []DomainMapping `json:"items"`
}

DomainMappingList is a collection of DomainMapping objects.

func (*DomainMappingList) DeepCopy added in v0.19.0

func (in *DomainMappingList) DeepCopy() *DomainMappingList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainMappingList.

func (*DomainMappingList) DeepCopyInto added in v0.19.0

func (in *DomainMappingList) DeepCopyInto(out *DomainMappingList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DomainMappingList) DeepCopyObject added in v0.19.0

func (in *DomainMappingList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DomainMappingSpec added in v0.19.0

type DomainMappingSpec struct {
	// Ref specifies the target of the Domain Mapping.
	//
	// The object identified by the Ref must be an Addressable with a URL of the
	// form `{name}.{namespace}.{domain}` where `{domain}` is the cluster domain,
	// and `{name}` and `{namespace}` are the name and namespace of a Kubernetes
	// Service.
	//
	// This contract is satisfied by Knative types such as Knative Services and
	// Knative Routes, and by Kubernetes Services.
	Ref duckv1.KReference `json:"ref"`
}

DomainMappingSpec describes the DomainMapping the user wishes to exist.

func (*DomainMappingSpec) DeepCopy added in v0.19.0

func (in *DomainMappingSpec) DeepCopy() *DomainMappingSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainMappingSpec.

func (*DomainMappingSpec) DeepCopyInto added in v0.19.0

func (in *DomainMappingSpec) DeepCopyInto(out *DomainMappingSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DomainMappingSpec) Validate added in v0.19.0

func (spec *DomainMappingSpec) Validate(ctx context.Context) *apis.FieldError

Validate makes sure the DomainMappingSpec is properly configured.

type DomainMappingStatus added in v0.19.0

type DomainMappingStatus struct {
	duckv1.Status `json:",inline"`

	// URL is the URL of this DomainMapping.
	// +optional
	URL *apis.URL `json:"url,omitempty"`

	// Address holds the information needed for a DomainMapping to be the target of an event.
	// +optional
	Address *duckv1.Addressable `json:"address,omitempty"`
}

DomainMappingStatus describes the current state of the DomainMapping.

func (*DomainMappingStatus) DeepCopy added in v0.19.0

func (in *DomainMappingStatus) DeepCopy() *DomainMappingStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainMappingStatus.

func (*DomainMappingStatus) DeepCopyInto added in v0.19.0

func (in *DomainMappingStatus) DeepCopyInto(out *DomainMappingStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DomainMappingStatus) InitializeConditions added in v0.19.0

func (dms *DomainMappingStatus) InitializeConditions()

InitializeConditions sets the initial values to the conditions.

func (*DomainMappingStatus) IsReady added in v0.19.0

func (dms *DomainMappingStatus) IsReady() bool

IsReady returns true if the DomainMapping is ready.

func (*DomainMappingStatus) MarkCertificateNotOwned added in v0.20.0

func (dms *DomainMappingStatus) MarkCertificateNotOwned(name string)

MarkCertificateNotOwned changes the DomainMappingConditionCertificateProvisioned status to be false with the reason being that there is an existing certificate with the name we wanted to use.

func (*DomainMappingStatus) MarkCertificateNotReady added in v0.20.0

func (dms *DomainMappingStatus) MarkCertificateNotReady(name string)

MarkCertificateNotReady marks the DomainMappingConditionCertificateProvisioned condition to indicate that the Certificate is not ready.

func (*DomainMappingStatus) MarkCertificateProvisionFailed added in v0.20.0

func (dms *DomainMappingStatus) MarkCertificateProvisionFailed(name string)

MarkCertificateProvisionFailed marks the DomainMappingConditionCertificateProvisioned condition to indicate that the Certificate provisioning failed.

func (*DomainMappingStatus) MarkCertificateReady added in v0.20.0

func (dms *DomainMappingStatus) MarkCertificateReady(name string)

MarkCertificateReady marks the DomainMappingConditionCertificateProvisioned condition to indicate that the Certificate is ready.

func (*DomainMappingStatus) MarkDomainClaimFailed added in v0.19.0

func (dms *DomainMappingStatus) MarkDomainClaimFailed(reason string)

MarkDomainClaimFailed updates the DomainMappingConditionDomainClaimed condition to indicate that creating the ClusterDomainClaim failed.

func (*DomainMappingStatus) MarkDomainClaimNotOwned added in v0.19.0

func (dms *DomainMappingStatus) MarkDomainClaimNotOwned()

MarkDomainClaimNotOwned updates the DomainMappingConditionDomainClaimed condition to indicate that the domain is already in use by another DomainMapping.

func (*DomainMappingStatus) MarkDomainClaimed added in v0.19.0

func (dms *DomainMappingStatus) MarkDomainClaimed()

MarkDomainClaimed updates the DomainMappingConditionDomainClaimed condition to indicate that the domain was successfully claimed.

func (*DomainMappingStatus) MarkHTTPDowngrade added in v0.20.0

func (dms *DomainMappingStatus) MarkHTTPDowngrade(name string)

MarkHTTPDowngrade sets DomainMappingConditionCertificateProvisioned to true when plain HTTP is enabled even when Certificate is not ready.

func (*DomainMappingStatus) MarkIngressNotConfigured added in v0.19.0

func (dms *DomainMappingStatus) MarkIngressNotConfigured()

MarkIngressNotConfigured changes the IngressReady condition to be unknown to reflect that the Ingress does not yet have a Status.

func (*DomainMappingStatus) MarkReferenceNotResolved added in v0.20.0

func (dms *DomainMappingStatus) MarkReferenceNotResolved(reason string)

MarkReferenceNotResolved sets the DomainMappingConditionReferenceResolved condition to false.

func (*DomainMappingStatus) MarkReferenceResolved added in v0.20.0

func (dms *DomainMappingStatus) MarkReferenceResolved()

MarkReferenceResolved sets the DomainMappingConditionReferenceResolved condition to true.

func (*DomainMappingStatus) MarkTLSNotEnabled added in v0.20.0

func (dms *DomainMappingStatus) MarkTLSNotEnabled(msg string)

MarkTLSNotEnabled sets DomainMappingConditionCertificateProvisioned to true when certificate provisioning was skipped because TLS was not enabled.

func (*DomainMappingStatus) PropagateIngressStatus added in v0.19.0

func (dms *DomainMappingStatus) PropagateIngressStatus(cs netv1alpha1.IngressStatus)

PropagateIngressStatus updates the DomainMappingConditionIngressReady condition according to the underlying Ingress's status.

Jump to

Keyboard shortcuts

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