util

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricResultSuccess MetricResult = "success"
	MetricResultError   MetricResult = "error"

	MetricReasonEmpty                    MetricReason = ""
	MetricReasonClusterAccessFailed      MetricReason = "cluster_access_failed"
	MetricReasonUninstallHelmFailed      MetricReason = "uninstall_helm_failed"
	MetricReasonInstallFailed            MetricReason = "upgrade_failed"
	MetricReasonUpgradeFailed            MetricReason = "upgrade_failed"
	MetricReasonPluginDefinitionNotFound MetricReason = "plugin_definition_not_found"
	MetricReasonTemplateFailed           MetricReason = "template_failed"
	MetricReasonDiffFailed               MetricReason = "diff_failed"
	MetricReasonHelmChartIsNotDefined    MetricReason = "helm_chart_is_not_defined"
	MetricReasonSuspendFailed            MetricReason = "suspend_failed"
)

Variables

View Source
var (
	PluginReconcileTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "greenhouse_plugin_reconcile_total",
		},
		[]string{"pluginDefinition", "clusterName", "plugin", "namespace", "result", "reason", "owned_by"})
	OwnedByLabelMissingGauge = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "greenhouse_owned_by_label_missing",
			Help: "Indicates if the greenhouse.sap/owned-by label is missing or invalid",
		},
		[]string{"resource_kind", "resource_name", "organization"},
	)
)

Functions

func ComputeOwnerLabelCondition added in v0.6.0

func ComputeOwnerLabelCondition(ctx context.Context, c client.Client, resourceObj metav1.Object) greenhousemetav1alpha1.Condition

func GreenhouseSCIMConfigToSCIMConfig

func GreenhouseSCIMConfigToSCIMConfig(ctx context.Context, k8sClient client.Client, config *greenhouseapisv1alpha1.SCIMConfig, namespace string) (*scim.Config, error)

func UpdateOwnedByLabelMissingMetric added in v0.6.0

func UpdateOwnedByLabelMissingMetric(resource lifecycle.RuntimeObject, isOwnerLabelMissing bool)

func UpdatePluginReconcileTotalMetric added in v0.6.0

func UpdatePluginReconcileTotalMetric(plugin *greenhousev1alpha1.Plugin, result MetricResult, reason MetricReason)

Types

type MetricReason added in v0.6.0

type MetricReason string

type MetricResult added in v0.6.0

type MetricResult string

Jump to

Keyboard shortcuts

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