Documentation ¶
Overview ¶
Copyright 2020 Eric Ace.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package nuxeo 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
- util.go