tenant

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const TenantAdminDomainKeySecretField = "adminURL"

Tenant's credentials secret field name for admin domain url

View Source
const TenantAdminPasswordSecretField = "admin_password"

Secret field name with Tenant's admin user password

View Source
const TenantProviderKeySecretField = "token"

Tenant's credentials secret field name for access token

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new Tenant Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

func FetchMasterCredentials

func FetchMasterCredentials(k8sClient client.Client, tenantR *apiv1alpha1.Tenant) (string, error)

FetchMasterCredentials get secret using k8s client

func URLFromDomain

func URLFromDomain(domain string) (*url.URL, error)

Types

type InternalReconciler

type InternalReconciler struct {
	// contains filtered or unexported fields
}

InternalReconciler reconciles a Tenant object

func NewInternalReconciler

func NewInternalReconciler(k8sClient client.Client, tenantR *apiv1alpha1.Tenant,
	portaClient *porta_client_pkg.ThreeScaleClient, log logr.Logger) *InternalReconciler

NewInternalReconciler constructs InternalReconciler object

func (*InternalReconciler) Run

func (r *InternalReconciler) Run() error

Run tenant reconciliation logic Facts to reconcile: - Have 3scale Tenant Account - Have active admin user - Have secret with tenant's access_token

type ReconcileTenant

type ReconcileTenant struct {
	// contains filtered or unexported fields
}

ReconcileTenant reconciles a Tenant object

func (*ReconcileTenant) Reconcile

func (r *ReconcileTenant) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a Tenant object and makes changes based on the state read and what is in the Tenant.Spec TODO(user): Modify this Reconcile function to implement your Controller logic. This example creates a Pod as an example Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

Jump to

Keyboard shortcuts

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