Documentation
¶
Index ¶
- func AttachFallbackToLogs(sc Client, pod *corev1.Pod, logstream io.ReadCloser) error
- func GetNamespacedName(obj metav1.Object) types.NamespacedName
- func ReleaseHold(ctx context.Context, sc Client, obj api.Object) error
- type Client
- type Factory
- type FactoryInterface
- type ManagedReporter
- type Manager
- type Reporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachFallbackToLogs ¶ added in v0.2.9
Attach to pod, falling back to streaming logs on error
func GetNamespacedName ¶ added in v0.2.8
func GetNamespacedName(obj metav1.Object) types.NamespacedName
Types ¶
type Client ¶
type Client interface {
runtimeclient.Client
GetLogs(string, string, *corev1.PodLogOptions) (io.ReadCloser, error)
Attach(*corev1.Pod) error
}
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
func (*Factory) GenerateName ¶ added in v0.2.9
A (naive) implementation of the algorithm that k8s uses to generate a unique name on the server side when `generateName` is specified. Allows us to generate a unique name client-side for our k8s resources.
type FactoryInterface ¶
type ManagedReporter ¶ added in v0.2.9
type ManagedReporter struct {
Reporter
// contains filtered or unexported fields
}
type Manager ¶ added in v0.2.9
type Manager struct {
runtimecache.Cache
Objs []runtime.Object
// contains filtered or unexported fields
}
Wrapper for controller-runtime cache
func (*Manager) AddReporter ¶ added in v0.2.9
type Reporter ¶ added in v0.2.9
type Reporter interface {
// Register creates an informer for a given kind/obj.
Register(cache.Cache) (cache.Informer, error)
// MatchingObj tells the cache manager which objects the reporter receives events for.
// Allows tests to inject objects.
MatchingObj(interface{}) bool
// Handler receives events from the informer. Invoked only once.
Handler(context.Context, <-chan ctrl.Request) error
}
Similar to controller-runtime's controller/reconciler, a reporter is wired up to an informer, triggering a func on new events for a particular kind. Unlike a reconciler, it's not intended to do anything fancy like implement a k8s API.
Click to show internal directories.
Click to hide internal directories.