controllers

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// FinalizerName name of the finalier
	FinalizerName = "finalizer.oathkeeper.ory.sh"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMapOperator

type ConfigMapOperator struct {
	client.Client
	Log              logr.Logger
	DefaultConfigMap types.NamespacedName
	RulesFileName    string
}

ConfigMapOperator that maintains Oathkeeper rules as an json-formatted entry in a ConfigMap

func (*ConfigMapOperator) CreateOrUpdate

func (cmo *ConfigMapOperator) CreateOrUpdate(ctx context.Context, oathkeeperRulesJSON []byte, triggeredBy *oathkeeperv1alpha1.Rule) error

type FilesOperator

type FilesOperator struct {
	Log           logr.Logger
	RulesFilePath string
}

FilesOperator that maintains Oathkeeper rules as a flat json file in a local filesystem

func (*FilesOperator) CreateOrUpdate

func (fo *FilesOperator) CreateOrUpdate(ctx context.Context, oathkeeperRulesJSON []byte, triggeredBy *oathkeeperv1alpha1.Rule) error

type OperatorMode

type OperatorMode interface {
	// CreateOrUpdate ORY Oathkeeper Access Rule list using implementation-specific means.
	// oathkeeperRulesJSON - serialized JSON with an array of objects that conform to Oathkeeper Rule syntax
	// triggeredBy - the recently created/update rule that triggered the operation
	CreateOrUpdate(ctx context.Context, oathkeeperRulesJSON []byte, triggeredBy *oathkeeperv1alpha1.Rule) error
}

OperatorMode is an interface that provides runtime strategy for operating mode ("controller" or "sidecar").

type RuleReconciler

type RuleReconciler struct {
	client.Client
	Log              logr.Logger
	ValidationConfig validation.Config
	OperatorMode
}

RuleReconciler reconciles a Rule object

func (*RuleReconciler) Reconcile

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

Reconcile main reconcile loop

func (*RuleReconciler) SetupWithManager

func (r *RuleReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager ??

Jump to

Keyboard shortcuts

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