chartconfig

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

Types

type ChartConfig

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

ChartConfig provides shared functionality for managing chartconfigs.

func New

func New(config Config) (*ChartConfig, error)

New creates a new chartconfig service.

func (*ChartConfig) ApplyCreateChange

func (c *ChartConfig) ApplyCreateChange(ctx context.Context, clusterConfig ClusterConfig, chartConfigsToCreate []*v1alpha1.ChartConfig) error

func (*ChartConfig) ApplyDeleteChange

func (c *ChartConfig) ApplyDeleteChange(ctx context.Context, clusterConfig ClusterConfig, chartConfigsToDelete []*v1alpha1.ChartConfig) error

func (*ChartConfig) ApplyUpdateChange

func (c *ChartConfig) ApplyUpdateChange(ctx context.Context, clusterConfig ClusterConfig, chartConfigsToUpdate []*v1alpha1.ChartConfig) error

func (*ChartConfig) GetCurrentState

func (c *ChartConfig) GetCurrentState(ctx context.Context, clusterConfig ClusterConfig) ([]*v1alpha1.ChartConfig, error)

func (*ChartConfig) GetDesiredState

func (c *ChartConfig) GetDesiredState(ctx context.Context, clusterConfig ClusterConfig, providerChartSpecs []key.ChartSpec) ([]*v1alpha1.ChartConfig, error)

func (*ChartConfig) NewDeletePatch

func (c *ChartConfig) NewDeletePatch(ctx context.Context, currentState, desiredState []*v1alpha1.ChartConfig) (*controller.Patch, error)

NewDeletePatch is a no-op because chartconfig CRs in the tenant cluster are deleted with the tenant cluster resources.

func (*ChartConfig) NewUpdatePatch

func (c *ChartConfig) NewUpdatePatch(ctx context.Context, currentState, desiredState []*v1alpha1.ChartConfig) (*controller.Patch, error)

type ClusterConfig

type ClusterConfig struct {
	APIDomain    string
	ClusterID    string
	Organization string
}

ClusterConfig is used by the chartconfig service to provide config to connect to the tenant cluster.

type Config

type Config struct {
	Logger micrologger.Logger
	Tenant tenantcluster.Interface

	ProjectName string
}

Config represents the configuration used to create a new chartconfig service.

type Interface

type Interface interface {
	ApplyCreateChange(ctx context.Context, clusterConfig ClusterConfig, chartConfigsToCreate []*v1alpha1.ChartConfig) error
	ApplyDeleteChange(ctx context.Context, clusterConfig ClusterConfig, chartConfigsToDelete []*v1alpha1.ChartConfig) error
	ApplyUpdateChange(ctx context.Context, clusterConfig ClusterConfig, chartConfigsToUpdate []*v1alpha1.ChartConfig) error
	GetCurrentState(ctx context.Context, clusterConfig ClusterConfig) ([]*v1alpha1.ChartConfig, error)
	GetDesiredState(ctx context.Context, clusterConfig ClusterConfig, providerChartSpecs []key.ChartSpec) ([]*v1alpha1.ChartConfig, error)
	NewUpdatePatch(ctx context.Context, currentState, desiredState []*v1alpha1.ChartConfig) (*controller.Patch, error)
	NewDeletePatch(ctx context.Context, currentState, desiredState []*v1alpha1.ChartConfig) (*controller.Patch, error)
}

Jump to

Keyboard shortcuts

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