Documentation ¶
Index ¶
- Constants
- Variables
- func Empty(c *Deps)
- type Check
- type Config
- type Dependency
- type Deps
- type Describable
- type Option
- func WithCustomResourceClient(client apiextensionsclientset.Interface) Option
- func WithDynamicClient(client dynamic.Interface) Option
- func WithKubeConfig(conf *rest.Config) Option
- func WithKubernetesClient(client kubernetes.Interface) Option
- func WithMeterProvider(mp *sdkmetric.MeterProvider) Option
- func WithOtelColConfig(conf *unstructured.Unstructured) Option
- func WithPortForwardedResource(pfr *PortForwardedResource) Option
- func WithTracerProvider(tp *sdktrace.TracerProvider) Option
- type PortForwardedResource
- type Result
- type Results
- type Step
Constants ¶
View Source
const ( ServiceName = "collector-cluster-check" ServiceVersion = "0.1.0" LabelSelector = "app.kubernetes.io/created-by=collector-cluster-checker" CertManagerCrdName = "issuers.cert-manager.io" ServiceMonitorCrdName = "servicemonitors.monitoring.coreos.com" OtelCrdName = "opentelemetrycollectors.opentelemetry.io" OtelOperatorSelector = "app.kubernetes.io/name=opentelemetry-operator" CertManagerSelector = "app.kubernetes.io/name=cert-manager" )
Variables ¶
View Source
var ( ColRes = schema.GroupVersionResource{Group: "opentelemetry.io", Version: "v1beta1", Resource: "opentelemetrycollectors"} PodRes = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"} )
Functions ¶
Types ¶
type Check ¶
type Check struct {
// contains filtered or unexported fields
}
func (*Check) Dependencies ¶
func (c *Check) Dependencies(conf *Config) []Dependency
func (*Check) Description ¶
type Dependency ¶
type Dependency interface { // Describable requires that every Dependency has a name and description Describable // Run can return an option that should be applied to the config object // Result represents whether the run was successful Run(ctx context.Context, deps *Deps) (Option, Result) // Dependencies is a list of dependencies that must be run prior to this one Dependencies(conf *Config) []Dependency // Shutdown allows the dependency to gracefully exit Shutdown(ctx context.Context) error }
type Deps ¶
type Deps struct { KubeClient kubernetes.Interface CustomResourceClient apiextensionsclientset.Interface DynamicClient dynamic.Interface MeterProvider *sdkmetric.MeterProvider TracerProvider *sdktrace.TracerProvider OtelColConfig *unstructured.Unstructured KubeConf *rest.Config PortForward *PortForwardedResource }
func NewDependencies ¶
func NewDependencies() *Deps
type Describable ¶
type Option ¶
type Option func(c *Deps)
func WithCustomResourceClient ¶
func WithCustomResourceClient(client apiextensionsclientset.Interface) Option
func WithDynamicClient ¶
func WithKubeConfig ¶
func WithKubernetesClient ¶
func WithKubernetesClient(client kubernetes.Interface) Option
func WithMeterProvider ¶
func WithMeterProvider(mp *sdkmetric.MeterProvider) Option
func WithOtelColConfig ¶
func WithOtelColConfig(conf *unstructured.Unstructured) Option
func WithPortForwardedResource ¶
func WithPortForwardedResource(pfr *PortForwardedResource) Option
func WithTracerProvider ¶
func WithTracerProvider(tp *sdktrace.TracerProvider) Option
type PortForwardedResource ¶
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func NewFailureResult ¶
func NewSuccessfulResult ¶
func (Result) ShouldContinue ¶
func (Result) Successful ¶
type Results ¶
type Results struct {
// contains filtered or unexported fields
}
func NewResults ¶
func NewResults(s Describable, r ...Result) Results
func (Results) ShouldStop ¶
type Step ¶
type Step interface { // Describable requires that every Step has a name and description Describable // Run can return an option that should be applied to the config object // Result represents whether the run was successful Run(ctx context.Context, deps *Deps) Results // Dependencies is a list of steps that must be run prior to this step Dependencies(conf *Config) []Dependency }
Click to show internal directories.
Click to hide internal directories.