feature_installer

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: Apache-2.0 Imports: 56 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, featureObj uiapi.Feature, fakeServer *FakeServer, values map[string]interface{}) 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 GetAPIGroups

func GetAPIGroups() []string

func GetDefaultValues added in v0.6.0

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

func GetFeatureSetValues

func GetFeatureSetValues(ctx context.Context, fs *uiapi.FeatureSet, features []string, releaseNamespace string, kc client.Client, mc *v1.ManagedCluster) (map[string]interface{}, 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]interface{}) (string, string, string, error)

func GetOverrideValues added in v0.6.0

func GetOverrideValues(overrides map[string]interface{}, clusterMetadata *kmapi.ClusterInfo) (map[string]interface{}, 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]interface{}, 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) (*FakeServer, error)

Jump to

Keyboard shortcuts

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