Documentation ¶
Index ¶
- Constants
- Variables
- func GetMissingDependency(err error) string
- func GetSupportedVersionNames() []string
- func IsDependencyMissingError(err error) bool
- func IsValidationError(err error) bool
- func NewDependencyMissingError(dependency string, err error) error
- type ConversionStrategy
- type RenderingStrategy
- type ValidationError
- type ValidationStrategy
- type Ver
- func (v Ver) ApplyProfiles(ctx context.Context, cr *common.ControllerResources, ...) (v1.ControlPlaneSpec, error)
- func (v Ver) AtLeast(other Version) bool
- func (v Ver) Compare(other Version) int
- func (v Ver) GetCNINetworkName() string
- func (v Ver) GetChartsDir() string
- func (v Ver) GetDefaultTemplatesDir() string
- func (v Ver) GetUserTemplatesDir() string
- func (v Ver) IsSupported() (supported bool)
- func (v Ver) LessThan(other Version) bool
- func (v Ver) Strategy() VersionStrategy
- func (v Ver) String() string
- func (v Ver) Version() Ver
- type Version
- type VersionStrategy
Constants ¶
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" )
const (
// DefaultVersion to use for new resources which have no version specified.
DefaultVersion = lastKnownVersion
)
Variables ¶
var (
TestedVersions = []Version{V2_3, V2_4, V2_5}
)
Functions ¶
func GetMissingDependency ¶
func GetSupportedVersionNames ¶
func GetSupportedVersionNames() []string
func IsValidationError ¶
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 GetTrustDomainFieldPath() string }
ConversionStrategy is an interface used when converting between v1 and v2 of the SMCP resource.
type RenderingStrategy ¶
type RenderingStrategy interface { IsClusterScoped(spec *v2.ControlPlaneSpec) (bool, error) 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 ¶
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 ValidateUpdate(ctx context.Context, cl client.Client, oldSMCP metav1.Object, newSMCP metav1.Object) error ValidateRequest(ctx context.Context, cl client.Client, req admission.Request, smcp metav1.Object) admission.Response }
ValidationStrategy is an interface used by the validating webhook for validating SMCP resources.
type Ver ¶
type Ver int
func ParseVersion ¶
ParseVersion returns a version for the specified string
func (Ver) ApplyProfiles ¶
func (v Ver) ApplyProfiles(ctx context.Context, cr *common.ControllerResources, smcpSpec *v1.ControlPlaneSpec, targetNamespace string, ) (v1.ControlPlaneSpec, error)
func (Ver) GetCNINetworkName ¶
func (Ver) GetChartsDir ¶
GetChartsDir returns the location of the Helm charts. Similar layout to istio.io/istio/install/kubernetes/helm.
func (Ver) GetDefaultTemplatesDir ¶
GetDefaultTemplatesDir returns the location of the Default Operator templates files
func (Ver) GetUserTemplatesDir ¶
GetTemplatesDir returns the location of the Operator templates files
func (Ver) IsSupported ¶
func (Ver) Strategy ¶
func (v Ver) Strategy() VersionStrategy
type Version ¶
type Version interface { fmt.Stringer // Version returns the internal version representation Version() Ver // 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 // AtLeast returns true if this version is greater or equal to the specified // other version. AtLeast(other Version) bool // LessThan returns true if this version is less than the specified version. LessThan(other Version) bool // 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.1. 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.