Documentation ¶
Index ¶
- Constants
- func FilterKnownTypesByReadyCRDs(logger logr.Logger, scheme *runtime.Scheme, ...) ([]client.Object, error)
- func FilterStorageTypesByReadyCRDs(logger logr.Logger, scheme *runtime.Scheme, ...) ([]*registration.StorageType, error)
- func GetNonReadyCRDs(cfg config.Values, crdManager *Manager, ...) map[string]apiextensions.CustomResourceDefinition
- func SpecEqual(a apiextensions.CustomResourceDefinition, ...) bool
- func SpecEqualIgnoreConversionWebhook(a apiextensions.CustomResourceDefinition, ...) bool
- func VersionEqual(a apiextensions.CustomResourceDefinition, ...) bool
- type Manager
- func (m *Manager) ApplyCRDs(ctx context.Context, goalCRDs []apiextensions.CustomResourceDefinition, ...) error
- func (m *Manager) FindMatchingCRDs(existing []apiextensions.CustomResourceDefinition, ...) map[string]apiextensions.CustomResourceDefinition
- func (m *Manager) FindNonMatchingCRDs(existing []apiextensions.CustomResourceDefinition, ...) map[string]apiextensions.CustomResourceDefinition
- func (m *Manager) ListOperatorCRDs(ctx context.Context) ([]apiextensions.CustomResourceDefinition, error)
- func (m *Manager) LoadOperatorCRDs(path string, podNamespace string) ([]apiextensions.CustomResourceDefinition, error)
Constants ¶
View Source
const CRDLocation = "crds"
View Source
const ServiceOperatorVersionLabel = "serviceoperator.azure.com/version"
ServiceOperatorVersionLabel is the label the CRDs have on them containing the ASO version. This value must match the value injected by config/crd/labels.yaml
Variables ¶
This section is empty.
Functions ¶
func FilterStorageTypesByReadyCRDs ¶
func FilterStorageTypesByReadyCRDs( logger logr.Logger, scheme *runtime.Scheme, skip map[string]apiextensions.CustomResourceDefinition, storageTypes []*registration.StorageType, ) ([]*registration.StorageType, error)
func GetNonReadyCRDs ¶
func GetNonReadyCRDs( cfg config.Values, crdManager *Manager, goalCRDs []apiextensions.CustomResourceDefinition, existingCRDs []apiextensions.CustomResourceDefinition) map[string]apiextensions.CustomResourceDefinition
func SpecEqual ¶
func SpecEqual(a apiextensions.CustomResourceDefinition, b apiextensions.CustomResourceDefinition) bool
func SpecEqualIgnoreConversionWebhook ¶
func SpecEqualIgnoreConversionWebhook(a apiextensions.CustomResourceDefinition, b apiextensions.CustomResourceDefinition) bool
func VersionEqual ¶
func VersionEqual(a apiextensions.CustomResourceDefinition, b apiextensions.CustomResourceDefinition) bool
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(logger logr.Logger, kubeClient kubeclient.Client) *Manager
func (*Manager) ApplyCRDs ¶
func (m *Manager) ApplyCRDs( ctx context.Context, goalCRDs []apiextensions.CustomResourceDefinition, existingCRDs []apiextensions.CustomResourceDefinition, patterns []string) error
func (*Manager) FindMatchingCRDs ¶
func (m *Manager) FindMatchingCRDs( existing []apiextensions.CustomResourceDefinition, goal []apiextensions.CustomResourceDefinition, comparators ...func(a apiextensions.CustomResourceDefinition, b apiextensions.CustomResourceDefinition) bool, ) map[string]apiextensions.CustomResourceDefinition
FindMatchingCRDs finds the CRDs in "goal" that are in "existing" AND compare as equal according to the comparators with the corresponding CRD in "goal"
func (*Manager) FindNonMatchingCRDs ¶
func (m *Manager) FindNonMatchingCRDs( existing []apiextensions.CustomResourceDefinition, goal []apiextensions.CustomResourceDefinition, comparators ...func(a apiextensions.CustomResourceDefinition, b apiextensions.CustomResourceDefinition) bool, ) map[string]apiextensions.CustomResourceDefinition
FindNonMatchingCRDs finds the CRDs in "goal" that are not in "existing" OR are in "existing" but mismatch with the "goal" based on the comparator functions.
func (*Manager) ListOperatorCRDs ¶
func (m *Manager) ListOperatorCRDs(ctx context.Context) ([]apiextensions.CustomResourceDefinition, error)
func (*Manager) LoadOperatorCRDs ¶
func (m *Manager) LoadOperatorCRDs(path string, podNamespace string) ([]apiextensions.CustomResourceDefinition, error)
Click to show internal directories.
Click to hide internal directories.