Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager, cfg *config.Config) error
- func GetUpdateStack(allUpdates map[string][]Update) string
- type ReconcileIBPCA
- func (r *ReconcileIBPCA) AddOwnerReferenceToSecret(secret *corev1.Secret) (bool, error)
- func (r *ReconcileIBPCA) AppendUpdateIfMissing(updates []Update, update Update) []Update
- func (r *ReconcileIBPCA) CreateFunc(e event.CreateEvent) bool
- func (r *ReconcileIBPCA) GetSpecState(instance *current.IBPCA) (*corev1.ConfigMap, error)
- func (r *ReconcileIBPCA) GetUpdateStatus(instance *current.IBPCA) *Update
- func (r *ReconcileIBPCA) GetUpdateStatusAtElement(instance *current.IBPCA, index int) *Update
- func (r *ReconcileIBPCA) PodsRunning(instance *current.IBPCA) (bool, error)
- func (r *ReconcileIBPCA) PopUpdate(instance string) *Update
- func (r *ReconcileIBPCA) PushUpdate(instance string, update Update)
- func (r *ReconcileIBPCA) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
- func (r *ReconcileIBPCA) ReconcileRestart(namespace string) (bool, error)
- func (r *ReconcileIBPCA) SaveSpecState(instance *current.IBPCA) error
- func (r *ReconcileIBPCA) SetStatus(instance *current.IBPCA, reconcileStatus *current.CRStatus, reconcileErr error) error
- func (r *ReconcileIBPCA) SetupWithManager(mgr ctrl.Manager) error
- func (r *ReconcileIBPCA) UpdateFunc(e event.UpdateEvent) bool
- type Update
- func (u *Update) CACryptoCreated() bool
- func (u *Update) CACryptoUpdated() bool
- func (u *Update) CAOverridesUpdated() bool
- func (u *Update) CATagUpdated() bool
- func (u *Update) ConfigOverridesUpdated() bool
- func (u *Update) FabricVersionUpdated() bool
- func (u *Update) GetUpdateStackWithTrues() string
- func (u *Update) ImagesUpdated() bool
- func (u *Update) RenewTLSCert() bool
- func (u *Update) RestartNeeded() bool
- func (u *Update) SpecUpdated() bool
- func (u *Update) TLSCAOverridesUpdated() bool
Constants ¶
const (
KIND = "IBPCA"
)
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new IBPCA Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.
func GetUpdateStack ¶
Types ¶
type ReconcileIBPCA ¶
type ReconcileIBPCA struct { Offering caReconcile Config *config.Config RestartService *staggerrestarts.StaggerRestartsService // contains filtered or unexported fields }
ReconcileIBPCA reconciles a IBPCA object
func (*ReconcileIBPCA) AddOwnerReferenceToSecret ¶
func (r *ReconcileIBPCA) AddOwnerReferenceToSecret(secret *corev1.Secret) (bool, error)
func (*ReconcileIBPCA) AppendUpdateIfMissing ¶
func (r *ReconcileIBPCA) AppendUpdateIfMissing(updates []Update, update Update) []Update
func (*ReconcileIBPCA) CreateFunc ¶
func (r *ReconcileIBPCA) CreateFunc(e event.CreateEvent) bool
TODO: Move to predicate.go
func (*ReconcileIBPCA) GetSpecState ¶
func (*ReconcileIBPCA) GetUpdateStatus ¶
func (r *ReconcileIBPCA) GetUpdateStatus(instance *current.IBPCA) *Update
func (*ReconcileIBPCA) GetUpdateStatusAtElement ¶
func (r *ReconcileIBPCA) GetUpdateStatusAtElement(instance *current.IBPCA, index int) *Update
func (*ReconcileIBPCA) PodsRunning ¶
func (r *ReconcileIBPCA) PodsRunning(instance *current.IBPCA) (bool, error)
func (*ReconcileIBPCA) PopUpdate ¶
func (r *ReconcileIBPCA) PopUpdate(instance string) *Update
func (*ReconcileIBPCA) PushUpdate ¶
func (r *ReconcileIBPCA) PushUpdate(instance string, update Update)
func (*ReconcileIBPCA) Reconcile ¶
func (r *ReconcileIBPCA) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile reads that state of the cluster for a IBPCA object and makes changes based on the state read and what is in the IBPCA.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue. +kubebuilder:rbac:groups=apiextensions.k8s.io,resources=persistentvolumeclaims;persistentvolumes,verbs=get;list;watch;create;update;patch;delete;deletecollection +kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions,verbs=get +kubebuilder:rbac:groups=route.openshift.io,resources=routes;routes/custom-host,verbs=get;list;watch;create;update;patch;delete;deletecollection +kubebuilder:rbac:groups="",resources=pods;pods/log;persistentvolumeclaims;persistentvolumes;services;endpoints;events;configmaps;secrets;nodes;serviceaccounts,verbs=get;list;watch;create;update;patch;delete;deletecollection +kubebuilder:rbac:groups="batch",resources=jobs,verbs=get;list;watch;create;update;patch;delete;deletecollection +kubebuilder:rbac:groups="authorization.openshift.io";"rbac.authorization.k8s.io",resources=roles;rolebinding,verbs=get;list;watch;create;update;patch;delete;deletecollection;bind;escalate +kubebuilder:rbac:groups="",resources=namespaces,verbs=get +kubebuilder:rbac:groups=apps,resources=deployments;daemonsets;replicasets;statefulsets,verbs=get;list;watch;create;update;patch;delete;deletecollection +kubebuilder:rbac:groups=monitoring.coreos.com,resources=servicemonitors,verbs=get;create +kubebuilder:rbac:groups=apps,resourceNames=ibp-operator,resources=deployments/finalizers,verbs=update +kubebuilder:rbac:groups=ibp.com,resources=ibpcas.ibp.com;ibppeers.ibp.com;ibporderers.ibp.com;ibpcas;ibppeers;ibporderers;ibpconsoles;ibpcas/finalizers;ibppeer/finalizers;ibporderers/finalizers;ibpconsole/finalizers;ibpcas/status;ibppeers/status;ibporderers/status;ibpconsoles/status,verbs=get;list;watch;create;update;patch;delete;deletecollection +kubebuilder:rbac:groups=extensions;networking.k8s.io;config.openshift.io,resources=ingresses;networkpolicies,verbs=get;list;watch;create;update;patch;delete;deletecollection +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;watch;create;update;patch;delete;deletecollection
func (*ReconcileIBPCA) ReconcileRestart ¶
func (r *ReconcileIBPCA) ReconcileRestart(namespace string) (bool, error)
func (*ReconcileIBPCA) SaveSpecState ¶
func (r *ReconcileIBPCA) SaveSpecState(instance *current.IBPCA) error
func (*ReconcileIBPCA) SetupWithManager ¶
func (r *ReconcileIBPCA) SetupWithManager(mgr ctrl.Manager) error
func (*ReconcileIBPCA) UpdateFunc ¶
func (r *ReconcileIBPCA) UpdateFunc(e event.UpdateEvent) bool
TODO: Move to predicate.go
type Update ¶
type Update struct {
// contains filtered or unexported fields
}
Update defines a list of elements that we detect spec updates on
func (*Update) CACryptoCreated ¶
CACryptoCreated returns true if crypto material created
func (*Update) CACryptoUpdated ¶
CACryptoUpdated returns true if crypto material updated
func (*Update) CAOverridesUpdated ¶
CAOverridesUpdated returns true if ca config overrides updated
func (*Update) CATagUpdated ¶
func (*Update) ConfigOverridesUpdated ¶
ConfigOverridesUpdated returns true if either ca or TLS ca overrides updated
func (*Update) FabricVersionUpdated ¶
FabricVersionUpdated returns true if fabric version updated
func (*Update) GetUpdateStackWithTrues ¶
GetUpdateStackWithTrues is a helper method to print updates that have been detected
func (*Update) ImagesUpdated ¶
ImagesUpdated returns true if images updated
func (*Update) RenewTLSCert ¶
RenewTLSCert returns true if need to renew TLS cert
func (*Update) RestartNeeded ¶
RestartNeeded returns true if changes in spec require components to restart
func (*Update) SpecUpdated ¶
SpecUpdated returns true if any fields in spec are updated
func (*Update) TLSCAOverridesUpdated ¶
TLSCAOverridesUpdated returns true if TLS ca config overrides updated