Documentation ¶
Index ¶
- Constants
- func IsAlreadyRegisteredError(err error) bool
- func IsInvalidConfig(err error) bool
- func IsMissingLabel(err error) bool
- func IsNotFound(err error) bool
- type CollectorSet
- type CollectorSetConfig
- type LegacyStatusCollector
- type LegacyStatusCollectorConfig
- type Patch
- type Provider
- type Resource
- type ResourceConfig
- type Status
Constants ¶
View Source
const (
Name = "status"
)
Variables ¶
This section is empty.
Functions ¶
func IsAlreadyRegisteredError ¶
IsAlreadyRegisteredError asserts alreadyRegisteredError.
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
Types ¶
type CollectorSet ¶
Set is basically only a wrapper for the operator's collector implementations. It eases the iniitialization and prevents some weird import mess so we do not have to alias packages. There is also the benefit of the helper type kept private so we do not need to expose this magic.
func NewCollectorSet ¶
func NewCollectorSet(config CollectorSetConfig) (*CollectorSet, error)
type CollectorSetConfig ¶
type CollectorSetConfig struct { Logger micrologger.Logger Watcher func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) }
type LegacyStatusCollector ¶
type LegacyStatusCollector struct {
// contains filtered or unexported fields
}
func NewLegacyStatusCollector ¶
func NewLegacyStatusCollector(config LegacyStatusCollectorConfig) (*LegacyStatusCollector, error)
func (*LegacyStatusCollector) Collect ¶
func (c *LegacyStatusCollector) Collect(ch chan<- prometheus.Metric) error
func (*LegacyStatusCollector) Describe ¶
func (c *LegacyStatusCollector) Describe(ch chan<- *prometheus.Desc) error
type LegacyStatusCollectorConfig ¶
type LegacyStatusCollectorConfig struct { Logger micrologger.Logger Watcher func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) }
type Provider ¶
type Provider interface {
ClusterStatus() providerv1alpha1.StatusCluster
}
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
func NewResource ¶
func NewResource(config ResourceConfig) (*Resource, error)
func (*Resource) EnsureCreated ¶
func (*Resource) EnsureDeleted ¶
type ResourceConfig ¶
type ResourceConfig struct { BackOffFactory func() backoff.Interface ClusterEndpointFunc func(v interface{}) (string, error) ClusterIDFunc func(v interface{}) (string, error) ClusterStatusFunc func(v interface{}) (providerv1alpha1.StatusCluster, error) // TODO replace this with a G8sClient to fetch the node versions from the // NodeConfig status once we can use the NodeConfig for general node // management. As of now NodeConfig CRs are still used for draining in older // tenant clusters. Logger micrologger.Logger NodeCountFunc func(v interface{}) (int, error) // RESTClient needs to be configured with a serializer capable of serializing // and deserializing the object which is watched by the informer. Otherwise // deserialization will fail when trying to manage the cluster status. // // For standard k8s object this is going to be e.g. // // k8sClient.CoreV1().RESTClient() // // For CRs of giantswarm this is going to be e.g. // // g8sClient.CoreV1alpha1().RESTClient() // RESTClient rest.Interface TenantCluster tenantcluster.Interface VersionBundleVersionFunc func(v interface{}) (string, error) }
type Status ¶
type Status struct {
Cluster providerv1alpha1.StatusCluster `json:"cluster" yaml:"cluster"`
}
Click to show internal directories.
Click to hide internal directories.