Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReconcileRobotAccounts ¶
func ReconcileRobotAccounts( harborAPI harbor.API, creds CredentialStore, project harbor.Project, accountSuffix string, pushAccess bool, rotationInterval time.Duration, ) (*crdv1.RobotAccountCredential, bool, error)
ReconcileRobotAccounts ensures that the required robot accounts exist in the given project
Types ¶
type CredentialStore ¶
type CredentialStore interface { Has(project, name string) bool Get(project, name string) (*crdv1.RobotAccountCredential, error) Set(project string, cred crdv1.RobotAccountCredential) error Reset() error }
CredentialStore is an interface that is used to store the credentials
type MappingFunc ¶
type MappingFunc func( client.Client, crdv1.ProjectMapping, crdv1.HarborSync, harbor.Project, crdv1.RobotAccountCredential, string) error
MappingFunc implements a specific strategy for reconciling the cluster state
func MappingFuncForConfig ¶
func MappingFuncForConfig(mapping crdv1.ProjectMapping) (MappingFunc, error)
MappingFuncForConfig returns a MappingFunc for the given mapping which can be used by the called to reconcile the desired state
Click to show internal directories.
Click to hide internal directories.