Documentation ¶
Index ¶
- Constants
- func CheckForContainerCrash(state *store.EngineState, mt *store.ManifestTarget)
- func DispatchServiceChange(st store.RStore, service *v1.Service, mn model.ManifestName, ip k8s.NodeIP) error
- func HandleKubernetesDiscoveryCreateAction(_ context.Context, state *store.EngineState, a KubernetesDiscoveryCreateAction)
- func HandleKubernetesDiscoveryDeleteAction(_ context.Context, state *store.EngineState, a KubernetesDiscoveryDeleteAction)
- func HandleKubernetesDiscoveryUpdateAction(ctx context.Context, state *store.EngineState, ...)
- func HandleKubernetesDiscoveryUpdateStatusAction(ctx context.Context, state *store.EngineState, ...)
- func KeyForManifest(mn model.ManifestName) types.NamespacedName
- func ShouldLogEvent(e *v1.Event) bool
- func UpdateK8sRuntimeState(ctx context.Context, state *store.EngineState, key types.NamespacedName)
- type EventWatchManager
- type KubernetesDiscoveryCreateAction
- type KubernetesDiscoveryDeleteAction
- type KubernetesDiscoveryUpdateAction
- type KubernetesDiscoveryUpdateStatusAction
- type ManifestSubscriber
- type ServiceChangeAction
- type ServiceWatcher
Constants ¶
const ImagePulledReason = "Pulled"
const ImagePullingReason = "Pulling"
Variables ¶
This section is empty.
Functions ¶
func CheckForContainerCrash ¶ added in v0.20.2
func CheckForContainerCrash(state *store.EngineState, mt *store.ManifestTarget)
func DispatchServiceChange ¶
func HandleKubernetesDiscoveryCreateAction ¶ added in v0.20.2
func HandleKubernetesDiscoveryCreateAction(_ context.Context, state *store.EngineState, a KubernetesDiscoveryCreateAction)
func HandleKubernetesDiscoveryDeleteAction ¶ added in v0.20.2
func HandleKubernetesDiscoveryDeleteAction(_ context.Context, state *store.EngineState, a KubernetesDiscoveryDeleteAction)
func HandleKubernetesDiscoveryUpdateAction ¶ added in v0.20.2
func HandleKubernetesDiscoveryUpdateAction(ctx context.Context, state *store.EngineState, a KubernetesDiscoveryUpdateAction)
func HandleKubernetesDiscoveryUpdateStatusAction ¶ added in v0.20.2
func HandleKubernetesDiscoveryUpdateStatusAction(ctx context.Context, state *store.EngineState, a KubernetesDiscoveryUpdateStatusAction)
func KeyForManifest ¶ added in v0.20.2
func KeyForManifest(mn model.ManifestName) types.NamespacedName
func ShouldLogEvent ¶ added in v0.16.1
func UpdateK8sRuntimeState ¶ added in v0.20.2
func UpdateK8sRuntimeState(ctx context.Context, state *store.EngineState, key types.NamespacedName)
Types ¶
type EventWatchManager ¶
type EventWatchManager struct {
// contains filtered or unexported fields
}
TODO(nick): Right now, the EventWatchManager, PodWatcher, and ServiceWatcher all look very similar, with a few subtle differences (particularly in how we decide whether two objects are related, and how we index those relationships).
We're probably missing some abstractions here.
TODO(nick): We should also add garbage collection and/or handle Delete events from the kubernetes informer properly.
func NewEventWatchManager ¶
func NewEventWatchManager(kClient k8s.Client, ownerFetcher k8s.OwnerFetcher, cfgNS k8s.Namespace) *EventWatchManager
func (*EventWatchManager) OnChange ¶
func (m *EventWatchManager) OnChange(ctx context.Context, st store.RStore, _ store.ChangeSummary) error
type KubernetesDiscoveryCreateAction ¶ added in v0.20.2
type KubernetesDiscoveryCreateAction struct {
KubernetesDiscovery *v1alpha1.KubernetesDiscovery
}
func NewKubernetesDiscoveryCreateAction ¶ added in v0.20.2
func NewKubernetesDiscoveryCreateAction(kd *v1alpha1.KubernetesDiscovery) KubernetesDiscoveryCreateAction
func (KubernetesDiscoveryCreateAction) Action ¶ added in v0.20.2
func (p KubernetesDiscoveryCreateAction) Action()
func (KubernetesDiscoveryCreateAction) Summarize ¶ added in v0.20.2
func (p KubernetesDiscoveryCreateAction) Summarize(s *store.ChangeSummary)
type KubernetesDiscoveryDeleteAction ¶ added in v0.20.2
type KubernetesDiscoveryDeleteAction struct {
Name types.NamespacedName
}
func NewKubernetesDiscoveryDeleteAction ¶ added in v0.20.2
func NewKubernetesDiscoveryDeleteAction(name types.NamespacedName) KubernetesDiscoveryDeleteAction
func (KubernetesDiscoveryDeleteAction) Action ¶ added in v0.20.2
func (p KubernetesDiscoveryDeleteAction) Action()
func (KubernetesDiscoveryDeleteAction) Summarize ¶ added in v0.20.2
func (p KubernetesDiscoveryDeleteAction) Summarize(s *store.ChangeSummary)
type KubernetesDiscoveryUpdateAction ¶ added in v0.20.2
type KubernetesDiscoveryUpdateAction struct {
KubernetesDiscovery *v1alpha1.KubernetesDiscovery
}
func NewKubernetesDiscoveryUpdateAction ¶ added in v0.20.2
func NewKubernetesDiscoveryUpdateAction(kd *v1alpha1.KubernetesDiscovery) KubernetesDiscoveryUpdateAction
func (KubernetesDiscoveryUpdateAction) Action ¶ added in v0.20.2
func (p KubernetesDiscoveryUpdateAction) Action()
func (KubernetesDiscoveryUpdateAction) Summarize ¶ added in v0.20.2
func (p KubernetesDiscoveryUpdateAction) Summarize(s *store.ChangeSummary)
type KubernetesDiscoveryUpdateStatusAction ¶ added in v0.20.2
type KubernetesDiscoveryUpdateStatusAction struct { ObjectMeta *metav1.ObjectMeta Status *v1alpha1.KubernetesDiscoveryStatus }
func NewKubernetesDiscoveryUpdateStatusAction ¶ added in v0.20.2
func NewKubernetesDiscoveryUpdateStatusAction(kd *v1alpha1.KubernetesDiscovery) KubernetesDiscoveryUpdateStatusAction
func (KubernetesDiscoveryUpdateStatusAction) Action ¶ added in v0.20.2
func (p KubernetesDiscoveryUpdateStatusAction) Action()
func (KubernetesDiscoveryUpdateStatusAction) Summarize ¶ added in v0.20.2
func (p KubernetesDiscoveryUpdateStatusAction) Summarize(s *store.ChangeSummary)
type ManifestSubscriber ¶ added in v0.20.2
type ManifestSubscriber struct {
// contains filtered or unexported fields
}
func NewManifestSubscriber ¶ added in v0.20.2
func NewManifestSubscriber(cfgNS k8s.Namespace, client ctrlclient.Client) *ManifestSubscriber
func (*ManifestSubscriber) OnChange ¶ added in v0.20.2
func (m *ManifestSubscriber) OnChange(ctx context.Context, st store.RStore, summary store.ChangeSummary) error
OnChange creates KubernetesDiscovery objects from the engine manifests' K8s targets.
Because this runs extremely frequently and cannot rely on change summary to filter its work, it keeps copies of the latest versions it successfully persisted to the server in lastUpdate so that it can avoid unnecessary API calls.
Currently, any unexpected API errors are fatal.
type ServiceChangeAction ¶
type ServiceChangeAction struct { Service *v1.Service ManifestName model.ManifestName URL *url.URL }
func NewServiceChangeAction ¶
func NewServiceChangeAction(service *v1.Service, mn model.ManifestName, url *url.URL) ServiceChangeAction
func (ServiceChangeAction) Action ¶
func (ServiceChangeAction) Action()
type ServiceWatcher ¶
type ServiceWatcher struct {
// contains filtered or unexported fields
}
func NewServiceWatcher ¶
func NewServiceWatcher(kCli k8s.Client, ownerFetcher k8s.OwnerFetcher, cfgNS k8s.Namespace) *ServiceWatcher
func (*ServiceWatcher) OnChange ¶
func (w *ServiceWatcher) OnChange(ctx context.Context, st store.RStore, _ store.ChangeSummary) error