Documentation ¶
Index ¶
Constants ¶
View Source
const ( // UserID is key of GitHub user ID in secret UserID = "user" // AccessToken is key of GitHub user password or personal token in secret AccessToken = "accessToken" // Path is the key of GitHub package filter config map Path = "path" )
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(mgr manager.Manager, hubconfig *rest.Config, syncid *types.NamespacedName, syncinterval int) error
Add does nothing for namespace subscriber, it generates cache for each of the item
func GetDefaultSubscriber ¶
func GetDefaultSubscriber() appv1alpha1.Subscriber
GetDefaultSubscriber - returns the defajlt namespace subscriber
Types ¶
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Subscriber - information to run namespace subscription
func CreateGitHubSubscriber ¶
func CreateGitHubSubscriber(config *rest.Config, scheme *runtime.Scheme, mgr manager.Manager, kubesync SyncSource, syncinterval int) *Subscriber
CreateGitHubSubscriber - create github subscriber with config to hub cluster, scheme of hub cluster and a syncrhonizer to local cluster
func (*Subscriber) SubscribeItem ¶
func (ghs *Subscriber) SubscribeItem(subitem *appv1alpha1.SubscriberItem) error
SubscribeItem subscribes a subscriber item with namespace channel
func (*Subscriber) UnsubscribeItem ¶
func (ghs *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 (ghsi *SubscriberItem) Start(restart bool)
Start subscribes a subscriber item with github channel
func (*SubscriberItem) Stop ¶
func (ghsi *SubscriberItem) Stop()
Stop unsubscribes a subscriber item with namespace channel
type SyncSource ¶
type SyncSource interface { GetInterval() int GetLocalClient() client.Client GetRemoteClient() client.Client GetValidatedGVK(schema.GroupVersionKind) *schema.GroupVersionKind IsResourceNamespaced(schema.GroupVersionKind) bool AddTemplates(string, types.NamespacedName, []kubesynchronizer.DplUnit) error CleanupByHost(types.NamespacedName, string) error }
Click to show internal directories.
Click to hide internal directories.