base

package
v0.32.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Overview

Package base contains the common base functions and types for all APIs +k8s:deepcopy-gen=package

Index

Constants

View Source
const (
	// DependenciesInstalled is a Condition indicating that potential dependencies have
	// been installed correctly.
	DependenciesInstalled apis.ConditionType = "DependenciesInstalled"
	// InstallSucceeded is a Condition indicating that the installation of the component
	// itself has been successful.
	InstallSucceeded apis.ConditionType = "InstallSucceeded"
	// DeploymentsAvailable is a Condition indicating whether or not the Deployments of
	// the respective component have come up successfully.
	DeploymentsAvailable apis.ConditionType = "DeploymentsAvailable"
	// VersionMigrationEligible is a Condition indicating whether or not the current version of
	// Knative component is eligible to upgrade or downgrade to the specified version.
	VersionMigrationEligible apis.ConditionType = "VersionMigrationEligible"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AwssqsSourceConfiguration

type AwssqsSourceConfiguration struct {
	Enabled bool `json:"enabled"`
}

AwssqsSourceConfiguration specifies whether to enable the awssqs source.

func (*AwssqsSourceConfiguration) DeepCopy

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

func (*AwssqsSourceConfiguration) DeepCopyInto

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

type CephSourceConfiguration

type CephSourceConfiguration struct {
	Enabled bool `json:"enabled"`
}

CephSourceConfiguration specifies whether to enable the ceph source.

func (*CephSourceConfiguration) DeepCopy

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

func (*CephSourceConfiguration) DeepCopyInto

func (in *CephSourceConfiguration) DeepCopyInto(out *CephSourceConfiguration)

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

type CommonSpec

type CommonSpec struct {
	// A means to override the corresponding entries in the upstream configmaps
	// +optional
	Config ConfigMapData `json:"config,omitempty"`

	// A means to override the corresponding deployment images in the upstream.
	// If no registry is provided, the knative release images will be used.
	// +optional
	Registry Registry `json:"registry,omitempty"`

	// DEPRECATED.
	// DeprecatedResources overrides containers' resource requirements.
	// +optional
	DeprecatedResources []ResourceRequirementsOverride `json:"resources,omitempty"`

	// DeploymentOverride overrides Deployment configurations such as resources and replicas.
	// +optional
	DeploymentOverride []DeploymentOverride `json:"deployments,omitempty"`

	// ServiceOverride overrides Service configurations such as labels and annotations.
	// +optional
	ServiceOverride []ServiceOverride `json:"services,omitempty"`

	// Override containers' resource requirements
	// +optional
	Version string `json:"version,omitempty"`

	// A means to specify the manifests to install
	// +optional
	Manifests []Manifest `json:"manifests,omitempty"`

	// A means to specify the additional manifests to install
	// +optional
	AdditionalManifests []Manifest `json:"additionalManifests,omitempty"`

	// HighAvailability allows specification of HA control plane.
	// +optional
	HighAvailability *HighAvailability `json:"high-availability,omitempty"`
}

CommonSpec unifies common fields and functions on the Spec.

func (*CommonSpec) DeepCopy

func (in *CommonSpec) DeepCopy() *CommonSpec

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

func (*CommonSpec) DeepCopyInto

func (in *CommonSpec) DeepCopyInto(out *CommonSpec)

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

func (*CommonSpec) GetAdditionalManifests

func (c *CommonSpec) GetAdditionalManifests() []Manifest

GetAdditionalManifests implements KComponentSpec.

func (*CommonSpec) GetConfig

func (c *CommonSpec) GetConfig() ConfigMapData

GetConfig implements KComponentSpec.

func (*CommonSpec) GetDeploymentOverride

func (c *CommonSpec) GetDeploymentOverride() []DeploymentOverride

GetDeploymentOverride implements KComponentSpec.

func (*CommonSpec) GetHighAvailability

func (c *CommonSpec) GetHighAvailability() *HighAvailability

GetHighAvailability implements KComponentSpec.

func (*CommonSpec) GetManifests

func (c *CommonSpec) GetManifests() []Manifest

GetManifests implements KComponentSpec.

func (*CommonSpec) GetRegistry

func (c *CommonSpec) GetRegistry() *Registry

GetRegistry implements KComponentSpec.

func (*CommonSpec) GetResources

func (c *CommonSpec) GetResources() []ResourceRequirementsOverride

GetResources implements KComponentSpec.

func (*CommonSpec) GetServiceOverride added in v0.31.0

func (c *CommonSpec) GetServiceOverride() []ServiceOverride

GetServiceOverride implements KComponentSpec.

func (*CommonSpec) GetVersion

func (c *CommonSpec) GetVersion() string

GetVersion implements KComponentSpec.

type ConfigMapData

type ConfigMapData map[string]map[string]string

ConfigMapData is a nested map of maps representing all upstream ConfigMaps. The first level key is the key to the ConfigMap itself (i.e. "logging") while the second level is the data to be filled into the respective ConfigMap.

func (ConfigMapData) DeepCopy

func (in ConfigMapData) DeepCopy() ConfigMapData

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

func (ConfigMapData) DeepCopyInto

func (in ConfigMapData) DeepCopyInto(out *ConfigMapData)

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

type ContourIngressConfiguration

type ContourIngressConfiguration struct {
	Enabled bool `json:"enabled"`
}

ContourIngressConfiguration specifies whether to enable the contour ingresses.

func (*ContourIngressConfiguration) DeepCopy

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

func (*ContourIngressConfiguration) DeepCopyInto

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

type CouchdbSourceConfiguration

type CouchdbSourceConfiguration struct {
	Enabled bool `json:"enabled"`
}

CouchdbSourceConfiguration specifies whether to enable the couchdb source.

func (*CouchdbSourceConfiguration) DeepCopy

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

func (*CouchdbSourceConfiguration) DeepCopyInto

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

type CustomCerts

type CustomCerts struct {
	// One of ConfigMap or Secret
	Type string `json:"type"`

	// The name of the ConfigMap or Secret
	Name string `json:"name"`
}

CustomCerts refers to either a ConfigMap or Secret containing valid CA certificates

func (*CustomCerts) DeepCopy

func (in *CustomCerts) DeepCopy() *CustomCerts

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

func (*CustomCerts) DeepCopyInto

func (in *CustomCerts) DeepCopyInto(out *CustomCerts)

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

type DeploymentOverride

type DeploymentOverride struct {
	// Name is the name of the deployment to override.
	Name string `json:"name"`

	// Labels overrides labels for the deployment and its template.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`

	// Annotations overrides labels for the deployment and its template.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// Replicas is the number of replicas that HA parts of the control plane
	// will be scaled to.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// NodeSelector overrides nodeSelector for the deployment.
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Tolerations overrides tolerations for the deployment.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// Affinities overrides affinity for the deployment.
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// Resources overrides resources for the containers.
	// +optional
	Resources []ResourceRequirementsOverride `json:"resources,omitempty"`

	// Env overrides env vars for the containers.
	// +optional
	Env []EnvRequirementsOverride `json:"env,omitempty"`
}

DeploymentOverride defines the configurations of deployments to override.

func (*DeploymentOverride) DeepCopy

func (in *DeploymentOverride) DeepCopy() *DeploymentOverride

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

func (*DeploymentOverride) DeepCopyInto

func (in *DeploymentOverride) DeepCopyInto(out *DeploymentOverride)

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

type EnvRequirementsOverride added in v0.32.0

type EnvRequirementsOverride struct {
	// The container name
	Container string `json:"container"`
	// The desired EnvVarRequirements
	EnvVars []corev1.EnvVar `json:"envVars,omitempty"`
}

EnvRequirementsOverride enables the user to override any container's env vars.

func (*EnvRequirementsOverride) DeepCopy added in v0.32.0

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

func (*EnvRequirementsOverride) DeepCopyInto added in v0.32.0

func (in *EnvRequirementsOverride) DeepCopyInto(out *EnvRequirementsOverride)

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

type GithubSourceConfiguration

type GithubSourceConfiguration struct {
	Enabled bool `json:"enabled"`
}

GithubSourceConfiguration specifies whether to enable the github source.

func (*GithubSourceConfiguration) DeepCopy

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

func (*GithubSourceConfiguration) DeepCopyInto

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

type GitlabSourceConfiguration

type GitlabSourceConfiguration struct {
	Enabled bool `json:"enabled"`
}

GitlabSourceConfiguration specifies whether to enable the gitlab source.

func (*GitlabSourceConfiguration) DeepCopy

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

func (*GitlabSourceConfiguration) DeepCopyInto

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

type HighAvailability

type HighAvailability struct {
	// Replicas is the number of replicas that HA parts of the control plane
	// will be scaled to.
	Replicas *int32 `json:"replicas"`
}

HighAvailability specifies options for deploying Knative Serving control plane in a highly available manner. Note that HighAvailability is still in progress and does not currently provide a completely HA control plane.

func (*HighAvailability) DeepCopy

func (in *HighAvailability) DeepCopy() *HighAvailability

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

func (*HighAvailability) DeepCopyInto

func (in *HighAvailability) DeepCopyInto(out *HighAvailability)

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

type IstioGatewayOverride

type IstioGatewayOverride struct {
	// A map of values to replace the "selector" values in the knative-ingress-gateway and knative-local-gateway(cluster-local-gateway)
	Selector map[string]string `json:"selector,omitempty"`

	// A list of server specifications.
	Servers []*istiov1alpha3.Server `json:"servers,omitempty"`
}

IstioGatewayOverride override the knative-ingress-gateway and knative-local-gateway(cluster-local-gateway)

func (*IstioGatewayOverride) DeepCopy

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

func (*IstioGatewayOverride) DeepCopyInto

func (in *IstioGatewayOverride) DeepCopyInto(out *IstioGatewayOverride)

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

type IstioIngressConfiguration

type IstioIngressConfiguration struct {
	Enabled bool `json:"enabled"`

	// KnativeIngressGateway overrides the knative-ingress-gateway.
	// +optional
	KnativeIngressGateway *IstioGatewayOverride `json:"knative-ingress-gateway,omitempty"`

	// KnativeLocalGateway overrides the knative-local-gateway.
	// +optional
	KnativeLocalGateway *IstioGatewayOverride `json:"knative-local-gateway,omitempty"`
}

IstioIngressConfiguration specifies options for the istio ingresses.

func (*IstioIngressConfiguration) DeepCopy

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

func (*IstioIngressConfiguration) DeepCopyInto

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

type KComponent

type KComponent interface {
	metav1.Object
	schema.ObjectKind

	// GetSpec returns the common spec for all known types.
	GetSpec() KComponentSpec
	// GetStatus returns the common status of all known types.
	GetStatus() KComponentStatus
}

KComponent is a common interface for accessing meta, spec and status of all known types.

type KComponentSpec

type KComponentSpec interface {
	// GetConfig returns means to override entries in upstream configmaps.
	GetConfig() ConfigMapData
	// GetRegistry returns means to override deployment images.
	GetRegistry() *Registry
	// GetResources returns a list of container resource overrides.
	GetResources() []ResourceRequirementsOverride
	// GetVersion gets the version to be installed
	GetVersion() string
	// GetManifests gets the list of manifests, which should ultimately be installed
	GetManifests() []Manifest
	// GetAdditionalManifests gets the list of additional manifests, which should be installed
	GetAdditionalManifests() []Manifest

	// GetHighAvailability returns means to set the number of desired replicas
	GetHighAvailability() *HighAvailability

	// GetDeploymentOverride gets the deployment configurations to override.
	GetDeploymentOverride() []DeploymentOverride

	// GetServiceOverride gets the service configurations to override.
	GetServiceOverride() []ServiceOverride
}

KComponentSpec is a common interface for accessing the common spec of all known types.

type KComponentStatus

type KComponentStatus interface {
	// MarkInstallSucceeded marks the InstallationSucceeded status as true.
	MarkInstallSucceeded()
	// MarkInstallFailed marks the InstallationSucceeded status as false with the given
	// message.
	MarkInstallFailed(msg string)

	// MarkDeploymentsAvailable marks the DeploymentsAvailable status as true.
	MarkDeploymentsAvailable()
	// MarkDeploymentsNotReady marks the DeploymentsAvailable status as false and calls out
	// it's waiting for deployments.
	MarkDeploymentsNotReady([]string)

	// MarkVersionMigrationEligible marks the VersionMigrationEligible status as true.
	MarkVersionMigrationEligible()
	// MarkVersionMigrationNotEligible marks the VersionMigrationEligible status as false with
	// the given message.
	MarkVersionMigrationNotEligible(msg string)

	// MarkDependenciesInstalled marks the DependenciesInstalled status as true.
	MarkDependenciesInstalled()
	// MarkDependencyInstalling marks the DependenciesInstalled status as false with the
	// given message.
	MarkDependencyInstalling(msg string)
	// MarkDependencyMissing marks the DependenciesInstalled status as false with the
	// given message.
	MarkDependencyMissing(msg string)

	// GetVersion gets the currently installed version of the component.
	GetVersion() string
	// SetVersion sets the currently installed version of the component.
	SetVersion(version string)

	// GetManifests gets the url links of the manifests
	GetManifests() []string
	// SetManifests sets the url links of the manifests
	SetManifests(manifests []string)

	// IsReady return true if all conditions are satisfied
	IsReady() bool
}

KComponentStatus is a common interface for status mutations of all known types.

type KafkaSourceConfiguration

type KafkaSourceConfiguration struct {
	Enabled bool `json:"enabled"`
}

KafkaSourceConfiguration specifies whether to enable the kafka source.

func (*KafkaSourceConfiguration) DeepCopy

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

func (*KafkaSourceConfiguration) DeepCopyInto

func (in *KafkaSourceConfiguration) DeepCopyInto(out *KafkaSourceConfiguration)

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

type KourierIngressConfiguration

type KourierIngressConfiguration struct {
	Enabled bool `json:"enabled"`

	// ServiceType specifies the service type for kourier gateway.
	ServiceType v1.ServiceType `json:"service-type,omitempty"`
}

KourierIngressConfiguration specifies whether to enable the kourier ingresses.

func (*KourierIngressConfiguration) DeepCopy

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

func (*KourierIngressConfiguration) DeepCopyInto

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

type Manifest

type Manifest struct {
	// The link of the manifest URL
	Url string `json:"URL"`
}

Manifest enables the user to specify the links to the manifests' URLs

func (*Manifest) DeepCopy

func (in *Manifest) DeepCopy() *Manifest

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

func (*Manifest) DeepCopyInto

func (in *Manifest) DeepCopyInto(out *Manifest)

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

type NatssSourceConfiguration

type NatssSourceConfiguration struct {
	Enabled bool `json:"enabled"`
}

NatssSourceConfiguration specifies whether to enable the natss source.

func (*NatssSourceConfiguration) DeepCopy

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

func (*NatssSourceConfiguration) DeepCopyInto

func (in *NatssSourceConfiguration) DeepCopyInto(out *NatssSourceConfiguration)

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

type PrometheusSourceConfiguration

type PrometheusSourceConfiguration struct {
	Enabled bool `json:"enabled"`
}

PrometheusSourceConfiguration specifies whether to enable the prometheus source.

func (*PrometheusSourceConfiguration) DeepCopy

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

func (*PrometheusSourceConfiguration) DeepCopyInto

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

type RabbitmqSourceConfiguration

type RabbitmqSourceConfiguration struct {
	Enabled bool `json:"enabled"`
}

RabbitmqSourceConfiguration specifies whether to enable the rabbitmq source.

func (*RabbitmqSourceConfiguration) DeepCopy

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

func (*RabbitmqSourceConfiguration) DeepCopyInto

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

type RedisSourceConfiguration

type RedisSourceConfiguration struct {
	Enabled bool `json:"enabled"`
}

RedisSourceConfiguration specifies whether to enable the redis source.

func (*RedisSourceConfiguration) DeepCopy

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

func (*RedisSourceConfiguration) DeepCopyInto

func (in *RedisSourceConfiguration) DeepCopyInto(out *RedisSourceConfiguration)

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

type Registry

type Registry struct {
	// The default image reference template to use for all knative images.
	// It takes the form of example-registry.io/custom/path/${NAME}:custom-tag
	// ${NAME} will be replaced by the deployment container name, or caching.internal.knative.dev/v1alpha1/Image name.
	// +optional
	Default string `json:"default,omitempty"`

	// A map of a container name or image name to the full image location of the individual knative image.
	// +optional
	Override map[string]string `json:"override,omitempty"`

	// A list of secrets to be used when pulling the knative images. The secret must be created in the
	// same namespace as the knative-serving deployments, and not the namespace of this resource.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}

Registry defines image overrides of knative images. This affects both apps/v1.Deployment and caching.internal.knative.dev/v1beta1.Image. The default value is used as a default format to override for all knative deployments. The override values are specific to each knative deployment.

func (*Registry) DeepCopy

func (in *Registry) DeepCopy() *Registry

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

func (*Registry) DeepCopyInto

func (in *Registry) DeepCopyInto(out *Registry)

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

type ResourceRequirementsOverride

type ResourceRequirementsOverride struct {
	// The container name
	Container string `json:"container"`
	// The desired ResourceRequirements
	corev1.ResourceRequirements
}

ResourceRequirementsOverride enables the user to override any container's resource requests/limits specified in the embedded manifest

func (*ResourceRequirementsOverride) DeepCopy

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

func (*ResourceRequirementsOverride) DeepCopyInto

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

type ServiceOverride added in v0.31.0

type ServiceOverride struct {
	// Name is the name of the service to override.
	Name string `json:"name"`

	// Labels overrides labels for the service and its template.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`

	// Annotations overrides labels for the service and its template.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// Selector overrides the selector for the service
	// +optional
	Selector map[string]string `json:"selector,omitempty"`
}

ServiceOverride defines the configurations of the service to override.

func (*ServiceOverride) DeepCopy added in v0.31.0

func (in *ServiceOverride) DeepCopy() *ServiceOverride

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

func (*ServiceOverride) DeepCopyInto added in v0.31.0

func (in *ServiceOverride) DeepCopyInto(out *ServiceOverride)

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

Jump to

Keyboard shortcuts

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