controllers

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultClientID  = "CLIENT_ID"
	DefaultSecretKey = "CLIENT_SECRET"
	FinalizerName    = "finalizer.ory.hydra.sh"

	DefaultNamespace = "default"
)

Variables

View Source
var (
	ClientIDKey     = DefaultClientID
	ClientSecretKey = DefaultSecretKey
)

Functions

This section is empty.

Types

type OAuth2ClientFactory added in v0.0.24

type OAuth2ClientFactory func(
	spec hydrav1alpha1.OAuth2ClientSpec,
	tlsTrustStore string,
	insecureSkipVerify bool,
) (hydra.Client, error)

OAuth2ClientFactory is a function that creates oauth2 client. The OAuth2ClientReconciler defaults to use hydra.New and the factory allows to override this behavior for mocks during tests.

type OAuth2ClientReconciler

type OAuth2ClientReconciler struct {
	client.Client
	HydraClient         hydra.Client
	Log                 logr.Logger
	ControllerNamespace string
	// contains filtered or unexported fields
}

OAuth2ClientReconciler reconciles a OAuth2Client object.

func New added in v0.0.24

func New(c client.Client, hydraClient hydra.Client, log logr.Logger, opts ...Option) *OAuth2ClientReconciler

New returns a new Oauth2ClientReconciler.

func (*OAuth2ClientReconciler) Reconcile

func (r *OAuth2ClientReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*OAuth2ClientReconciler) SetupWithManager

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

type Option added in v0.0.24

type Option func(*Options)

Option is a functional option.

func WithClientFactory added in v0.0.24

func WithClientFactory(factory OAuth2ClientFactory) Option

WithClientFactory sets a function to create new oauth2 clients during the reconciliation logic.

func WithNamespace added in v0.0.24

func WithNamespace(ns string) Option

WithNamespace sets the kubernetes namespace for the controller. The default is "default".

type Options added in v0.0.24

type Options struct {
	Namespace           string
	OAuth2ClientFactory OAuth2ClientFactory
}

Options represent options to pass to the oauth2 client reconciler.

Directories

Path Synopsis
mocks

Jump to

Keyboard shortcuts

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