servicemesh

package
v2.22.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigMapAuthRef = "auth-refs"
	ConfigMapMeshRef = "service-mesh-refs"
)

Variables

View Source
var FeatureData = struct {
	ControlPlane  feature.DataDefinition[dsciv1.DSCInitializationSpec, infrav1.ControlPlaneSpec]
	Authorization AuthorizationData
}{
	ControlPlane: feature.DataDefinition[dsciv1.DSCInitializationSpec, infrav1.ControlPlaneSpec]{
		Define: func(source *dsciv1.DSCInitializationSpec) feature.DataEntry[infrav1.ControlPlaneSpec] {
			return feature.DataEntry[infrav1.ControlPlaneSpec]{
				Key: controlPlaneKey,
				Value: func(_ context.Context, _ client.Client) (infrav1.ControlPlaneSpec, error) {
					return source.ServiceMesh.ControlPlane, nil
				},
			}
		},
		Extract: feature.ExtractEntry[infrav1.ControlPlaneSpec](controlPlaneKey),
	},
	Authorization: AuthorizationData{
		Spec:                  authSpec,
		Namespace:             authNs,
		Provider:              authProvider,
		ExtensionProviderName: authExtensionName,
		All: func(source *dsciv1.DSCInitializationSpec) []feature.Action {
			return []feature.Action{
				authSpec.Define(source).AsAction(),
				authNs.Define(source).AsAction(),
				authProvider.Define(source).AsAction(),
				authExtensionName.Define(source).AsAction(),
			}
		},
	},
}

FeatureData is a convention to simplify how the data for the Service Mesh features is Defined and accessed. Being a "singleton" it is based on anonymous struct concept.

Functions

func AuthRefs added in v2.10.0

func AuthRefs(ctx context.Context, cli client.Client, f *feature.Feature) error

AuthRefs stores authorization configuration in the config map, so it can be easily accessed by other components which rely on this information.

func CheckControlPlaneComponentReadiness

func CheckControlPlaneComponentReadiness(ctx context.Context, c client.Client, smcpName, smcpNs string) (bool, error)

func EnsureAuthNamespaceExists added in v2.8.0

func EnsureAuthNamespaceExists(ctx context.Context, cli client.Client, f *feature.Feature) error

EnsureAuthNamespaceExists creates a namespace for the Authorization provider and set ownership so it will be garbage collected when the operator is uninstalled.

func EnsureServiceMeshInstalled

func EnsureServiceMeshInstalled(ctx context.Context, cli client.Client, f *feature.Feature) error

func EnsureServiceMeshOperatorInstalled

func EnsureServiceMeshOperatorInstalled(ctx context.Context, cli client.Client, f *feature.Feature) error

func MeshRefs added in v2.10.0

func MeshRefs(ctx context.Context, cli client.Client, f *feature.Feature) error

MeshRefs stores service mesh configuration in the config map, so it can be easily accessed by other components which rely on this information.

func RemoveExtensionProvider added in v2.8.0

func RemoveExtensionProvider(controlPlane infrav1.ControlPlaneSpec, extensionName string) feature.CleanupFunc

func WaitForControlPlaneToBeReady

func WaitForControlPlaneToBeReady(ctx context.Context, cli client.Client, f *feature.Feature) error

Types

Jump to

Keyboard shortcuts

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