Documentation ¶
Overview ¶
This package performs reconciliation for a Nuxeo custom resource and the objects that are generated by the Operator from the CR: Deployment, Ingress/Route, Service, ServiceAccount, PVC, ConfigMap, & Secret.
Unit testing is performed using https://github.com/stretchr/testify. See the Make file for the unit test target.
Each unit test file conforms to the same structure:
test functions - test functions are at the top, and take a test suite struct receiver suite struct - the test suite structure required by testify, and augmented with suite-specific state setup/teardown function(s) - perform setup / teardown suite function - is run by 'go test' and calls all test functions helper functions - called by the various test functions
The main "entry point" of the package is the Reconcile function in nuxeo_controller.go. Each dependent resource is reconciled in a dedicated file. E.g. nuxeo_controller.go 'Reconcile' calls 'reconcileNodeSet' in nodeset.go to reconcile the NodeSets in the Nuxeo CR. Same for Service, ServiceAccount, etc.
Index ¶
Constants ¶
const ( Updated reconOp = 1 Created = 2 NA = 3 )
Variables ¶
var NuxeoServiceAccountName = "nuxeo"
Functions ¶
func GetNuxeoContainer ¶
func GetNuxeoContainer(dep *v1.Deployment) (*v12.Container, error)
GetNuxeoContainer walks the container array in the passed deployment and returns a ref to the container named "nuxeo". If not found, returns a nil container ref and an error.
Types ¶
type NuxeoReconciler ¶
NuxeoReconciler reconciles a Nuxeo object
func (*NuxeoReconciler) Reconcile ¶
+kubebuilder:rbac:groups=appzygy.net,resources=nuxeos,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=appzygy.net,resources=nuxeos/status,verbs=get;update;patch
func (*NuxeoReconciler) SetupWithManager ¶
func (r *NuxeoReconciler) SetupWithManager(mgr ctrl.Manager) error
Source Files ¶
- access.go
- backing_service.go
- cert.go
- clid.go
- config.go
- contribution.go
- controller_util.go
- doc.go
- ingress.go
- mergeutil.go
- nodeset.go
- nuxeo_conf.go
- nuxeo_controller.go
- nuxeo_controller_doreconcile.go
- nuxeo_status.go
- nuxeo_tls.go
- probe.go
- pvc.go
- recon_util.go
- revproxy_nginx.go
- route.go
- service.go
- serviceacct.go
- storage.go
- test_common.go
- util.go
Directories ¶
Path | Synopsis |
---|---|
This package contains the code that interprets the "preConfigs" resource in the Nuxeo CR.
|
This package contains the code that interprets the "preConfigs" resource in the Nuxeo CR. |