versions

package
v0.0.0-...-d2b1218 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiscoveryChart       = "istio-discovery"
	GatewayEgressChart   = "istio-egress"
	GatewayIngressChart  = "istio-ingress"
	GrafanaChart         = "grafana"
	KialiChart           = "kiali"
	MeshConfigChart      = "mesh-config"
	MixerPolicyChart     = "istio-policy"
	MixerTelemetryChart  = "mixer-telemetry"
	PrometheusChart      = "prometheus"
	TelemetryCommonChart = "telemetry-common"
	ThreeScaleChart      = "maistra-threescale"
	TracingChart         = "tracing"
	WASMExtensionsChart  = "wasm-extensions"
	RLSChart             = "rls"
)
View Source
const (
	// InvalidVersion is not a valid version
	InvalidVersion version = iota
	// V1_0 -> v1.0
	V1_0
	// V1_1 -> v1.1
	V1_1
	// V2_0 -> v2.0
	V2_0
	// V2_1 -> v2.1
	V2_1
)
View Source
const (
	// DefaultVersion to use for new resources which have no version specified.
	DefaultVersion = lastKnownVersion
	// LegacyVersion to use with existing resources which have no version specified.
	LegacyVersion = V1_0
)

Variables

View Source
var AllV2Versions = []Version{V2_0, V2_1}

Functions

func GetMissingDependency

func GetMissingDependency(err error) string

func GetSupportedVersionNames

func GetSupportedVersionNames() []string

func IsDependencyMissingError

func IsDependencyMissingError(err error) bool

func IsValidationError

func IsValidationError(err error) bool

func NewDependencyMissingError

func NewDependencyMissingError(dependency string, err error) error

func ParseVersion

func ParseVersion(str string) (version, error)

ParseVersion returns a version for the specified string

Types

type ConversionStrategy

type ConversionStrategy interface {
	GetExpansionPorts() []corev1.ServicePort
	GetTelemetryType(in *v1.HelmValues, mixerTelemetryEnabled, mixerTelemetryEnabledSet, remoteEnabled bool) v2.TelemetryType
	GetPolicyType(in *v1.HelmValues, mixerPolicyEnabled, mixerPolicyEnabledSet, remoteEnabled bool) v2.PolicyType
}

ConversionStrategy is an interface used when converting between v1 and v2 of the SMCP resource.

type RenderingStrategy

type RenderingStrategy interface {
	GetChartInstallOrder() [][]string
	SetImageValues(ctx context.Context, cr *common.ControllerResources, smcp *v1.ControlPlaneSpec) error
	Render(ctx context.Context, cr *common.ControllerResources, cniConfig cni.Config, smcp *v2.ServiceMeshControlPlane) (map[string][]manifest.Manifest, error)
	// for testing purposes
	ApplyProfiles(ctx context.Context, cr *common.ControllerResources, smcpSpec *v1.ControlPlaneSpec, targetNamespace string) (v1.ControlPlaneSpec, error)
}

RenderingStrategy is an interface used by the reconciler to manage rendering of charts.

type ValidationError

type ValidationError interface {
	errors.Aggregate
}

func NewValidationError

func NewValidationError(errlist ...error) ValidationError

type ValidationStrategy

type ValidationStrategy interface {
	ValidateV1(ctx context.Context, cl client.Client, smcp *v1.ServiceMeshControlPlane) error
	ValidateV2(ctx context.Context, cl client.Client, meta *metav1.ObjectMeta, spec *v2.ControlPlaneSpec) error
	ValidateDowngrade(ctx context.Context, cl client.Client, smcp metav1.Object) error
	ValidateUpgrade(ctx context.Context, cl client.Client, smcp metav1.Object) error
}

ValidationStrategy is an interface used by the validating webhook for validating SMCP resources.

type Version

type Version interface {
	fmt.Stringer
	// Version returns the internal version representation
	Version() version
	// Compare compares this version with another version.  If other is an older
	// version, a positive value will be returned.  If other is a newer version,
	// a negative value is returned.  If other is the same version, zero is
	// returned.
	Compare(other Version) int
	// Strategy provides a customizations specific to this version.
	Strategy() VersionStrategy
	GetChartsDir() string
	GetUserTemplatesDir() string
	GetDefaultTemplatesDir() string
	GetCNINetworkName() string
	IsSupported() bool
}

Version represents a version of a control plane, major.minor, usually identified as something like v1.0. Version objects are guaranteed to be sequentually ordered from oldest to newest.

func GetSupportedVersions

func GetSupportedVersions() []Version

GetSupportedVersions returns a list of versions supported by this operator

type VersionStrategy

type VersionStrategy interface {
	Version
	RenderingStrategy
	ValidationStrategy
	ConversionStrategy
}

VersionStrategy provides encapsulates customization required for a particular version.

Jump to

Keyboard shortcuts

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