Documentation ¶
Index ¶
- func IdentifyCPFSNs(r client.Reader, operatorNs string) (string, error)
- type Bootstrap
- func (b *Bootstrap) CheckCRD(apiGroupVersion string, kind string) (bool, error)
- func (b *Bootstrap) CheckClusterType(ns string) (bool, error)
- func (b *Bootstrap) CheckCsSubscription() error
- func (b *Bootstrap) CheckDeployStatus(ctx context.Context) (operatorDeployed bool, servicesDeployed bool)
- func (b *Bootstrap) CheckOperatorCatalog(ns string) error
- func (b *Bootstrap) CheckWarningCondition(instance *apiv3.CommonService) error
- func (b *Bootstrap) CleanNamespaceScopeResources() error
- func (b *Bootstrap) Cleanup(operatorNs string, resource *Resource) error
- func (b *Bootstrap) CleanupWebhookResources() error
- func (b *Bootstrap) ConfigCertManagerOperandManagedByOperator(ctx context.Context) error
- func (b *Bootstrap) ConfigODLMOperandManagedByOperator(ctx context.Context) error
- func (b *Bootstrap) CreateCsCR() error
- func (b *Bootstrap) CreateCsMaps() error
- func (b *Bootstrap) CreateEDBImageMaps() error
- func (b *Bootstrap) CreateKeycloakThemesConfigMap() error
- func (b *Bootstrap) CreateNamespace(name string) error
- func (b *Bootstrap) CreateNsScopeConfigmap() error
- func (b *Bootstrap) CreateOrUpdateFromYaml(yamlContent []byte, alwaysUpdate ...bool) error
- func (b *Bootstrap) DeleteFromYaml(objectTemplate string, data interface{}) error
- func (b *Bootstrap) DeployCertManagerCR() error
- func (b *Bootstrap) DeployResource(cr, placeholder string) bool
- func (b *Bootstrap) GetObjs(objectTemplate string, data interface{}, alwaysUpdate ...bool) ([]*unstructured.Unstructured, error)
- func (b *Bootstrap) GetOperandConfig(ctx context.Context, name, namespace string) (*odlm.OperandConfig, error)
- func (b *Bootstrap) GetOperandRegistry(ctx context.Context, name, namespace string) (*odlm.OperandRegistry, error)
- func (b *Bootstrap) GetSubscription(ctx context.Context, name, namespace string) (*unstructured.Unstructured, error)
- func (b *Bootstrap) InitResources(instance *apiv3.CommonService, forceUpdateODLMCRs bool) error
- func (b *Bootstrap) InstallOrUpdateOpcon(forceUpdateODLMCRs bool) error
- func (b *Bootstrap) InstallOrUpdateOperatorConfig(config string, forceUpdateODLMCRs bool) error
- func (b *Bootstrap) InstallOrUpdateOpreg(forceUpdateODLMCRs bool, installPlanApproval olmv1alpha1.Approval) error
- func (b *Bootstrap) IsBYOCert() (bool, error)
- func (b *Bootstrap) ListCerts(ctx context.Context, opts ...client.ListOption) *certmanagerv1.CertificateList
- func (b *Bootstrap) ListIssuer(ctx context.Context, opts ...client.ListOption) *certmanagerv1.IssuerList
- func (b *Bootstrap) ListNssCRs(ctx context.Context, namespace string) (*nssv1.NamespaceScopeList, error)
- func (b *Bootstrap) ListOperandConfig(ctx context.Context, opts ...client.ListOption) *odlm.OperandConfigList
- func (b *Bootstrap) ListOperandRegistry(ctx context.Context, opts ...client.ListOption) *odlm.OperandRegistryList
- func (b *Bootstrap) ListOperatorConfig(ctx context.Context, opts ...client.ListOption) *odlm.OperatorConfigList
- func (b *Bootstrap) ListSubscriptions(ctx context.Context, namespace string, listOptions client.ListOptions) (*unstructured.UnstructuredList, error)
- func (b *Bootstrap) PropagateCPPConfig(instance *corev1.ConfigMap) error
- func (b *Bootstrap) PropagateDefaultCR(instance *apiv3.CommonService) error
- func (b *Bootstrap) ResourceExists(dc discovery.DiscoveryInterface, apiGroupVersion, kind string) (bool, error)
- func (b *Bootstrap) UpdateCsOpApproval() error
- func (b *Bootstrap) UpdateEDBUserManaged() error
- func (b *Bootstrap) UpdateResourceLabel(instance *apiv3.CommonService) error
- func (b *Bootstrap) UpdateResourceWithLabel(resources *unstructured.UnstructuredList, labels map[string]string) error
- func (b *Bootstrap) WaitResourceReady(apiGroupVersion string, kind string) error
- type CSOperator
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bootstrap ¶
type Bootstrap struct { client.Client client.Reader Config *rest.Config record.EventRecorder *deploy.Manager SaasEnable bool MultiInstancesEnable bool CSOperators []CSOperator CSData apiv3.CSData }
func NewBootstrap ¶
NewBootstrap is the way to create a NewBootstrap struct
func (*Bootstrap) CheckCsSubscription ¶
func (*Bootstrap) CheckDeployStatus ¶
func (*Bootstrap) CheckOperatorCatalog ¶
func (*Bootstrap) CheckWarningCondition ¶
func (b *Bootstrap) CheckWarningCondition(instance *apiv3.CommonService) error
CheckWarningCondition
func (*Bootstrap) CleanNamespaceScopeResources ¶
CleanNamespaceScopeResources will delete the v3 NamesapceScopes resources and namespace scope operator NamespaceScope resources include common-service, nss-managedby-odlm, nss-odlm-scope, and odlm-scope-managedby-odlm
func (*Bootstrap) CleanupWebhookResources ¶
func (*Bootstrap) ConfigCertManagerOperandManagedByOperator ¶
func (*Bootstrap) ConfigODLMOperandManagedByOperator ¶
ConfigODLMOperandManagedByOperator gets all OperandRegistry and OperandConfig which are managed by CS operator To confirm that the deployment of CRs are in the correct ServicesNamespace
func (*Bootstrap) CreateCsCR ¶
func (*Bootstrap) CreateCsMaps ¶
CreateCsMaps will create a new common-service-maps configmap if not exists
func (*Bootstrap) CreateEDBImageMaps ¶
CreateEDBImageConfig creates a ConfigMap contains EDB image reference
func (*Bootstrap) CreateKeycloakThemesConfigMap ¶
CreateKeycloakThemesConfigMap creates a ConfigMap contains Keycloak themes
func (*Bootstrap) CreateNamespace ¶
func (*Bootstrap) CreateNsScopeConfigmap ¶
CreateNsScopeConfigmap creates nss configmap for operators
func (*Bootstrap) CreateOrUpdateFromYaml ¶
func (*Bootstrap) DeleteFromYaml ¶
DeleteFromYaml takes [objectTemplate, b.CSData] and delete the object according to the objectTemplate
func (*Bootstrap) DeployCertManagerCR ¶
func (*Bootstrap) DeployResource ¶
deployResource deploys the given resource CR
func (*Bootstrap) GetObjs ¶
func (b *Bootstrap) GetObjs(objectTemplate string, data interface{}, alwaysUpdate ...bool) ([]*unstructured.Unstructured, error)
func (*Bootstrap) GetOperandConfig ¶
func (b *Bootstrap) GetOperandConfig(ctx context.Context, name, namespace string) (*odlm.OperandConfig, error)
GetOperandConfig returns the OperandConfig instance of "name" from "namespace" namespace
func (*Bootstrap) GetOperandRegistry ¶
func (b *Bootstrap) GetOperandRegistry(ctx context.Context, name, namespace string) (*odlm.OperandRegistry, error)
GetOperandRegistry returns the OperandRegistry instance of "name" from "namespace" namespace
func (*Bootstrap) GetSubscription ¶
func (b *Bootstrap) GetSubscription(ctx context.Context, name, namespace string) (*unstructured.Unstructured, error)
GetSubscription returns the subscription instance of "name" from "namespace" namespace
func (*Bootstrap) InitResources ¶
func (b *Bootstrap) InitResources(instance *apiv3.CommonService, forceUpdateODLMCRs bool) error
InitResources initialize resources at the bootstrap of operator
func (*Bootstrap) InstallOrUpdateOpcon ¶
InstallOrUpdateOpcon will install or update OperandConfig when Opcon CRD is existent
func (*Bootstrap) InstallOrUpdateOperatorConfig ¶
InstallOrUpdateOpcon will install or update OperandConfig when Opcon CRD is existent
func (*Bootstrap) InstallOrUpdateOpreg ¶
func (b *Bootstrap) InstallOrUpdateOpreg(forceUpdateODLMCRs bool, installPlanApproval olmv1alpha1.Approval) error
InstallOrUpdateOpreg will install or update OperandRegistry when Opreg CRD is existent
func (*Bootstrap) IsBYOCert ¶
1. try to get cs-ca-certificate-secret 2. try to get cs-ca-certificate if we get secret but not get the cert, it is BYOC
func (*Bootstrap) ListCerts ¶
func (b *Bootstrap) ListCerts(ctx context.Context, opts ...client.ListOption) *certmanagerv1.CertificateList
ListCerts returns the Certificate instance list with "options"
func (*Bootstrap) ListIssuer ¶
func (b *Bootstrap) ListIssuer(ctx context.Context, opts ...client.ListOption) *certmanagerv1.IssuerList
ListIssuer returns the Iusser instance list with "options"
func (*Bootstrap) ListNssCRs ¶
func (b *Bootstrap) ListNssCRs(ctx context.Context, namespace string) (*nssv1.NamespaceScopeList, error)
ListNssCRs returns the NameSpaceScopes instance list with "options"
func (*Bootstrap) ListOperandConfig ¶
func (b *Bootstrap) ListOperandConfig(ctx context.Context, opts ...client.ListOption) *odlm.OperandConfigList
ListOperandConfig returns the OperandConfig instance with "options"
func (*Bootstrap) ListOperandRegistry ¶
func (b *Bootstrap) ListOperandRegistry(ctx context.Context, opts ...client.ListOption) *odlm.OperandRegistryList
ListOperandRegistry returns the OperandRegistry instance with "options"
func (*Bootstrap) ListOperatorConfig ¶
func (b *Bootstrap) ListOperatorConfig(ctx context.Context, opts ...client.ListOption) *odlm.OperatorConfigList
ListOperatorConfig returns the OperatorConfig instance with "options"
func (*Bootstrap) ListSubscriptions ¶
func (b *Bootstrap) ListSubscriptions(ctx context.Context, namespace string, listOptions client.ListOptions) (*unstructured.UnstructuredList, error)
GetSubscription returns the subscription instances from a namespace
func (*Bootstrap) PropagateCPPConfig ¶
func (*Bootstrap) PropagateDefaultCR ¶
func (b *Bootstrap) PropagateDefaultCR(instance *apiv3.CommonService) error
func (*Bootstrap) ResourceExists ¶
func (b *Bootstrap) ResourceExists(dc discovery.DiscoveryInterface, apiGroupVersion, kind string) (bool, error)
ResourceExists returns true if the given resource kind exists in the given api groupversion
func (*Bootstrap) UpdateCsOpApproval ¶
update approval mode for the common service operator use label to find the subscription need this function because common service operator is not in operandRegistry
func (*Bootstrap) UpdateEDBUserManaged ¶
func (*Bootstrap) UpdateResourceLabel ¶
func (b *Bootstrap) UpdateResourceLabel(instance *apiv3.CommonService) error
func (*Bootstrap) UpdateResourceWithLabel ¶
func (b *Bootstrap) UpdateResourceWithLabel(resources *unstructured.UnstructuredList, labels map[string]string) error