Help us shape the future of Go! Take the 2026 Go Developer Survey

common

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 5 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"
)

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
}

BaseComponent represents basic kubernetes application

type BaseComponentAutoscaling

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

BaseComponentAutoscaling represents basic HPA configuration

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
	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)
	GetImageReference() string
	SetImageReference(string)
}

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