Documentation ¶
Index ¶
- Constants
- Variables
- func AddAppLabels(requestInstance *v1beta1.SSP, name string, component AppComponent, ...) client.Object
- func CheckOwnerAnnotation(obj client.Object, owner client.Object) bool
- func EnvOrDefault(envName string, defVal string) string
- func GetInfrastructureTopology(c client.Reader) (osconfv1.TopologyMode, error)
- func GetOperatorVersion() string
- type AppComponent
- type CleanupResult
- type OperationResult
- type ReconcileBuilder
- type ReconcileFunc
- type ReconcileOptions
- type ReconcileResult
- type Request
- type ResourceSpecGetter
- type ResourceStatus
- type ResourceStatusFunc
- type ResourceUpdateFunc
- type StatusMessage
- type VersionCache
Constants ¶
View Source
const ( OperatorVersionKey = "OPERATOR_VERSION" TemplateValidatorImageKey = "VALIDATOR_IMAGE" )
View Source
const ( AppKubernetesNameLabel = "app.kubernetes.io/name" AppKubernetesPartOfLabel = "app.kubernetes.io/part-of" AppKubernetesVersionLabel = "app.kubernetes.io/version" AppKubernetesManagedByLabel = "app.kubernetes.io/managed-by" AppKubernetesComponentLabel = "app.kubernetes.io/component" )
Variables ¶
View Source
var (
SSPOperatorReconcilingProperly = prometheus.NewGauge(prometheus.GaugeOpts{
Name: "ssp_operator_reconciling_properly",
Help: "Set to 1 if the reconcile process of all operands completes with no errors, and to 0 otherwise",
})
)
View Source
var ( // Scheme used for the SSP operator. Scheme = runtime.NewScheme() )
Functions ¶
func AddAppLabels ¶ added in v0.2.0
func AddAppLabels(requestInstance *v1beta1.SSP, name string, component AppComponent, obj client.Object) client.Object
AddAppLabels to the provided obj Name will translate into the AppKubernetesNameLabel Component will translate into the AppKubernetesComponentLabel Instance wide labels will be taken from the request if available
func CheckOwnerAnnotation ¶ added in v0.13.0
func EnvOrDefault ¶
func GetInfrastructureTopology ¶ added in v0.13.0
func GetInfrastructureTopology(c client.Reader) (osconfv1.TopologyMode, error)
func GetOperatorVersion ¶ added in v0.13.0
func GetOperatorVersion() string
Types ¶
type AppComponent ¶ added in v0.2.0
type AppComponent string
const ( AppComponentMonitoring AppComponent = "monitoring" AppComponentSchedule AppComponent = "schedule" AppComponentTemplating AppComponent = "templating" )
func (AppComponent) String ¶ added in v0.2.0
func (a AppComponent) String() string
type CleanupResult ¶ added in v0.13.0
type OperationResult ¶ added in v0.13.0
type OperationResult string
const ( OperationResultNone OperationResult = "unchanged" OperationResultCreated OperationResult = "created" OperationResultUpdated OperationResult = "updated" OperationResultDeleted OperationResult = "deleted" )
type ReconcileBuilder ¶ added in v0.2.0
type ReconcileBuilder interface { NamespacedResource(client.Object) ReconcileBuilder ClusterResource(client.Object) ReconcileBuilder WithAppLabels(name string, component AppComponent) ReconcileBuilder UpdateFunc(ResourceUpdateFunc) ReconcileBuilder StatusFunc(ResourceStatusFunc) ReconcileBuilder ImmutableSpec(getter ResourceSpecGetter) ReconcileBuilder Options(options ReconcileOptions) ReconcileBuilder Reconcile() (ReconcileResult, error) }
func CreateOrUpdate ¶ added in v0.2.0
func CreateOrUpdate(request *Request) ReconcileBuilder
type ReconcileFunc ¶
type ReconcileFunc = func(*Request) (ReconcileResult, error)
type ReconcileOptions ¶ added in v0.13.2
type ReconcileOptions struct { // AlwaysCallUpdateFunc specifies if the UpdateFunc should be called // on changes that don't increase the .metadata.generation field. // For example, labels and annotations. AlwaysCallUpdateFunc bool }
type ReconcileResult ¶ added in v0.13.0
type ReconcileResult struct { Status ResourceStatus Resource client.Object OperationResult OperationResult }
func CollectResourceStatus ¶
func CollectResourceStatus(request *Request, funcs ...ReconcileFunc) ([]ReconcileResult, error)
func ResourceDeletedResult ¶ added in v0.13.0
func ResourceDeletedResult(resource client.Object, res OperationResult) ReconcileResult
func (*ReconcileResult) IsSuccess ¶ added in v0.13.0
func (r *ReconcileResult) IsSuccess() bool
type Request ¶
type Request struct { reconcile.Request Client client.Client UncachedReader client.Reader Context context.Context Instance *ssp.SSP Logger logr.Logger VersionCache VersionCache TopologyMode osconfv1.TopologyMode }
func (*Request) IsSingleReplicaTopologyMode ¶ added in v0.13.0
type ResourceSpecGetter ¶ added in v0.13.0
type ResourceStatus ¶
type ResourceStatus struct { Progressing StatusMessage NotAvailable StatusMessage Degraded StatusMessage }
type ResourceStatusFunc ¶
type ResourceStatusFunc = func(resource client.Object) ResourceStatus
type ResourceUpdateFunc ¶
type StatusMessage ¶
type StatusMessage = *string
type VersionCache ¶
type VersionCache map[cacheKey]cacheValue
func (VersionCache) Add ¶
func (v VersionCache) Add(obj client.Object)
func (VersionCache) RemoveObj ¶
func (v VersionCache) RemoveObj(obj client.Object)
Click to show internal directories.
Click to hide internal directories.