Documentation
¶
Index ¶
- Constants
- Variables
- func AddAppLabels(requestInstance *ssp.SSP, name string, component AppComponent, ...) metav1.Object
- func AddConversionFunctions(s *runtime.Scheme) error
- func CheckOwnerAnnotation(obj client.Object, owner client.Object) bool
- func CipherIDs(names []string, logger *logr.Logger) (cipherSuites []uint16)
- func GetKnownCipherId(IANACipherName string) (uint16, bool)
- func ListOwnedResources[L any, T any, PtrL interface{ ... }, PtrT interface{ ... }](request *Request, listOpts ...client.ListOption) ([]T, error)
- func UpdateLabels(expected, found client.Object)
- type AppComponent
- type CleanupResult
- func Cleanup(request *Request, resource client.Object) (CleanupResult, error)
- func CleanupResources[L any, T any, PtrL interface{ ... }, PtrT interface{ ... }](request *Request, listOpts ...client.ListOption) ([]CleanupResult, error)
- func DeleteAll(request *Request, resources ...client.Object) ([]CleanupResult, error)
- type OperationResult
- type ReconcileBuilder
- type ReconcileFunc
- type ReconcileOptions
- type ReconcileResult
- type Request
- type ResourceSpecGetter
- type ResourceStatus
- type ResourceStatusFunc
- type ResourceUpdateFunc
- type SSPTLSOptions
- type StatusMessage
- type VersionCache
Constants ¶
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" AppKubernetesManagedByValue string = "ssp-operator" )
View Source
const (
RequiredSCCAnnotationValue = "restricted-v2"
)
Variables ¶
View Source
var ( // Scheme used for the SSP operator. Scheme = runtime.NewScheme() )
Functions ¶
func AddAppLabels ¶ added in v0.2.0
func AddAppLabels(requestInstance *ssp.SSP, name string, component AppComponent, obj metav1.Object) metav1.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 AddConversionFunctions ¶ added in v0.18.0
AddConversionFunctions is useful in operand unit tests only
func CheckOwnerAnnotation ¶ added in v0.13.0
func GetKnownCipherId ¶ added in v0.16.2
func ListOwnedResources ¶ added in v0.20.0
func ListOwnedResources[L any, T any, PtrL interface { *L client.ObjectList }, PtrT interface { *T client.Object }](request *Request, listOpts ...client.ListOption) ([]T, error)
func UpdateLabels ¶ added in v0.16.0
Types ¶
type AppComponent ¶ added in v0.2.0
type AppComponent string
const ( AppComponentMonitoring AppComponent = "monitoring" AppComponentSchedule AppComponent = "schedule" AppComponentTemplating AppComponent = "templating" AppComponentVMDeletionProtection AppComponent = "vmDeleteProtection" )
func (AppComponent) String ¶ added in v0.2.0
func (a AppComponent) String() string
type CleanupResult ¶ added in v0.13.0
func Cleanup ¶ added in v0.13.0
func Cleanup(request *Request, resource client.Object) (CleanupResult, error)
func CleanupResources ¶ added in v0.22.0
func CleanupResources[L any, T any, PtrL interface { *L client.ObjectList }, PtrT interface { *T client.Object }](request *Request, listOpts ...client.ListOption) ([]CleanupResult, error)
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
InitialResource client.Object
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
InstanceChanged bool
Logger logr.Logger
VersionCache VersionCache
TopologyMode osconfv1.TopologyMode
CrdList crd_watch.CrdList
}
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 SSPTLSOptions ¶ added in v0.16.1
type SSPTLSOptions struct {
MinTLSVersion string `json:"minTLSVersion,omitempty"`
OpenSSLCipherNames []string `json:"openSSLCipherNames,omitempty"`
}
func NewSSPTLSOptions ¶ added in v0.16.1
func NewSSPTLSOptions(tlsSecurityProfile *ocpv1.TLSSecurityProfile, logger *logr.Logger) (*SSPTLSOptions, error)
func (*SSPTLSOptions) IsEmpty ¶ added in v0.16.1
func (s *SSPTLSOptions) IsEmpty() bool
func (*SSPTLSOptions) MinTLSVersionId ¶ added in v0.16.1
func (s *SSPTLSOptions) MinTLSVersionId() (uint16, error)
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.