Documentation ¶
Index ¶
- func AddOrUpdateBinding(existingBindings []*cloudresourcemanager.Binding, requiredBindings []string, ...) ([]*cloudresourcemanager.Binding, bool)
- func Contains(list []string, strToSearch string) bool
- func Filter(list []string, strToFilter string) (newList []string)
- func GetGCPCredentialsFromSecret(kubeClient client.Client, namespace, name string) ([]byte, error)
- func GetSecret(kubeClient client.Client, secretName, namespace string) (*corev1.Secret, error)
- func InArray(needle interface{}, haystack interface{}) (exists bool, index int)
- func NewGCPSecretCR(creds string, namespacedNamed kubetypes.NamespacedName) *corev1.Secret
- func RemoveOrUpdateBinding(existingBindings []*cloudresourcemanager.Binding, serviceAccountEmail string, ...) ([]*cloudresourcemanager.Binding, bool)
- func SecretExists(kubeClient client.Client, secretName, namespace string) bool
- type IamMemberType
- type OperationResult
- func ContinueOperationResult() OperationResult
- func ContinueProcessing() (result OperationResult, err error)
- func Requeue() (result OperationResult, err error)
- func RequeueAfter(delay time.Duration, errIn error) (result OperationResult, err error)
- func RequeueOnErrorOrContinue(errIn error) (result OperationResult, err error)
- func RequeueOnErrorOrStop(errIn error) (result OperationResult, err error)
- func RequeueWithError(errIn error) (result OperationResult, err error)
- func StopOperationResult() OperationResult
- func StopProcessing() (result OperationResult, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOrUpdateBinding ¶
func AddOrUpdateBinding(existingBindings []*cloudresourcemanager.Binding, requiredBindings []string, serviceAccount string, memberType IamMemberType) ([]*cloudresourcemanager.Binding, bool)
AddOrUpdateBinding checks if a binding from a map of bindings whose keys are the binding.Role exists in a list and if so it appends any new members to that binding. If the required binding does not exist it creates a new binding for the role it returns a []*cloudresourcemanager.Binding that contains all the previous bindings and the new ones if no new bindings are required it returns false TODO(MJ): add tests
func GetGCPCredentialsFromSecret ¶
GetGCPCredentialsFromSecret extracts the gcp credentials from a secret. return value is a bytearray
func NewGCPSecretCR ¶
func NewGCPSecretCR(creds string, namespacedNamed kubetypes.NamespacedName) *corev1.Secret
NewGCPSecretCR returns a Secret CR formatted for GCP for use in projectreference controller.
func RemoveOrUpdateBinding ¶
func RemoveOrUpdateBinding(existingBindings []*cloudresourcemanager.Binding, serviceAccountEmail string, memberType IamMemberType) ([]*cloudresourcemanager.Binding, bool)
Types ¶
type IamMemberType ¶
type IamMemberType int
IamMemberType represents different type of IAM members.
const ( ServiceAccount IamMemberType = iota GoogleGroup )
type OperationResult ¶
func ContinueOperationResult ¶
func ContinueOperationResult() OperationResult
func ContinueProcessing ¶
func ContinueProcessing() (result OperationResult, err error)
func Requeue ¶
func Requeue() (result OperationResult, err error)
func RequeueAfter ¶
func RequeueAfter(delay time.Duration, errIn error) (result OperationResult, err error)
func RequeueOnErrorOrContinue ¶
func RequeueOnErrorOrContinue(errIn error) (result OperationResult, err error)
func RequeueOnErrorOrStop ¶
func RequeueOnErrorOrStop(errIn error) (result OperationResult, err error)
func RequeueWithError ¶
func RequeueWithError(errIn error) (result OperationResult, err error)
func StopOperationResult ¶
func StopOperationResult() OperationResult
func StopProcessing ¶
func StopProcessing() (result OperationResult, err error)
func (OperationResult) RequeueOrCancel ¶
func (r OperationResult) RequeueOrCancel() bool
Directories ¶
Path | Synopsis |
---|---|
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
condition
Package condition is a generated GoMock package.
|
Package condition is a generated GoMock package. |
gcpclient
Package gcpclient is a generated GoMock package.
|
Package gcpclient is a generated GoMock package. |
projectclaim
Package projectclaim is a generated GoMock package.
|
Package projectclaim is a generated GoMock package. |