server

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetManagerInstance

func GetManagerInstance() *instance

func InitializeManagerInstance

func InitializeManagerInstance(ctx context.Context, config *rest.Config, c client.Client,
	scheme *runtime.Scheme, port string, logger logr.Logger)

InitializeManagerInstance initializes manager instance

Types

type ClusterFeatureSummary

type ClusterFeatureSummary struct {
	FeatureID      configv1beta1.FeatureID     `json:"featureID"`
	Status         configv1beta1.FeatureStatus `json:"status,omitempty"`
	FailureMessage *string                     `json:"failureMessage,omitempty"`
}

func MapToClusterFeatureSummaries

func MapToClusterFeatureSummaries(featureSummaries *[]configv1beta1.FeatureSummary) []ClusterFeatureSummary

type ClusterInfo

type ClusterInfo struct {
	Labels         map[string]string `json:"labels"`
	Version        string            `json:"version"`
	Ready          bool              `json:"ready"`
	FailureMessage *string           `json:"failureMessage"`
}

type ClusterProfileStatus

type ClusterProfileStatus struct {
	ProfileName string                        `json:"profileName"`
	ProfileType string                        `json:"profileType"`
	Namespace   string                        `json:"namespace"`
	ClusterType libsveltosv1beta1.ClusterType `json:"clusterType"`
	ClusterName string                        `json:"clusterName"`
	Summary     []ClusterFeatureSummary       `json:"summary"`
}

type ClusterResult

type ClusterResult struct {
	TotalClusters   int             `json:"totalClusters"`
	ManagedClusters ManagedClusters `json:"managedClusters"`
}

type HelmRelease

type HelmRelease struct {
	// RepoURL URL of the repo containing the helm chart deployed
	// in the Cluster.
	// +kubebuilder:validation:MinLength=1
	RepoURL string `json:"repoURL"`

	// ReleaseName name of the release deployed in the Cluster.
	// +kubebuilder:validation:MinLength=1
	ReleaseName string `json:"releaseName"`

	// Namespace where chart is deployed in the Cluster.
	Namespace string `json:"namespace"`

	// ChartVersion is the version of the helm chart deployed in the Cluster.
	ChartVersion string `json:"chartVersion"`

	// The URL to an icon file.
	Icon string `json:"icon"`

	// LastAppliedTime identifies when this resource was last applied to the cluster.
	LastAppliedTime *metav1.Time `json:"lastAppliedTime"`

	// ProfileName is the name of the ClusterProfile/Profile that
	// caused the helm chart to be deployed
	ProfileName string `json:"profileName"`
}

type HelmReleaseResult

type HelmReleaseResult struct {
	TotalHelmReleases int           `json:"totalHelmReleases"`
	HelmReleases      []HelmRelease `json:"helmReleases"`
}

type ManagedCluster

type ManagedCluster struct {
	Namespace   string `json:"namespace"`
	Name        string `json:"name"`
	ClusterInfo `json:"clusterInfo"`
}

type ManagedClusters

type ManagedClusters []ManagedCluster

func (ManagedClusters) Len

func (s ManagedClusters) Len() int

func (ManagedClusters) Less

func (s ManagedClusters) Less(i, j int) bool

func (ManagedClusters) Swap

func (s ManagedClusters) Swap(i, j int)

type MatchingClusters added in v0.45.0

type MatchingClusters struct {
	Cluster                 corev1.ObjectReference  `json:"cluster"`
	ClusterFeatureSummaries []ClusterFeatureSummary `json:"clusterFeatureSummaries"`
}

type Profile added in v0.42.0

type Profile struct {
	// Kind of the profile (ClusterProfile vs Profile)
	Kind string `json:"kind"`
	// Namespace of the profile (empty for ClusterProfile)
	Namespace string `json:"namespace"`
	// Name of the profile
	Name string `json:"name"`
	// List of profiles this profile depends on
	Dependencies []corev1.ObjectReference `json:"dependencies"`
	// List of profiles that depend on this profile
	Dependents []corev1.ObjectReference `json:"dependents"`
	// List of managed clusters matching this profile
	MatchingClusters []MatchingClusters `json:"matchingClusters"`
	// Profile's Spec section
	Spec configv1beta1.Spec `json:"spec"`
}

type ProfileInfo added in v0.42.0

type ProfileInfo struct {
	// Tier is the ClusterProfile/Profile tier
	Tier int32 `json:"tier"`

	ClusterSelector libsveltosv1beta1.Selector `json:"clusterSelector"`

	// Dependencies is the list of ClusterProfile/Profile dependency's names
	Dependencies *libsveltosset.Set `json:"dependencies"`

	// Dependents is the list of ClusterProfile/Profile dependent's names
	Dependents *libsveltosset.Set `json:"dependents"`
}

type ProfileResult added in v0.42.0

type ProfileResult struct {
	TotalProfiles int      `json:"totalProfiles"`
	Profiles      Profiles `json:"profiles"`
}

type ProfileStatusResult

type ProfileStatusResult struct {
	ProfileName string `json:"profileName"`
	ProfileType string `json:"profileType"`
	ClusterFeatureSummary
}

type Profiles added in v0.42.0

type Profiles []Profile

func (Profiles) Len added in v0.42.0

func (s Profiles) Len() int

func (Profiles) Less added in v0.42.0

func (s Profiles) Less(i, j int) bool

func (Profiles) Swap added in v0.42.0

func (s Profiles) Swap(i, j int)

type Resource

type Resource struct {
	// Name of the resource deployed in the Cluster.
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`

	// Namespace of the resource deployed in the Cluster.
	// Empty for resources scoped at cluster level.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Group of the resource deployed in the Cluster.
	Group string `json:"group"`

	// Kind of the resource deployed in the Cluster.
	// +kubebuilder:validation:MinLength=1
	Kind string `json:"kind"`

	// Version of the resource deployed in the Cluster.
	// +kubebuilder:validation:MinLength=1
	Version string `json:"version"`

	// LastAppliedTime identifies when this resource was last applied to the cluster.
	// +optional
	LastAppliedTime *metav1.Time `json:"lastAppliedTime,omitempty"`

	// ProfileNames is a slice of the names of the ClusterProfile/Profile instances
	// that caused the helm chart to be deployed
	ProfileNames []string `json:"profileNames"`
}

type ResourceResult

type ResourceResult struct {
	TotalResources int        `json:"totalResources"`
	Resources      []Resource `json:"resources"`
}

type Token added in v0.40.0

type Token struct {
	Value string `json:"token,omitempty"`
}

Jump to

Keyboard shortcuts

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