This section is empty.


This section is empty.


func DeduplicateTargetObjects

func DeduplicateTargetObjects(
	server string,
	namespace string,
	objs []*unstructured.Unstructured,
	infoProvider ResourceInfoProvider,
) ([]*unstructured.Unstructured, []v1alpha1.ApplicationCondition, error)

func GetLiveObjs

func GetLiveObjs(res []managedResource) []*unstructured.Unstructured


type AppStateManager

type AppStateManager interface {
	CompareAppState(app *v1alpha1.Application, project *appv1.AppProject, revision string, source v1alpha1.ApplicationSource, noCache bool, localObjects []string) *comparisonResult
	SyncAppState(app *v1alpha1.Application, state *v1alpha1.OperationState)

AppStateManager defines methods which allow to compare application spec and actual application state.

func NewAppStateManager

func NewAppStateManager(
	db db.ArgoDB,
	appclientset appclientset.Interface,
	repoClientset apiclient.Clientset,
	namespace string,
	kubectl kubeutil.Kubectl,
	settingsMgr *settings.SettingsManager,
	liveStateCache statecache.LiveStateCache,
	projInformer cache.SharedIndexInformer,
	metricsServer *metrics.MetricsServer,
) AppStateManager

NewAppStateManager creates new instance of Ksonnet app comparator

type ApplicationController

type ApplicationController struct {
	// contains filtered or unexported fields

ApplicationController is the controller for application resources.

func NewApplicationController

func NewApplicationController(
	namespace string,
	settingsMgr *settings_util.SettingsManager,
	kubeClientset kubernetes.Interface,
	applicationClientset appclientset.Interface,
	repoClientset apiclient.Clientset,
	argoCache *appstatecache.Cache,
	kubectl kube.Kubectl,
	appResyncPeriod time.Duration,
	selfHealTimeout time.Duration,
	metricsPort int,
	kubectlParallelismLimit int64,
) (*ApplicationController, error)

NewApplicationController creates new instance of ApplicationController.

func (*ApplicationController) GetMetricsServer

func (ctrl *ApplicationController) GetMetricsServer() *metrics.MetricsServer

func (*ApplicationController) Run

func (ctrl *ApplicationController) Run(ctx context.Context, statusProcessors int, operationProcessors int)

Run starts the Application CRD controller.

type ApplicationControllerConfig

type ApplicationControllerConfig struct {
	InstanceID string
	Namespace  string

type CompareWith

type CompareWith int
const (
	// Compare live application state against state defined in latest git revision.
	CompareWithLatest CompareWith = 2
	// Compare live application state against state defined using revision of most recent comparison.
	CompareWithRecent CompareWith = 1
	// Skip comparison and only refresh application resources tree
	ComparisonWithNothing CompareWith = 0

func (CompareWith) Max

func (CompareWith) Pointer

func (a CompareWith) Pointer() *CompareWith

type ResourceInfoProvider

type ResourceInfoProvider interface {
	IsNamespaced(server string, gk schema.GroupKind) (bool, error)


Path Synopsis