Documentation ¶
Index ¶
- Variables
- func GetRegistryServiceAddr(pkgName, namespace string) string
- type BundleAddModeType
- type RegistryPod
- type RegistryResources
- func (rr *RegistryResources) CreatePackageManifestsRegistry(ctx context.Context, catsrc *v1alpha1.CatalogSource, namespace string) error
- func (rr *RegistryResources) DeletePackageManifestsRegistry(ctx context.Context, namespace string) error
- func (rr *RegistryResources) IsRegistryDataStale(ctx context.Context, namespace string) (bool, error)
- func (rr *RegistryResources) IsRegistryExist(ctx context.Context, namespace string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
var SDKLabels = map[string]string{
"owner": "operator-sdk",
}
SDKLabels are used to identify certain operator-sdk resources.
Functions ¶
func GetRegistryServiceAddr ¶
GetRegistryServiceAddr returns a Service's DNS name + port for a given pkgName and namespace.
Types ¶
type BundleAddModeType ¶ added in v1.0.0
type BundleAddModeType = string
BundleAddModeType - type of BundleAddMode in RegistryPod struct
const ( // SemverBundleAddMode - bundle add mode for semver SemverBundleAddMode BundleAddModeType = "semver" // ReplacesBundleAddMode - bundle add mode for replaces ReplacesBundleAddMode BundleAddModeType = "replaces" )
type RegistryPod ¶ added in v1.0.0
type RegistryPod struct { // BundleAddMode specifies the graph update mode that defines how channel graphs are updated // It is of the type BundleAddModeType BundleAddMode BundleAddModeType // BundleImage specifies the container image that opm uses to generate and incrementally update the database BundleImage string // Index image contains a database of pointers to operator manifest content that is queriable via an API. // new version of an operator bundle when published can be added to an index image IndexImage string // DBPath refers to the registry DB; // if an index image is provided, the existing registry DB is located at /database/index.db DBPath string // Namespace refers to the specific namespace in which the registry pod will be created and scoped to Namespace string // Kubeclient refers to a Kubernetes clientset that implements kubernetes.Interface. Kubeclient kubernetes.Interface // GRPCPort is the container grpc port which is defaulted to 50051 GRPCPort int32 // contains filtered or unexported fields }
RegistryPod holds resources necessary for creation of a registry server
func NewRegistryPod ¶ added in v1.0.0
func NewRegistryPod(kubeclient kubernetes.Interface, dbPath, bundleImage, namespace string) (*RegistryPod, error)
NewRegistryPod initializes the RegistryPod struct and sets defaults for empty fields
func (*RegistryPod) Create ¶ added in v1.0.0
func (rp *RegistryPod) Create(ctx context.Context) error
Create creates a bundle registry pod built from an index image and returns error
func (*RegistryPod) GetLogs ¶ added in v1.0.0
func (rp *RegistryPod) GetLogs(ctx context.Context) (string, error)
GetLogs gets the logs for the registry pod and throws error if failed to get pod logs
func (*RegistryPod) VerifyPodRunning ¶ added in v1.0.0
func (rp *RegistryPod) VerifyPodRunning(ctx context.Context) error
VerifyPodRunning calls checkPodStatus to verify pod status and returns error if pod is not running
type RegistryResources ¶
type RegistryResources struct { Client *olmclient.Client Pkg *apimanifests.PackageManifest Bundles []*apimanifests.Bundle }
RegistryResources configures creation/deletion of internal registry-related resources.
func (*RegistryResources) CreatePackageManifestsRegistry ¶ added in v0.17.1
func (rr *RegistryResources) CreatePackageManifestsRegistry(ctx context.Context, catsrc *v1alpha1.CatalogSource, namespace string) error
CreatePackageManifestsRegistry creates all registry objects required to serve manifests from rr.manifests in namespace.
func (*RegistryResources) DeletePackageManifestsRegistry ¶ added in v0.17.1
func (rr *RegistryResources) DeletePackageManifestsRegistry(ctx context.Context, namespace string) error
DeletePackageManifestsRegistry deletes all registry objects serving manifests for an operator in namespace. TODO: delete by owner reference.
func (*RegistryResources) IsRegistryDataStale ¶ added in v0.17.1
func (rr *RegistryResources) IsRegistryDataStale(ctx context.Context, namespace string) (bool, error)
IsRegistryDataStale checks if manifest data stored in the on-cluster registry is stale by comparing it to the currently managed data.
func (*RegistryResources) IsRegistryExist ¶ added in v0.17.1
IsRegistryExist returns true if a registry Deployment exists in namespace.