helmrepo

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager, hubconfig *rest.Config, syncid *types.NamespacedName, syncinterval int, hub, standalone bool) error

Add does nothing for namespace subscriber, it generates cache for each of the item.

func ChartIndexToHelmReleases

func ChartIndexToHelmReleases(hclt client.Client,
	chn *chnv1.Channel,
	secondChn *chnv1.Channel,
	sub *appv1.Subscription,
	indexFile *repo.IndexFile) ([]*releasev1.HelmRelease, error)

func GetDefaultSubscriber

func GetDefaultSubscriber() appv1alpha1.Subscriber

GetDefaultSubscriber - returns the defajlt namespace subscriber.

func GetSubscriptionChartsOnHub

func GetSubscriptionChartsOnHub(hubClt client.Client, channel, secondChannel *chnv1.Channel, sub *appv1.Subscription) ([]*releasev1.HelmRelease, error)

Types

type Subscriber

type Subscriber struct {
	// contains filtered or unexported fields
}

Subscriber - information to run namespace subscription.

func CreateHelmRepoSubsriber

func CreateHelmRepoSubsriber(config *rest.Config, scheme *runtime.Scheme, mgr manager.Manager,
	kubesync SyncSource, syncinterval int) *Subscriber

CreateNamespaceSubsriber - create namespace subscriber with config to hub cluster, scheme of hub cluster and a syncrhonizer to local cluster.

func (*Subscriber) SubscribeItem

func (hrs *Subscriber) SubscribeItem(subitem *appv1alpha1.SubscriberItem) error

SubscribeItem subscribes a subscriber item with namespace channel.

func (*Subscriber) UnsubscribeItem

func (hrs *Subscriber) UnsubscribeItem(key types.NamespacedName) error

UnsubscribeItem uhrsubscribes a namespace subscriber item.

type SubscriberItem

type SubscriberItem struct {
	appv1.SubscriberItem
	// contains filtered or unexported fields
}

SubscriberItem - defines the unit of namespace subscription.

func (*SubscriberItem) Start

func (hrsi *SubscriberItem) Start(restart bool)

SubscribeItem subscribes a subscriber item with namespace channel.

func (*SubscriberItem) Stop

func (hrsi *SubscriberItem) Stop()

type SyncSource

type SyncSource interface {
	GetInterval() int
	GetLocalClient() client.Client
	GetLocalNonCachedClient() client.Client
	GetRemoteClient() client.Client
	GetRemoteNonCachedClient() client.Client
	IsResourceNamespaced(*unstructured.Unstructured) bool
	ProcessSubResources(*appv1alpha1.Subscription, []kubesynchronizer.ResourceUnit,
		map[string]map[string]string, map[string]map[string]string, bool, bool) error
	PurgeAllSubscribedResources(*appv1alpha1.Subscription) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL