ibpca

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KIND = "IBPCA"
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager, cfg *config.Config) error

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

func GetUpdateStack(allUpdates map[string][]Update) string

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 (r *ReconcileIBPCA) GetSpecState(instance *current.IBPCA) (*corev1.ConfigMap, error)

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) SetStatus

func (r *ReconcileIBPCA) SetStatus(instance *current.IBPCA, reconcileStatus *current.CRStatus, reconcileErr error) 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

func (u *Update) CACryptoCreated() bool

CACryptoCreated returns true if crypto material created

func (*Update) CACryptoUpdated

func (u *Update) CACryptoUpdated() bool

CACryptoUpdated returns true if crypto material updated

func (*Update) CAOverridesUpdated

func (u *Update) CAOverridesUpdated() bool

CAOverridesUpdated returns true if ca config overrides updated

func (*Update) CATagUpdated

func (u *Update) CATagUpdated() bool

func (*Update) ConfigOverridesUpdated

func (u *Update) ConfigOverridesUpdated() bool

ConfigOverridesUpdated returns true if either ca or TLS ca overrides updated

func (*Update) FabricVersionUpdated

func (u *Update) FabricVersionUpdated() bool

FabricVersionUpdated returns true if fabric version updated

func (*Update) GetUpdateStackWithTrues

func (u *Update) GetUpdateStackWithTrues() string

GetUpdateStackWithTrues is a helper method to print updates that have been detected

func (*Update) ImagesUpdated

func (u *Update) ImagesUpdated() bool

ImagesUpdated returns true if images updated

func (*Update) RenewTLSCert

func (u *Update) RenewTLSCert() bool

RenewTLSCert returns true if need to renew TLS cert

func (*Update) RestartNeeded

func (u *Update) RestartNeeded() bool

RestartNeeded returns true if changes in spec require components to restart

func (*Update) SpecUpdated

func (u *Update) SpecUpdated() bool

SpecUpdated returns true if any fields in spec are updated

func (*Update) TLSCAOverridesUpdated

func (u *Update) TLSCAOverridesUpdated() bool

TLSCAOverridesUpdated returns true if TLS ca config overrides updated

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL