chartoperator

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: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is the identifier of the resource.
	Name = "chartoperatorv19"
)

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsNotReady

func IsNotReady(err error) bool

IsNotReady asserts notReadyError.

func IsWrongType

func IsWrongType(err error) bool

IsWrongType asserts wrongTypeError.

Types

type Config

type Config struct {
	ApprClient               apprclient.Interface
	BaseClusterConfig        cluster.Config
	ClusterIPRange           string
	Fs                       afero.Fs
	G8sClient                versioned.Interface
	K8sClient                kubernetes.Interface
	Logger                   micrologger.Logger
	ProjectName              string
	RegistryDomain           string
	Tenant                   tenantcluster.Interface
	ToClusterGuestConfigFunc func(obj interface{}) (v1alpha1.ClusterGuestConfig, error)
	ToClusterObjectMetaFunc  func(obj interface{}) (metav1.ObjectMeta, error)
}

Config represents the configuration used to create a new chartoperator resource.

type Image

type Image struct {
	Registry string `json:"registry"`
}

Image holds the image settings for chart-operator chart.

type Resource

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

Resource implements the chartoperator resource.

func New

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

New creates a new configured chartoperator resource.

func (*Resource) ApplyCreateChange

func (r *Resource) ApplyCreateChange(ctx context.Context, obj, createChange interface{}) error

func (*Resource) ApplyDeleteChange

func (r *Resource) ApplyDeleteChange(ctx context.Context, obj, deleteChange interface{}) error

func (*Resource) ApplyUpdateChange

func (r *Resource) ApplyUpdateChange(ctx context.Context, obj, updateChange interface{}) error

func (*Resource) GetCurrentState

func (r *Resource) GetCurrentState(ctx context.Context, obj interface{}) (interface{}, error)

GetCurrentState gets the state of the chart in the guest cluster.

func (*Resource) GetDesiredState

func (r *Resource) GetDesiredState(ctx context.Context, obj interface{}) (interface{}, error)

GetDesiredState returns the chart that should be installed including the release version it gets from the CNR channel.

func (*Resource) Name

func (r *Resource) Name() string

Name returns name of the Resource.

func (*Resource) NewDeletePatch

func (r *Resource) NewDeletePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*controller.Patch, error)

func (*Resource) NewUpdatePatch

func (r *Resource) NewUpdatePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*controller.Patch, error)

type ResourceState

type ResourceState struct {
	// ChartName is the name of the Helm Chart.
	// e.g. chart-operator-chart
	ChartName string
	// ChartValues are the values to be passed to the chart-operator Helm Chart.
	// e.g. chart-operator-chart
	ChartValues Values
	// ReleaseName is the name of the Helm release when the chart is deployed.
	// e.g. chart-operator
	ReleaseName string
	// ReleaseStatus is the status of the Helm Release.
	// e.g. DEPLOYED
	ReleaseStatus string
	// ReleaseVersion is the version of the Helm Chart to be deployed.
	// e.g. 0.1.2
	ReleaseVersion string
}

ResourceState holds the state of the chart to be reconciled.

type Tiller

type Tiller struct {
	Namespace string `json:"namespace"`
}

Tiller holds the Tiller settings for chart-operator chart.

type Values

type Values struct {
	ClusterDNSIP string `json:"clusterDNSIP"`
	Image        Image  `json:"image"`
	Tiller       Tiller `json:"tiller"`
}

Values represents the values to be passed to Helm commands related to chart-operator chart.

Jump to

Keyboard shortcuts

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