serverless

package
v2.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCertificateSecretName = "knative-serving-cert"
View Source
const (
	KnativeServingNamespace = "knative-serving"
)

Variables

View Source
var FeatureData = struct {
	Serving         feature.DataDefinition[infrav1.ServingSpec, infrav1.ServingSpec]
	CertificateName feature.DataDefinition[infrav1.ServingSpec, string]
	IngressDomain   feature.DataDefinition[infrav1.ServingSpec, string]
}{
	Serving: feature.DataDefinition[infrav1.ServingSpec, infrav1.ServingSpec]{
		Define: func(source *infrav1.ServingSpec) feature.DataEntry[infrav1.ServingSpec] {
			return feature.DataEntry[infrav1.ServingSpec]{
				Key:   servingKey,
				Value: provider.ValueOf(*source).Get,
			}
		},
		Extract: feature.ExtractEntry[infrav1.ServingSpec](servingKey),
	},
	CertificateName: feature.DataDefinition[infrav1.ServingSpec, string]{
		Define: func(source *infrav1.ServingSpec) feature.DataEntry[string] {
			return feature.DataEntry[string]{
				Key:   certificateKey,
				Value: provider.ValueOf(source.IngressGateway.Certificate.SecretName).OrElse(DefaultCertificateSecretName),
			}
		},
		Extract: feature.ExtractEntry[string](certificateKey),
	},
	IngressDomain: feature.DataDefinition[infrav1.ServingSpec, string]{
		Define: func(source *infrav1.ServingSpec) feature.DataEntry[string] {
			return feature.DataEntry[string]{
				Key:   knativeIngressDomainKey,
				Value: provider.ValueOf(source.IngressGateway.Domain).OrGet(knativeDomain),
			}
		},
		Extract: feature.ExtractEntry[string](knativeIngressDomainKey),
	},
}

FeatureData is a convention to simplify how the data for the Serverless features is Defined and accessed.

Functions

func EnsureServerlessAbsent

func EnsureServerlessAbsent(ctx context.Context, cli client.Client, f *feature.Feature) error

func EnsureServerlessOperatorInstalled

func EnsureServerlessOperatorInstalled(ctx context.Context, cli client.Client, f *feature.Feature) error

func ServingCertificateResource

func ServingCertificateResource(ctx context.Context, cli client.Client, f *feature.Feature) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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