common

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 29 Imported by: 18

Documentation

Index

Constants

View Source
const (
	ServingOwnerName                 = "serving.knative.openshift.io/ownerName"
	ServingOwnerNamespace            = "serving.knative.openshift.io/ownerNamespace"
	ServerlessOperatorOwnerName      = "operator.knative.openshift.io/ownerName"
	ServerlessOperatorOwnerNamespace = "operator.knative.openshift.io/ownerNamespace"
)

Annotation keys being used to tag the owned resources by instance

View Source
const (
	// defaultDomainTemplate is a value for domainTemplate in config-network.
	// As Knative on OpenShift uses OpenShift's wildcard cert the domain level must have "<sub>.domain", not "<sub1>.<sub2>.domain".
	DefaultDomainTemplate = "{{.Name}}-{{.Namespace}}.{{.Domain}}"

	// defaultIngressClass is a value for ingress.class in config-network.
	DefaultIngressClass = "kourier.ingress.networking.knative.dev"
)
View Source
const ConfigManagedNamespace = "openshift-config-managed"
View Source
const ImagePrefix = "IMAGE_"

Variables

View Source
var (
	KnativeServingUpG  = knativeUp.WithLabelValues("serving_status")
	KnativeEventingUpG = knativeUp.WithLabelValues("eventing_status")
)
View Source
var Log = logf.Log.WithName("knative").WithName("openshift")

Functions

func ApplyEnvironmentToDeployment added in v1.7.2

func ApplyEnvironmentToDeployment(namespace, name string, env map[string]string, c client.Client) error

ApplyEnvironmentToDeployment adds/removes the specified values in the map to the environment variables of the specified deployment. NotFound errors are ignored.

func BuildImageOverrideMapFromEnviron added in v1.8.0

func BuildImageOverrideMapFromEnviron(environ []string) map[string]string

BuildImageOverrideMapFromEnviron creates a map to overrides registry images

func Configure

func Configure(ks *operatorv1alpha1.KnativeServing, cm, key, value string) bool

Configure is a helper to set a value for a key, potentially overriding existing contents.

func EnsureContainerMemoryLimit added in v1.9.0

func EnsureContainerMemoryLimit(s *operatorv1alpha1.CommonSpec, containerName string, memory resource.Quantity)

func IngressNamespace added in v1.7.2

func IngressNamespace(servingNamespace string) string

IngressNamespace returns namespace where ingress is deployed.

func InstallHealthDashboard added in v1.9.0

func InstallHealthDashboard(api client.Client) error

func MutateEventing added in v1.7.2

func MutateEventing(ke *eventingv1alpha1.KnativeEventing)

func SetOwnerAnnotations added in v1.8.0

func SetOwnerAnnotations(instance *operatorv1alpha1.KnativeServing) mf.Transformer

SetOwnerAnnotations is a transformer to set owner annotations on given object

func SetupMonitoringRequirements added in v1.9.0

func SetupMonitoringRequirements(api client.Client) error

func SetupServiceMonitor added in v1.9.0

func SetupServiceMonitor(ctx context.Context, cfg *rest.Config, metricsPort int32, operatorMetricsPort int32) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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