Documentation
¶
Index ¶
- func GetManagerInstance() *instance
- func InitializeManagerInstance(ctx context.Context, config *rest.Config, c client.Client, ...)
- type ClassifierDetails
- type ClassifierLabelEntry
- type ClassifierSummaries
- type ClassifierSummary
- type ClassifiersResult
- type ClusterEventMatch
- type ClusterFeatureSummary
- type ClusterInfo
- type ClusterProfileStatus
- type ClusterResult
- type DryRunHelmChange
- type DryRunResourceChange
- type DryRunResult
- type EventResult
- type EventTrigger
- type EventTriggerDetails
- type EventTriggerInfo
- type EventTriggers
- type HelmRelease
- type HelmReleaseResult
- type ManagedCluster
- type ManagedClusters
- type MatchingClusterEntry
- type MatchingClusters
- type Profile
- type ProfileInfo
- type ProfileResult
- type ProfileStatusResult
- type Profiles
- type Resource
- type ResourceResult
- type Stats
- type Token
- type UnManagedLabelEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetManagerInstance ¶
func GetManagerInstance() *instance
Types ¶
type ClassifierDetails ¶ added in v1.13.0
type ClassifierDetails struct {
Name string `json:"name"`
// Type is either Classifier or ManagementClusterClassifier
Type string `json:"type"`
// Classifier-only
ResourceSelectors []libsveltosv1beta1.ResourceSelector `json:"resourceSelectors,omitempty"`
AggregatedClassification string `json:"aggregatedClassification,omitempty"`
KubernetesVersionConstraints []libsveltosv1beta1.KubernetesVersionConstraint `json:"kubernetesVersionConstraints,omitempty"`
// ManagementClusterClassifier-only
MatchResources []libsveltosv1beta1.ResourceSelector `json:"matchResources,omitempty"`
ClassificationLua string `json:"classificationLua,omitempty"`
// shared
ClassifierLabels []ClassifierLabelEntry `json:"classifierLabels"`
MatchingClusters []MatchingClusterEntry `json:"matchingClusters"`
}
type ClassifierLabelEntry ¶ added in v1.13.0
type ClassifierSummaries ¶ added in v1.13.0
type ClassifierSummaries []ClassifierSummary
func (ClassifierSummaries) Len ¶ added in v1.13.0
func (s ClassifierSummaries) Len() int
func (ClassifierSummaries) Less ¶ added in v1.13.0
func (s ClassifierSummaries) Less(i, j int) bool
func (ClassifierSummaries) Swap ¶ added in v1.13.0
func (s ClassifierSummaries) Swap(i, j int)
type ClassifierSummary ¶ added in v1.13.0
type ClassifiersResult ¶ added in v1.13.0
type ClassifiersResult struct {
TotalClassifiers int `json:"totalClassifiers"`
Classifiers []ClassifierSummary `json:"classifiers"`
}
type ClusterEventMatch ¶ added in v1.4.0
type ClusterEventMatch struct {
ClusterNamespace string `json:"clusterNamespace"`
ClusterName string `json:"clusterName"`
ClusterKind string `json:"clusterKind"`
ClusterInfo
Resources []Resource `json:"resources,omitempty"`
}
type ClusterFeatureSummary ¶
type ClusterFeatureSummary struct {
FeatureID libsveltosv1beta1.FeatureID `json:"featureID"`
Status libsveltosv1beta1.FeatureStatus `json:"status,omitempty"`
FailureMessage *string `json:"failureMessage,omitempty"`
}
func MapToClusterFeatureSummaries ¶
func MapToClusterFeatureSummaries(featureSummaries *[]configv1beta1.FeatureSummary) []ClusterFeatureSummary
type ClusterInfo ¶
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"`
// Dependencies is the human-readable status from ClusterSummary.Status.Dependencies.
// Non-empty means the ClusterSummary is waiting for one or more dependencies.
Dependencies string `json:"dependencies,omitempty"`
}
type ClusterResult ¶
type ClusterResult struct {
TotalClusters int `json:"totalClusters"`
ManagedClusters ManagedClusters `json:"managedClusters"`
}
type DryRunHelmChange ¶ added in v1.9.0
type DryRunHelmChange struct {
ReleaseName string `json:"releaseName"`
ReleaseNamespace string `json:"releaseNamespace"`
ChartVersion string `json:"chartVersion,omitempty"`
Action string `json:"action"`
Message string `json:"message,omitempty"`
}
DryRunHelmChange describes a simulated Helm release action.
type DryRunResourceChange ¶ added in v1.9.0
type DryRunResourceChange struct {
Name string `json:"name"`
Namespace string `json:"namespace,omitempty"`
Group string `json:"group,omitempty"`
Kind string `json:"kind"`
Version string `json:"version"`
Action string `json:"action"`
Message string `json:"message,omitempty"`
}
DryRunResourceChange describes a simulated Kubernetes resource action.
type DryRunResult ¶ added in v1.9.0
type DryRunResult struct {
ProfileName string `json:"profileName"`
ProfileKind string `json:"profileKind"`
// Namespace is only set for namespaced Profile resources.
Namespace string `json:"namespace,omitempty"`
// HasChanges is true when at least one actionable change was found.
HasChanges bool `json:"hasChanges"`
// ReportMissing is true when no ClusterReport exists yet.
ReportMissing bool `json:"reportMissing,omitempty"`
HelmReleaseChanges []DryRunHelmChange `json:"helmReleaseChanges,omitempty"`
ResourceChanges []DryRunResourceChange `json:"resourceChanges,omitempty"`
KustomizeChanges []DryRunResourceChange `json:"kustomizeChanges,omitempty"`
}
DryRunResult holds the simulated changes for a profile+cluster pair. ReportMissing is true when the controller has not yet generated a ClusterReport for this profile (e.g. the profile was just created).
type EventResult ¶ added in v1.4.0
type EventResult struct {
TotalEvents int `json:"totalEvents"`
EventTriggers []EventTrigger `json:"eventTriggers"`
}
type EventTrigger ¶ added in v1.4.0
type EventTriggerDetails ¶ added in v1.4.0
type EventTriggerDetails struct {
EventTriggerName string `json:"eventTriggerName"`
ClusterSelector libsveltosv1beta1.Selector `json:"clusterSelector"`
EventSource *libsveltosv1beta1.EventSource `json:"eventSource,omitempty"`
ClusterEventMatches []ClusterEventMatch `json:"clusterEventMatches,omitempty"`
}
type EventTriggerInfo ¶ added in v1.4.0
type EventTriggerInfo struct {
ClusterSelector libsveltosv1beta1.Selector `json:"clusterSelector"`
MatchingClusters []corev1.ObjectReference `json:"matchingClusters"`
}
type EventTriggers ¶ added in v1.4.0
type EventTriggers []EventTrigger
func (EventTriggers) Len ¶ added in v1.4.0
func (s EventTriggers) Len() int
func (EventTriggers) Less ¶ added in v1.4.0
func (s EventTriggers) Less(i, j int) bool
func (EventTriggers) Swap ¶ added in v1.4.0
func (s EventTriggers) Swap(i, j int)
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"`
// LatestVersion is the highest version currently published upstream for this chart, only
// set when it is newer than ChartVersion. Populated by addon-controller's periodic
// outdated-Helm-chart check, independent of this release's own deployment status.
// +optional
LatestVersion string `json:"latestVersion,omitempty"`
// LatestPatchVersion is the highest published version sharing ChartVersion's major/minor
// line, only set when it is newer than ChartVersion.
// +optional
LatestPatchVersion string `json:"latestPatchVersion,omitempty"`
// LastCheckedTime is when LatestVersion/LatestPatchVersion were last evaluated. Absent
// means this release has not been checked yet.
// +optional
LastCheckedTime *metav1.Time `json:"lastCheckedTime,omitempty"`
}
type HelmReleaseResult ¶
type HelmReleaseResult struct {
TotalHelmReleases int `json:"totalHelmReleases"`
HelmReleases []HelmRelease `json:"helmReleases"`
}
type ManagedCluster ¶
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 MatchingClusterEntry ¶ added in v1.13.0
type MatchingClusterEntry struct {
ClusterNamespace string `json:"clusterNamespace"`
ClusterName string `json:"clusterName"`
ClusterType string `json:"clusterType"`
ManagedLabels []ClassifierLabelEntry `json:"managedLabels,omitempty"`
ConflictedLabels []UnManagedLabelEntry `json:"conflictedLabels,omitempty"`
}
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"`
// SyncMode specifies how features are synced in a matching workload cluster.
SyncMode configv1beta1.SyncMode `json:"syncMode"`
}
type ProfileResult ¶ added in v0.42.0
type ProfileStatusResult ¶
type ProfileStatusResult struct {
ProfileName string `json:"profileName"`
ProfileType string `json:"profileType"`
ClusterFeatureSummary
}
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 Stats ¶ added in v1.9.0
type Stats struct {
CAPIClusters int `json:"capiClusters"`
NotReadyCAPIClusters int `json:"notReadyCAPIClusters"`
SveltosClusters int `json:"sveltosClusters"`
NotReadySveltosClusters int `json:"notReadySveltosClusters"`
PullModeClusters int `json:"pullModeClusters"`
ClusterProfiles int `json:"clusterProfiles"`
Profiles int `json:"profiles"`
ClusterSummaries int `json:"clusterSummaries"`
EventTriggers int `json:"eventTriggers"`
Classifiers int `json:"classifiers"`
ManagementClusterClassifiers int `json:"managementClusterClassifiers"`
}
Stats holds counts of Sveltos resources accessible to the requesting user.
type UnManagedLabelEntry ¶ added in v1.13.0
Click to show internal directories.
Click to hide internal directories.