Back to godoc.org
github.com/atlassian/voyager / pkg / synchronization

Package synchronization

v0.0.0-...-e0434a4
Latest Go to latest

The highest tagged major version is .

Published: Jun 30, 2019 | License: Apache-2.0 | Module: github.com/atlassian/voyager

Index

Constants

const (
	NamespaceByServiceLabelIndexName = "nsByServiceLabelIndex"
)

func ByLabelAndService

func ByLabelAndService(serviceName voyager.ServiceName, label voyager.Label) string

func NsServiceLabelIndexFunc

func NsServiceLabelIndexFunc(obj interface{}) ([]string, error)

type Controller

type Controller struct {
	Logger       *zap.Logger
	ReadyForWork func()

	MainClient        kubernetes.Interface
	CompClient        compClient.Interface
	NamespaceInformer cache.SharedIndexInformer
	ConfigMapInformer cache.SharedIndexInformer

	ServiceCentral    ServiceMetadataStore
	ReleaseManagement releases.ReleaseManagementStore
	ClusterLocation   voyager.ClusterLocation

	RoleBindingUpdater        updater.ObjectUpdater
	ConfigMapUpdater          updater.ObjectUpdater
	NamespaceUpdater          updater.ObjectUpdater
	ClusterRoleUpdater        updater.ObjectUpdater
	ClusterRoleBindingUpdater updater.ObjectUpdater

	ServiceCentralPollErrorCounter prometheus.Counter
	AccessUpdateErrorCounter       *prometheus.CounterVec

	AllowMutateServices         bool
	LastFetchedAllServices      *time.Time
	LastFetchedModifiedServices *time.Time
	LastFetchedAllReleases      *time.Time
	NextFetchAllReleasesStart   *time.Time
}

func (*Controller) Process

func (c *Controller) Process(ctx *ctrl.ProcessContext) (bool, bool, error)

Process will handle any changes to namespaces and ensure we have a ConfigMap with the appropriate data in place. It also ensures that roles and rolebindings are created for build authentication.

func (*Controller) Run

func (c *Controller) Run(ctx context.Context)

type ServiceMetadataStore

type ServiceMetadataStore interface {
	GetService(ctx context.Context, user auth.OptionalUser, name servicecentral.ServiceName) (*creator_v1.Service, error)
	ListServices(ctx context.Context, user auth.OptionalUser) ([]creator_v1.Service, error)
	ListModifiedServices(ctx context.Context, user auth.OptionalUser, modifiedSince time.Time) ([]creator_v1.Service, error)
}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier