common

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OpConfigPropDefaultIssuer issuer to use for cert-manager certificate
	OpConfigPropDefaultIssuer = "defaultIssuer"

	// OpConfigPropUseClusterIssuer whether to use ClusterIssuer for cert-manager certificate
	OpConfigPropUseClusterIssuer = "useClusterIssuer"

	// OpConfigSvcBindingGVKs a comma-seperated list of GroupVersionKind values in "<Kind>.<version>.<group>" format.
	// e.g. "CronTab.v1.stable.example.com"
	OpConfigSvcBindingGVKs = "serviceBinding.groupVersionKinds"

	// OpConfigDefaultHostname a DNS name to be used for hostname generation.
	OpConfigDefaultHostname = "defaultHostname"
)

Variables

View Source
var Config = OpConfig{}

Config stores operator configuration

Functions

This section is empty.

Types

type BaseComponent

type BaseComponent interface {
	GetApplicationImage() string
	GetPullPolicy() *corev1.PullPolicy
	GetPullSecret() *string
	GetServiceAccountName() *string
	GetReplicas() *int32
	GetLivenessProbe() *corev1.Probe
	GetReadinessProbe() *corev1.Probe
	GetVolumes() []corev1.Volume
	GetVolumeMounts() []corev1.VolumeMount
	GetResourceConstraints() *corev1.ResourceRequirements
	GetExpose() *bool
	GetEnv() []corev1.EnvVar
	GetEnvFrom() []corev1.EnvFromSource
	GetCreateKnativeService() *bool
	GetArchitecture() []string
	GetAutoscaling() BaseComponentAutoscaling
	GetStorage() BaseComponentStorage
	GetService() BaseComponentService
	GetVersion() string
	GetCreateAppDefinition() *bool
	GetApplicationName() string
	GetMonitoring() BaseComponentMonitoring
	GetLabels() map[string]string
	GetAnnotations() map[string]string
	GetStatus() BaseComponentStatus
	GetInitContainers() []corev1.Container
	GetSidecarContainers() []corev1.Container
	GetGroupName() string
	GetRoute() BaseComponentRoute
	GetBindings() BaseComponentBindings
	GetAffinity() BaseComponentAffinity
}

BaseComponent represents basic kubernetes application

type BaseComponentAffinity added in v0.6.0

type BaseComponentAffinity interface {
	GetNodeAffinity() *corev1.NodeAffinity
	GetPodAffinity() *corev1.PodAffinity
	GetPodAntiAffinity() *corev1.PodAntiAffinity
	GetArchitecture() []string
	GetNodeAffinityLabels() map[string]string
}

BaseComponentAffinity describes deployment and pod affinity

type BaseComponentAutoscaling

type BaseComponentAutoscaling interface {
	GetMinReplicas() *int32
	GetMaxReplicas() int32
	GetTargetCPUUtilizationPercentage() *int32
}

BaseComponentAutoscaling represents basic HPA configuration

type BaseComponentBindings added in v0.5.0

type BaseComponentBindings interface {
	GetAutoDetect() *bool
	GetResourceRef() string
	GetEmbedded() *runtime.RawExtension
	GetExpose() BaseComponentExpose
}

BaseComponentBindings represents Service Binding information

type BaseComponentExpose added in v0.7.0

type BaseComponentExpose interface {
	GetEnabled() *bool
}

BaseComponentExpose represents authentication info when binding services

type BaseComponentMonitoring

type BaseComponentMonitoring interface {
	GetLabels() map[string]string
	GetEndpoints() []prometheusv1.Endpoint
}

BaseComponentMonitoring represents basic service monitoring configuration

type BaseComponentRoute

type BaseComponentRoute interface {
	GetCertificate() Certificate
	GetTermination() *routev1.TLSTerminationType
	GetInsecureEdgeTerminationPolicy() *routev1.InsecureEdgeTerminationPolicyType
	GetAnnotations() map[string]string
	GetHost() string
	GetPath() string
	GetCertificateSecretRef() *string
}

