controllers

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

README

testing

hack :

  • in order not to miss a resource state with the find function (resources are polled on an interval basis),
  • a testingDelay variable can be set in each controller so it delays event processing by an amount of time longer than interval (interval + 100ms)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsManager

type AwsManager interface {
	AwsPolicyManager
	AwsRoleManager
}

type AwsPolicyManager

type AwsPolicyManager interface {
	PolicyExists(arn string) (bool, error)
	GetStatement(arn string) ([]api.StatementSpec, error)
	GetPolicyARN(pathPrefix, uniqueName string) (string, error)
	CreatePolicy(api.Policy) error
	UpdatePolicy(api.Policy) error
	DeletePolicy(policyARN string) error
}

type AwsRoleManager

type AwsRoleManager interface {
	RoleExists(roleName string) (bool, error)
	CreateRole(role api.Role, permissionsBoundariesPolicyARN string) error
	DeleteRole(roleName string) error
	AttachRolePolicy(roleName, policyARN string) error
	GetAttachedRolePoliciesARNs(roleName string) ([]string, error)
	GetRoleARN(roleName string) (string, error)
	DetachRolePolicy(roleName, policyARN string) error
}

type IamRoleServiceAccountReconciler

type IamRoleServiceAccountReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

IamRoleServiceAccountReconciler reconciles a IamRoleServiceAccount object

func NewIrsaReconciler

func NewIrsaReconciler(client client.Client, scheme *runtime.Scheme, logger logr.Logger) *IamRoleServiceAccountReconciler

func (*IamRoleServiceAccountReconciler) Reconcile

Reconcile is called each time an event occurs on an api.IamRoleServiceAccount resource

func (*IamRoleServiceAccountReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type PolicyReconciler

type PolicyReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

PolicyReconciler reconciles a Policy object

func NewPolicyReconciler

func NewPolicyReconciler(client client.Client, scheme *runtime.Scheme, awspm AwsPolicyManager, logger logr.Logger, cN string) *PolicyReconciler

func (*PolicyReconciler) Reconcile

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

Reconcile is called each time an event occurs on an api.Policy resource

func (*PolicyReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type RoleReconciler

type RoleReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

RoleReconciler reconciles a Role object

func NewRoleReconciler

func NewRoleReconciler(
	client client.Client,
	scheme *runtime.Scheme,
	awsrm AwsRoleManager,
	logger logr.Logger,
	clusterName,
	permissionsBoundariesPolicyARN string) *RoleReconciler

func (*RoleReconciler) Reconcile

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

func (*RoleReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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