nuxeo

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: Apache-2.0 Imports: 34 Imported by: 0

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

View Source
const (
	Updated reconOp = 1
	Created         = 2
	NA              = 3
)

Variables

View Source
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

type NuxeoReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

NuxeoReconciler reconciles a Nuxeo object

func (*NuxeoReconciler) Reconcile

func (r *NuxeoReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

+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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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