controller

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SuccessSynced is used as part of the Event 'reason' when a SecretClaim is synced
	SuccessSynced = "Synced"
	FailedSynced  = "Failed"

	// ErrResourceExists is used as part of the Event 'reason' when a SecretClaim fails
	// to sync due to a Secret of the same name already existing.
	ErrResourceExists = "ErrResourceExists"

	// MessageResourceExists is the message used for Events when a resource
	// fails to sync due to a Secret already existing
	MessageResourceExists = "Resource %q already exists and is not managed by SecretClaim"

	// MessageResourceSynced is the message used for an Event fired when a SecretClaim
	// is synced successfully
	MessageResourceSynced = "SecretClaim synced successfully"

	MessageCryptopusAPIConfigNotFound   = "Secret '%s' with Cryptopus API Details not found"
	MessageCryptopusAPIInvalid          = "Cryptopus API Config Invalid. Make sure secret '%s' contains CRYPTOPUS_API, CRYPTOPUS_API_USER, CRYPTOPUS_API_TOKEN"
	MessageCryptopusAPIFailed           = "Unable to make request to Cryptopus API: '%s': %s"
	MessageCryptopusAPINewRequestFailed = "Unable to create HTTP Request Client for Cryptopus API: '%s': %s"

	MessageFailed = "Unable to get Secret for Account %s sfrom Cryptopus: %s"

	MessageSecretClaimValueRequired = "The value '%s' is required in Secretclaim '%s'"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller is the controller implementation for SecretClaim resources

func NewController

func NewController(
	kubeclientset kubernetes.Interface,
	cryptopuscontrollerclientset clientset.Interface,
	secretInformer coreinformers.SecretInformer,
	secretClaimInformer informers.SecretClaimInformer,
	defaultRefreshTime int32) *Controller

NewController returns a new sample controller

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

type CryptopusAccountDetail

type CryptopusAccountDetail struct {
	Id                int32  `json:"id"`
	AccountName       string `json:"accountname"`
	GroupId           int32  `json:"group_id"`
	Group             string `json:"group"`
	Team              string `json:"team"`
	TeamId            int32  `json:"team_id"`
	CleartextPassword string `json:"cleartext_password"`
	CleartextUsername string `json:"cleartext_username"`
}

type CryptopusAccountList

type CryptopusAccountList struct {
	Account CryptopusAccountDetail `json:"account"`
}

type CryptopusMessage

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

type CryptopusResponse

type CryptopusResponse struct {
	Data    CryptopusAccountList `json:"data"`
	Message CryptopusMessage     `json:"messages"`
}

Jump to

Keyboard shortcuts

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