BaseComponentRoute represents route configuration

type BaseComponentService

type BaseComponentService interface {
	GetPort() int32
	GetTargetPort() *int32
	GetPortName() string
	GetType() *corev1.ServiceType
	GetNodePort() *int32
	GetPorts() []corev1.ServicePort
	GetAnnotations() map[string]string
	GetProvides() ServiceBindingProvides
	GetConsumes() []ServiceBindingConsumes
	GetCertificate() Certificate
	GetCertificateSecretRef() *string
}

BaseComponentService represents basic service configuration

type BaseComponentStatus

type BaseComponentStatus interface {
	GetConditions() []StatusCondition
	GetCondition(StatusConditionType) StatusCondition
	SetCondition(StatusCondition)
	NewCondition() StatusCondition
	GetConsumedServices() ConsumedServices
	SetConsumedServices(ConsumedServices)
	GetResolvedBindings() []string
	SetResolvedBindings([]string)
	GetImageReference() string
	SetImageReference(string)
	GetBinding() *corev1.LocalObjectReference
	SetBinding(*corev1.LocalObjectReference)
}

BaseComponentStatus returns base appplication status

type BaseComponentStorage

type BaseComponentStorage interface {
	GetSize() string
	GetMountPath() string
	GetVolumeClaimTemplate() *corev1.PersistentVolumeClaim
}

BaseComponentStorage represents basic PVC configuration

type Certificate

type Certificate interface {
	GetSpec() certmngrv1alpha2.CertificateSpec
}

Certificate returns cert-manager CertificateSpec

type ConsumedServices

type ConsumedServices map[ServiceBindingCategory][]string

ConsumedServices stores status of the service binding dependencies

type OpConfig

type OpConfig map[string]string

OpConfig stored operator configuration

func DefaultOpConfig

func DefaultOpConfig() OpConfig

DefaultOpConfig returns default configuration

func (OpConfig) LoadFromConfigMap

func (oc OpConfig) LoadFromConfigMap(cm *corev1.ConfigMap)

LoadFromConfigMap creates a config out of kubernetes config map

type ServiceBindingAuth

type ServiceBindingAuth interface {
	GetUsername() corev1.SecretKeySelector
	GetPassword() corev1.SecretKeySelector
}

ServiceBindingAuth represents authentication info when binding services

type ServiceBindingCategory

type ServiceBindingCategory string

ServiceBindingCategory ...

const (
	// ServiceBindingCategoryOpenAPI ...
	ServiceBindingCategoryOpenAPI ServiceBindingCategory = "openapi"
)

type ServiceBindingConsumes

type ServiceBindingConsumes interface {
	GetName() string
	GetNamespace() string
	GetCategory() ServiceBindingCategory
	GetMountPath() string
}

ServiceBindingConsumes represents a service to be consumed

type ServiceBindingProvides

type ServiceBindingProvides interface {
	GetCategory() ServiceBindingCategory
	GetContext() string
	GetProtocol() string
	GetAuth() ServiceBindingAuth
}

ServiceBindingProvides represents a service to be provided

type StatusCondition

type StatusCondition interface {
	GetLastTransitionTime() *metav1.Time
	SetLastTransitionTime(*metav1.Time)

	GetLastUpdateTime() metav1.Time
	SetLastUpdateTime(metav1.Time)

	GetReason() string
	SetReason(string)

	GetMessage() string
	SetMessage(string)

	GetStatus() corev1.ConditionStatus
	SetStatus(corev1.ConditionStatus)

	GetType() StatusConditionType
	SetType(StatusConditionType)
}

StatusCondition ...

type StatusConditionType

type StatusConditionType string

StatusConditionType ...

const (
	// StatusConditionTypeReconciled ...
	StatusConditionTypeReconciled StatusConditionType = "Reconciled"

	// StatusConditionTypeDependenciesSatisfied ...
	StatusConditionTypeDependenciesSatisfied StatusConditionType = "DependenciesSatisfied"
)

Jump to

Keyboard shortcuts

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