{"modulePath":"github.com/operator-framework/operator-lifecycle-manager","version":"v0.46.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package install\n\n## Constants\n\n```go\nconst (\n\t// DefaultCertMinFresh is the default min-fresh value - 1 day\n\tDefaultCertMinFresh = time.Hour * 24\n\t// DefaultCertValidFor is the default duration a cert can be valid for - 2 years\n\tDefaultCertValidFor = time.Hour * 24 * 730\n\t// OLMCAPEMKey is the CAPEM\n\tOLMCAPEMKey = \"olmCAKey\"\n\t// OLMCAHashAnnotationKey is the label key used to store the hash of the CA cert\n\tOLMCAHashAnnotationKey = \"olmcahash\"\n\t// Organization is the organization name used in the generation of x509 certs\n\tOrganization = \"Red Hat, Inc.\"\n\t// Kubernetes System namespace\n\tKubeSystem = \"kube-system\"\n\t// olm managed label\n\tOLMManagedLabelKey   = \"olm.managed\"\n\tOLMManagedLabelValue = \"true\"\n)\n```\n\n```go\nconst (\n\tStrategyErrReasonComponentMissing   = \"ComponentMissing\"\n\tStrategyErrReasonAnnotationsMissing = \"AnnotationsMissing\"\n\tStrategyErrReasonWaiting            = \"Waiting\"\n\tStrategyErrReasonInvalidStrategy    = \"InvalidStrategy\"\n\tStrategyErrReasonTimeout            = \"Timeout\"\n\tStrategyErrReasonUnknown            = \"Unknown\"\n\tStrategyErrBadPatch                 = \"PatchUnsuccessful\"\n\tStrategyErrDeploymentUpdated        = \"DeploymentUpdated\"\n\tStrategyErrInsufficientPermissions  = \"InsufficentPermissions\"\n)\n```\n\n```go\nconst DeploymentSpecHashLabelKey = \"olm.deployment-spec-hash\"\n```\n\n```go\nconst TimedOutReason = \"ProgressDeadlineExceeded\"\n```\n\n```go\nconst WebhookDescKey = \"olm.webhook-description-generate-name\"\n```\n\n```go\nconst WebhookHashKey = \"olm.webhook-description-hash\"\n```\n\n## Functions\n\n```go\nfunc AddDefaultCertVolumeAndVolumeMounts(depSpec *appsv1.DeploymentSpec, secretName string)\n```\nAddDefaultCertVolumeAndVolumeMounts mounts the CA Cert generated by OLM to the location that OLM expects APIService certs to be as well as the location that the Operator-SDK and Kubebuilder expect webhook certs to be.\n\n```go\nfunc AuthDelegatorClusterRoleBindingName(serviceName string) string\n```\n\n```go\nfunc AuthReaderRoleBindingName(serviceName string) string\n```\n\n```go\nfunc CalculateCertExpiration(startingFrom time.Time) time.Time\n```\n\n```go\nfunc CalculateCertRotatesAt(certExpirationTime time.Time) time.Time\n```\n\n```go\nfunc DeploymentStatus(deployment *appsv1.Deployment) (string, bool, error)\n```\nStatus returns a message describing deployment status, and a bool value indicating if the status is considered done.\n\n```go\nfunc HostnamesForService(serviceName, namespace string) []string\n```\n\n```go\nfunc IsAPIServiceAdoptable(opLister operatorlister.OperatorLister, target *v1alpha1.ClusterServiceVersion, apiService *apiregistrationv1.APIService) (adoptable bool, err error)\n```\n\n```go\nfunc IsAPIServiceAvailable(apiService *apiregistrationv1.APIService) bool\n```\n\n```go\nfunc IsErrorUnrecoverable(err error) bool\n```\nIsErrorUnrecoverable reports if a given strategy error is one of the predefined unrecoverable types\n\n```go\nfunc ReasonForError(err error) string\n```\n\n```go\nfunc SecretName(serviceName string) string\n```\n\n```go\nfunc ServiceName(deploymentName string) string\n```\n\n```go\nfunc SetCAAnnotation(depSpec *appsv1.DeploymentSpec, caHash string)\n```\n\n```go\nfunc ValidWebhookRules(rules []admissionregistrationv1.RuleWithOperations) error\n```\n\n## Types\n\n```go\ntype CSVRuleChecker struct {\n\t// contains filtered or unexported fields\n}\n```\nCSVRuleChecker determines whether a PolicyRule is satisfied for a ServiceAccount by existing Roles and ClusterRoles\n\n```go\nfunc NewCSVRuleChecker(roleLister crbacv1.RoleLister, roleBindingLister crbacv1.RoleBindingLister, clusterRoleLister crbacv1.ClusterRoleLister, clusterRoleBindingLister crbacv1.ClusterRoleBindingLister, csv *v1alpha1.ClusterServiceVersion) *CSVRuleChecker\n```\nNewCSVRuleChecker returns a pointer to a new CSVRuleChecker\n\n```go\nfunc (c *CSVRuleChecker) GetClusterRole(name string) (*rbacv1.ClusterRole, error)\n```\n\n```go\nfunc (c *CSVRuleChecker) GetRole(namespace, name string) (*rbacv1.Role, error)\n```\n\n```go\nfunc (c *CSVRuleChecker) ListClusterRoleBindings() ([]*rbacv1.ClusterRoleBinding, error)\n```\n\n```go\nfunc (c *CSVRuleChecker) ListRoleBindings(namespace string) ([]*rbacv1.RoleBinding, error)\n```\n\n```go\nfunc (c *CSVRuleChecker) RuleSatisfied(sa *corev1.ServiceAccount, namespace string, rule rbacv1.PolicyRule) (bool, error)\n```\nRuleSatisfied returns true if a ServiceAccount is authorized to perform all actions described by a PolicyRule in a namespace\n\n```go\ntype DeploymentInitializerBuilderFunc func(owner ownerutil.Owner) DeploymentInitializerFunc\n```\nDeploymentInitializerBuilderFunc returns a DeploymentInitializerFunc based on the given context.\n\n```go\ntype DeploymentInitializerFunc func(deployment *appsv1.Deployment) error\n```\nDeploymentInitializerFunc takes a deployment object and appropriately initializes it for install.\n\nBefore a deployment is created on the cluster, we can run a series of overrides functions that will properly initialize the deployment object.\n\n```go\ntype DeploymentInitializerFuncChain []DeploymentInitializerFunc\n```\nDeploymentInitializerFuncChain defines a chain of DeploymentInitializerFunc.\n\n```go\nfunc (c DeploymentInitializerFuncChain) Apply(deployment *appsv1.Deployment) (err error)\n```\nApply runs series of overrides functions that will properly initialize the deployment object.\n\n```go\ntype NullStrategyInstaller struct{}\n```\n\n```go\nfunc (i *NullStrategyInstaller) CertsRotateAt() time.Time\n```\n\n```go\nfunc (i *NullStrategyInstaller) CertsRotated() bool\n```\n\n```go\nfunc (i *NullStrategyInstaller) CheckInstalled(s Strategy) (bool, error)\n```\n\n```go\nfunc (i *NullStrategyInstaller) Install(s Strategy) error\n```\n\n```go\nfunc (i *NullStrategyInstaller) ShouldRotateCerts(s Strategy) (bool, error)\n```\n\n```go\ntype RuleChecker interface {\n\t// RuleSatisfied determines whether a PolicyRule is satisfied for a ServiceAccount\n\t// by existing Roles and ClusterRoles\n\tRuleSatisfied(sa *corev1.ServiceAccount, namespace string, rule rbacv1.PolicyRule) (bool, error)\n}\n```\nRuleChecker is used to verify whether PolicyRules are satisfied by existing Roles or ClusterRoles\n\n```go\ntype Strategy interface {\n\tGetStrategyName() string\n}\n```\n\n```go\ntype StrategyDeploymentInstaller struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (i *StrategyDeploymentInstaller) CertsRotateAt() time.Time\n```\n\n```go\nfunc (i *StrategyDeploymentInstaller) CertsRotated() bool\n```\n\n```go\nfunc (i *StrategyDeploymentInstaller) CheckInstalled(s Strategy) (installed bool, err error)\n```\nCheckInstalled can return nil (installed), or errors Errors can indicate: some component missing (keep installing), unable to query (check again later), or unrecoverable (failed in a way we know we can't recover from)\n\n```go\nfunc (i *StrategyDeploymentInstaller) Install(s Strategy) error\n```\n\n```go\nfunc (i *StrategyDeploymentInstaller) ShouldRotateCerts(s Strategy) (bool, error)\n```\n\n```go\ntype StrategyError struct {\n\tReason  string\n\tMessage string\n}\n```\nStrategyError is used to represent error types for install strategies\n\n```go\nfunc (e StrategyError) Error() string\n```\nError implements the Error interface.\n\n```go\ntype StrategyInstaller interface {\n\tInstall(strategy Strategy) error\n\tCheckInstalled(strategy Strategy) (bool, error)\n\tShouldRotateCerts(strategy Strategy) (bool, error)\n\tCertsRotateAt() time.Time\n\tCertsRotated() bool\n}\n```\n\n```go\nfunc NewStrategyDeploymentInstaller(strategyClient wrappers.InstallStrategyDeploymentInterface, templateAnnotations map[string]string, owner ownerutil.Owner, previousStrategy Strategy, initializers DeploymentInitializerFuncChain, apiServiceDescriptions []v1alpha1.APIServiceDescription, webhookDescriptions []v1alpha1.WebhookDescription) StrategyInstaller\n```\n\n```go\ntype StrategyResolver struct {\n\tOverridesBuilderFunc DeploymentInitializerBuilderFunc\n}\n```\n\n```go\nfunc (r *StrategyResolver) InstallerForStrategy(strategyName string, opClient operatorclient.ClientInterface, opLister operatorlister.OperatorLister, owner ownerutil.Owner, annotations map[string]string, apiServiceDescriptions []v1alpha1.APIServiceDescription, webhookDescriptions []v1alpha1.WebhookDescription, previousStrategy Strategy) StrategyInstaller\n```\n\n```go\nfunc (r *StrategyResolver) UnmarshalStrategy(s v1alpha1.NamedInstallStrategy) (strategy Strategy, err error)\n```\n\n```go\ntype StrategyResolverInterface interface {\n\tUnmarshalStrategy(s v1alpha1.NamedInstallStrategy) (strategy Strategy, err error)\n\tInstallerForStrategy(strategyName string, opClient operatorclient.ClientInterface, opLister operatorlister.OperatorLister, owner ownerutil.Owner, annotations map[string]string, apiServiceDescriptions []v1alpha1.APIServiceDescription, webhookDescriptions []v1alpha1.WebhookDescription, previousStrategy Strategy) StrategyInstaller\n}\n```\n\n","path":"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/install","name":"install","synopsis":"","isRedistributable":true}
