Documentation ¶
Index ¶
- type LatestRevisionClient
- type RevisionController
- type RevisionResource
- type StaticPodLatestRevisionClient
- func (c StaticPodLatestRevisionClient) GetLatestRevisionState() (*operatorv1.OperatorSpec, *operatorv1.OperatorStatus, int32, string, error)
- func (c StaticPodLatestRevisionClient) UpdateLatestRevisionOperatorStatus(latestAvailableRevision int32, updateFuncs ...v1helpers.UpdateStatusFunc) (*operatorv1.OperatorStatus, bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LatestRevisionClient ¶
type LatestRevisionClient interface { v1helpers.OperatorClient // GetLatestRevisionState returns the spec, status and latest revision. GetLatestRevisionState() (spec *operatorv1.OperatorSpec, status *operatorv1.OperatorStatus, rev int32, rv string, err error) // UpdateLatestRevisionOperatorStatus updates the status with the given latestAvailableRevision and the by applying the given updateFuncs. UpdateLatestRevisionOperatorStatus(latestAvailableRevision int32, updateFuncs ...v1helpers.UpdateStatusFunc) (*operatorv1.OperatorStatus, bool, error) }
LatestRevisionClient is an operator client for an operator status with a latest revision field.
type RevisionController ¶
type RevisionController struct {
// contains filtered or unexported fields
}
RevisionController is a controller that watches a set of configmaps and secrets and them against a revision snapshot of them. If the original resources changes, the revision counter is increased, stored in LatestAvailableRevision field of the operator config and new snapshots suffixed by the revision are created.
func NewRevisionController ¶
func NewRevisionController( targetNamespace string, configMaps []RevisionResource, secrets []RevisionResource, kubeInformersForTargetNamespace informers.SharedInformerFactory, operatorClient LatestRevisionClient, configMapGetter corev1client.ConfigMapsGetter, secretGetter corev1client.SecretsGetter, eventRecorder events.Recorder, ) *RevisionController
NewRevisionController create a new revision controller.
func (*RevisionController) Run ¶
func (c *RevisionController) Run(workers int, stopCh <-chan struct{})
Run starts the kube-apiserver and blocks until stopCh is closed.
type RevisionResource ¶
type StaticPodLatestRevisionClient ¶
type StaticPodLatestRevisionClient struct {
v1helpers.StaticPodOperatorClient
}
StaticPodLatestRevisionClient is an LatestRevisionClient implementation for StaticPodOperatorStatus.
func (StaticPodLatestRevisionClient) GetLatestRevisionState ¶
func (c StaticPodLatestRevisionClient) GetLatestRevisionState() (*operatorv1.OperatorSpec, *operatorv1.OperatorStatus, int32, string, error)
func (StaticPodLatestRevisionClient) UpdateLatestRevisionOperatorStatus ¶
func (c StaticPodLatestRevisionClient) UpdateLatestRevisionOperatorStatus(latestAvailableRevision int32, updateFuncs ...v1helpers.UpdateStatusFunc) (*operatorv1.OperatorStatus, bool, error)