Documentation
¶
Index ¶
- Constants
- func ConvertLabels(labelSelector *metav1.LabelSelector) (labels.Selector, error)
- func DetectClusterRegistry(ctx context.Context, clReader client.Reader)
- func GenerateChannelMap(cl client.Client, log logr.Logger) (map[string]*chv1.Channel, error)
- func GetHelmRepoIndex(channelPathName string, insecureSkipVerify bool, chnRefSrt *corev1.Secret, ...) (*repo.IndexFile, error)
- func IsReadyClusterRegistry(clReader client.Reader) bool
- func LoadLocalIdx(idxPath string, insecureSkipVerify bool, srt *corev1.Secret, ...) (*http.Response, error)
- func LocateChannel(cl client.Client, name string) (*chv1.Channel, error)
- func ParseSecretInfo(secret *corev1.Secret) (username string, password string, region string)
- func UpdateServingChannel(servingChannel string, channelKey string, action string) string
- type AWSHandler
- func (h *AWSHandler) Create(bucket string) error
- func (h *AWSHandler) Delete(bucket, name string) error
- func (h *AWSHandler) Exists(bucket string) error
- func (h *AWSHandler) Get(bucket, name string) (DeployableObject, error)
- func (h *AWSHandler) InitObjectStoreConnection(endpoint, accessKeyID, secretAccessKey, region string) error
- func (h *AWSHandler) List(bucket string) ([]string, error)
- func (h *AWSHandler) Put(bucket string, dplObj DeployableObject) error
- type ChannelDescription
- type ChannelDescriptor
- type DeployableObject
- type FakeObjectStore
- type LoadIndexPageFunc
- type ObjectStore
Constants ¶
const ( // SecretMapKeyAccessKeyID is key of accesskeyid in secret SecretMapKeyAccessKeyID = "AccessKeyID" USERNAME = "username" // SecretMapKeySecretAccessKey is key of secretaccesskey in secret SecretMapKeySecretAccessKey = "SecretAccessKey" PASSWORD = "password" // SecretMapKeyRegion is key of region in secret. SecretMapKeyRegion = "Region" //metadata key for stroing the deployable generatename name DeployableGenerateNameMeta = "x-amz-meta-generatename" //Deployable generate name key within the meta map DployableMateGenerateNameKey = "Generatename" //metadata key for stroing the deployable generatename name DeployableVersionMeta = "x-amz-meta-deployableversion" //Deployable generate name key within the meta map DeployableMetaVersionKey = "Deployableversion" )
const ( // HelmCRKind is kind of the Helm CR HelmCRKind = "HelmRelease" // SubscriptionCRKind is kind of the Subscription CR SubscriptionCRKind = "Subscription" // HelmCRAPIVersion is APIVersion of the Helm CR HelmCRAPIVersion = "apps.open-cluster-management.io/v1" // HelmCRChartName is spec.ChartName of the Helm CR HelmCRChartName = "chartName" // HelmCRReleaseName is spec.ReleaseName of the Helm CR HelmCRReleaseName = "releaseName" // HelmCRVersion is spec.Version of the Helm CR HelmCRVersion = "version" // HelmCRSource is spec.Source of the Helm CR HelmCRSource = "source" // HelmCRSourceType is spec.Source.Type of the Helm CR HelmCRSourceType = "type" // HelmCRSourceHelm is spec.Source.Helmrepo of the Helm CR HelmCRSourceHelm = "helmrepo" // HelmCRSourceGit is spec.Source.Git of the Helm CR HelmCRSourceGit = "git" // HelmCRRepoURL is spec.Source.Git.Urls or spec.Source.Helmrepo.Urls of the Helm CR HelmCRRepoURL = "urls" // HelmCRGitRepoChartPath is spec.Source.Github.ChartPath of the Helm CR HelmCRGitRepoChartPath = "chartPath" //Channel type meta for testing case ChannelTypeKind = "Channel" ChannelTypeAPIVersion = "v1" //Deployable type meta for testing case DeployableTypeKind = "Deployable" DeployableTypeAPIVersion = "v1" )
const (
InsecureSkipVerifyFlag = "insecureSkipVerify"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertLabels ¶ added in v0.5.0
func ConvertLabels(labelSelector *metav1.LabelSelector) (labels.Selector, error)
func DetectClusterRegistry ¶ added in v0.5.0
DetectClusterRegistry - Detect the cluster API service every 10 seconds. the controller will be exited when it is ready The controller will be auto restarted by the multicluster-operators-application deployment CR later.
func GenerateChannelMap ¶
GenerateChannelMap finds all channels and build map with key of channel name
func GetHelmRepoIndex ¶
func GetHelmRepoIndex( channelPathName string, insecureSkipVerify bool, chnRefSrt *corev1.Secret, chnRefCfgMap *corev1.ConfigMap, loadIdx LoadIndexPageFunc, logger logr.Logger) (*repo.IndexFile, error)
GetHelmRepoIndex get the index file from helm repository
func IsReadyClusterRegistry ¶ added in v0.5.0
IsReadyClusterRegistry check if Cluster API service is ready or not.
func LoadLocalIdx ¶
func LocateChannel ¶
LocateChannel finds channel by name
func ParseSecretInfo ¶ added in v0.9.0
Types ¶
type AWSHandler ¶
AWSHandler handles connections to aws.
func (*AWSHandler) Delete ¶
func (h *AWSHandler) Delete(bucket, name string) error
Delete delete existing object.
func (*AWSHandler) Exists ¶
func (h *AWSHandler) Exists(bucket string) error
Exists Checks whether a bucket exists and is accessible.
func (*AWSHandler) Get ¶
func (h *AWSHandler) Get(bucket, name string) (DeployableObject, error)
Get get existing object.
func (*AWSHandler) InitObjectStoreConnection ¶
func (h *AWSHandler) InitObjectStoreConnection(endpoint, accessKeyID, secretAccessKey, region string) error
InitObjectStoreConnection connect to object store.
func (*AWSHandler) List ¶
func (h *AWSHandler) List(bucket string) ([]string, error)
List all objects in bucket.
func (*AWSHandler) Put ¶
func (h *AWSHandler) Put(bucket string, dplObj DeployableObject) error
Put create new object.
type ChannelDescription ¶
type ChannelDescription struct { Channel *chv1.Channel Bucket string ObjectStore }
ChannelDescription contains channel and its object store information
type ChannelDescriptor ¶
ChannelDescriptor stores channel descriptions and object store connections
func CreateObjectStorageChannelDescriptor ¶
func CreateObjectStorageChannelDescriptor() (*ChannelDescriptor, error)
CreateChannelDescriptor - creates an instance of ChannelDescriptor
func (*ChannelDescriptor) ConnectWithResourceHost ¶
func (desc *ChannelDescriptor) ConnectWithResourceHost(chn *chv1.Channel, kubeClient client.Client, log logr.Logger, objStoreHandler ...ObjectStore) error
ConnectWithResourceHost validates and makes channel object store connection
func (*ChannelDescriptor) Get ¶
func (desc *ChannelDescriptor) Get(chname string) (chdesc *ChannelDescription, ok bool)
Get channel description for a channel
func (*ChannelDescriptor) Put ¶
func (desc *ChannelDescriptor) Put(chname string, chdesc *ChannelDescription)
Put a new channel description
type DeployableObject ¶
type FakeObjectStore ¶
type FakeObjectStore struct { //map[bucket]map[objName]DeployableObject[Name, Content] Clt map[string]map[string]DeployableObject }
type LoadIndexPageFunc ¶
type ObjectStore ¶
type ObjectStore interface { InitObjectStoreConnection(endpoint, accessKeyID, secretAccessKey, region string) error Exists(bucket string) error Create(bucket string) error List(bucket string) ([]string, error) Put(bucket string, dplObj DeployableObject) error Delete(bucket, name string) error Get(bucket, name string) (DeployableObject, error) }
ObjectStore interface.