feature_installer

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCache = repo.DefaultDiskCache()

Functions

func CreateHelmRelease added in v0.6.0

func CreateHelmRelease(featureName, featureSetName, ns string, profile *profilev1alpha1.ManagedClusterSetProfile, profileBinding *profilev1alpha1.ManagedClusterProfileBinding, featureObj uiapi.Feature, fakeServer *FakeServer, values map[string]any, dependsOn ...string) error

func DeployRelease

func DeployRelease(apiConfig *api.Config, deployOpts *action.DeployOptions, reg repo.IRegistry) error

func EnableFeatures

func EnableFeatures(ctx context.Context, kc client.Client, profileBinding *profilev1alpha1.ManagedClusterProfileBinding, featureInfo map[string][]string, profile *profilev1alpha1.ManagedClusterSetProfile) error

func FeatureValuesFrom added in v0.14.0

FeatureValuesFrom returns the binding's valuesFrom for the feature when it has one, the same way binding values replace the profile's, and the profile's otherwise.

func GetAPIGroups

func GetAPIGroups() []string

func GetDefaultValues added in v0.6.0

func GetDefaultValues(reg repo.IRegistry, chartRef releasesapi.ChartSourceRef) (map[string]any, error)

func GetFeatureHelmReleaseValues added in v0.14.0

func GetFeatureHelmReleaseValues(chartValues map[string]any, feature string) (map[string]any, error)

func GetFeatureSetChartValues added in v0.14.0

func GetFeatureSetChartValues(ctx context.Context, kc client.Client, featureSet string) (map[string]any, error)

func GetFeatureSetValues

func GetFeatureSetValues(ctx context.Context, fs *uiapi.FeatureSet, features []string, releaseNamespace string,
	kc client.Client, mc *v1.ManagedCluster, profile *profilev1alpha1.ManagedClusterSetProfile,
) (map[string]any, error)

func GetFeatures

func GetFeatures(ctx context.Context, kc client.Client, fs string) (uiapi.FeatureList, error)

func GetKindNameNamespace added in v0.7.0

func GetKindNameNamespace(item map[string]any) (string, string, string, error)

func GetOverrideValues added in v0.6.0

func GetOverrideValues(overrides map[string]any, clusterMetadata *kmapi.ClusterInfo) (map[string]any, error)

func InstallChart added in v0.6.0

func InstallChart(fakeServer *FakeServer, chartRef *releasesapi.ChartSourceRef, deployOpts *action.DeployOptions) error

func InstallOpscenterFeatures added in v0.6.0

func InstallOpscenterFeatures(overrideValues []byte, fakeServer *FakeServer, chartRef *releasesapi.ChartSourceRef) error

func InstallOpscenterFeaturesOnFakeServer added in v0.0.7

func InstallOpscenterFeaturesOnFakeServer(fakeServer *FakeServer, profile *profilev1alpha1.ManagedClusterSetProfile, profileBinding *profilev1alpha1.ManagedClusterProfileBinding, clusterMetadata *kmapi.ClusterInfo, chartRef *releasesapi.ChartSourceRef) (map[string]any, error)

func NewVirtualRegistry

func NewVirtualRegistry(kc client.Client) repo.IRegistry

func RegisterRequiredCRDs added in v0.10.0

func RegisterRequiredCRDs(fakeServer *FakeServer, profileBinding *profilev1alpha1.ManagedClusterProfileBinding) error

func UpdateFeatureSetValues

func UpdateFeatureSetValues(ctx context.Context, fs string, kc client.Client, values map[string]any, mc *v1.ManagedCluster) ([]string, error)

Types

type FakeServer

type FakeServer struct {
	FakeSrv        *http.Server
	FakeS          *pkg.Server
	FakeApiConfig  *api.Config
	FakeRestConfig *rest.Config
	FakeClient     client.Client
}

func StartFakeApiServerAndApplyBaseManifestWorkReplicaSets

func StartFakeApiServerAndApplyBaseManifestWorkReplicaSets(ctx context.Context, kc client.Client, profileBinding *profilev1alpha1.ManagedClusterProfileBinding) (*FakeServer, error)

Jump to

Keyboard shortcuts

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