Documentation ¶
Index ¶
- func CreateOrUpdateConfigMap(ctx context.Context, cm *corev1.ConfigMap, client v1.ConfigMapInterface) (res *corev1.ConfigMap, err error)
- func GenStatusReporterMapKey(conID string, distributionType xds.EventType) string
- func ReconcileStatuses(current *v1alpha1.IstioStatus, desired Progress) (bool, *v1alpha1.IstioStatus)
- type Controller
- type DistroReportHandler
- type Progress
- type Report
- type Reporter
- func (r *Reporter) AddInProgressResource(res config.Config)
- func (r *Reporter) DeleteInProgressResource(res config.Config)
- func (r *Reporter) Init(ledger ledger.Ledger, stop <-chan struct{})
- func (r *Reporter) QueryLastNonce(conID string, distributionType xds.EventType) (noncePrefix string)
- func (r *Reporter) RegisterDisconnect(conID string, types sets.Set[xds.EventType])
- func (r *Reporter) RegisterEvent(conID string, distributionType xds.EventType, nonce string)
- func (r *Reporter) SetController(controller *Controller)
- func (r *Reporter) Start(clientSet kubernetes.Interface, namespace string, podname string, ...)
- type ResourceStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdateConfigMap ¶
func CreateOrUpdateConfigMap(ctx context.Context, cm *corev1.ConfigMap, client v1.ConfigMapInterface) (res *corev1.ConfigMap, err error)
CreateOrUpdateConfigMap is lifted with few modifications from kubeadm's apiclient
func GenStatusReporterMapKey ¶
func ReconcileStatuses ¶
func ReconcileStatuses(current *v1alpha1.IstioStatus, desired Progress) (bool, *v1alpha1.IstioStatus)
Types ¶
type Controller ¶
type Controller struct { CurrentState map[status.Resource]map[string]Progress ObservationTime map[string]time.Time UpdateInterval time.Duration StaleInterval time.Duration // contains filtered or unexported fields }
func NewController ¶
func NewController(restConfig *rest.Config, namespace string, cs model.ConfigStore, m *status.Manager) *Controller
func (*Controller) Start ¶
func (c *Controller) Start(stop <-chan struct{})
type DistroReportHandler ¶
type DistroReportHandler struct {
// contains filtered or unexported fields
}
func (*DistroReportHandler) HandleNew ¶
func (drh *DistroReportHandler) HandleNew(obj any)
func (*DistroReportHandler) OnAdd ¶
func (drh *DistroReportHandler) OnAdd(obj any, _ bool)
func (*DistroReportHandler) OnDelete ¶
func (drh *DistroReportHandler) OnDelete(obj any)
func (*DistroReportHandler) OnUpdate ¶
func (drh *DistroReportHandler) OnUpdate(oldObj, newObj any)
type Progress ¶
func (*Progress) PlusEquals ¶
type Report ¶
type Report struct { Reporter string `json:"reporter"` DataPlaneCount int `json:"dataPlaneCount"` InProgressResources map[string]int `json:"inProgressResources"` }
func ReportFromYaml ¶
type Reporter ¶
type Reporter struct { UpdateInterval time.Duration PodName string // contains filtered or unexported fields }
func (*Reporter) AddInProgressResource ¶
AddInProgressResource must be called every time a resource change is detected by pilot. This allows us to lookup only the resources we expect to be in flight, not the ones that have already distributed
func (*Reporter) DeleteInProgressResource ¶
func (*Reporter) Init ¶
Init starts all the read only features of the reporter, used for nonce generation and responding to istioctl wait.
func (*Reporter) QueryLastNonce ¶
func (*Reporter) RegisterDisconnect ¶
RegisterDisconnect : when a dataplane disconnects, we should no longer count it, nor expect it to ack config.
func (*Reporter) RegisterEvent ¶
Register that a dataplane has acknowledged a new version of the config. Theoretically, we could use the ads connections themselves to harvest this data, but the mutex there is pretty hot, and it seems best to trade memory for time.
func (*Reporter) SetController ¶
func (r *Reporter) SetController(controller *Controller)
type ResourceStatus ¶
type ResourceStatus any