Documentation
¶
Index ¶
- Constants
- type Controller
- func (c *Controller) AddBasicResource(ctx context.Context, resource resources.Resource, ...) (graph.Resource, error)
- func (c *Controller) AddCertificateToManage(ctx context.Context, resource *certv1.Certificate, ...) (graph.Resource, error)
- func (c *Controller) AddConfigMapToManage(ctx context.Context, resource *corev1.ConfigMap, ...) (graph.Resource, error)
- func (c *Controller) AddDeploymentToManage(ctx context.Context, resource *appsv1.Deployment, ...) (graph.Resource, error)
- func (c *Controller) AddExternalResource(ctx context.Context, resource resources.Resource, ...) (graph.Resource, error)
- func (c *Controller) AddExternalTypedSecret(ctx context.Context, secret *corev1.Secret, secretType corev1.SecretType, ...) (graph.Resource, error)
- func (c *Controller) AddGVKToSpan(ctx context.Context, span opentracing.Span, resource runtime.Object) (gvk schema.GroupVersionKind)
- func (c *Controller) AddImmutableSecretToManage(ctx context.Context, resource *corev1.Secret, dependencies ...graph.Resource) (graph.Resource, error)
- func (c *Controller) AddIngressToManage(ctx context.Context, resource *netv1.Ingress, dependencies ...graph.Resource) (graph.Resource, error)
- func (c *Controller) AddIssuerToManage(ctx context.Context, resource *certv1.Issuer, dependencies ...graph.Resource) (graph.Resource, error)
- func (c *Controller) AddSecretToManage(ctx context.Context, resource *corev1.Secret, dependencies ...graph.Resource) (graph.Resource, error)
- func (c *Controller) AddServiceToManage(ctx context.Context, resource *corev1.Service, dependencies ...graph.Resource) (graph.Resource, error)
- func (c *Controller) AddUnsctructuredToManage(ctx context.Context, resource *unstructured.Unstructured, ...) (graph.Resource, error)
- func (c *Controller) Apply(ctx context.Context, res *Resource) error
- func (c *Controller) Create(ctx context.Context, node graph.Resource) error
- func (c *Controller) DeploymentMutateFn(ctx context.Context, dependencies ...graph.Resource) resources.Mutable
- func (c *Controller) EnsureReady(ctx context.Context, node graph.Resource) error
- func (c *Controller) EnsureSecretType(ctx context.Context, node graph.Resource) error
- func (c *Controller) Funcs(ctx context.Context, owner resources.Resource) template.FuncMap
- func (c *Controller) GetAndFilter(ctx context.Context, key client.ObjectKey, obj runtime.Object) (bool, error)
- func (c *Controller) GetFQDN() string
- func (c *Controller) GetName() string
- func (c *Controller) GetTemplatedConfig(ctx context.Context, templateConfig string, owner resources.Resource) ([]byte, error)
- func (c *Controller) GetVersion() string
- func (c *Controller) GlobalMutateFn(ctx context.Context) resources.Mutable
- func (c *Controller) HandleError(ctx context.Context, resource runtime.Object, resultError error) (ctrl.Result, error)
- func (c *Controller) Label(suffix ...string) string
- func (c *Controller) LabelWithPrefix(prefix string, suffix ...string) string
- func (c *Controller) NewContext(req ctrl.Request) context.Context
- func (c *Controller) NormalizeName(ctx context.Context, name string, suffixes ...string) string
- func (c *Controller) ProcessFunc(ctx context.Context, resource metav1.Object, dependencies ...graph.Resource) func(context.Context, graph.Resource) error
- func (c *Controller) Reconcile(req ctrl.Request) (ctrl.Result, error)
- func (c *Controller) Run(ctx context.Context, owner resources.Resource) error
- func (c *Controller) SetControllerStatus(ctx context.Context, data map[string]interface{}) error
- func (c *Controller) SetErrorConditions(ctx context.Context, data map[string]interface{}, resultError error) error
- func (c *Controller) SetErrorStatus(ctx context.Context, resource runtime.Object, resultError error) error
- func (c *Controller) SetSuccessConditions(ctx context.Context, data map[string]interface{}) error
- func (c *Controller) SetSuccessStatus(ctx context.Context, resource runtime.Object) error
- func (c *Controller) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- type Reconciler
- type Resource
- type ResourceManager
Constants ¶
View Source
const ( RetryDuration = 30 * time.Second RetryDelay = time.Second )
View Source
const ( WarningAnnotation = "goharbor.io/warning" WarningValueTmpl = "⚠️ This Resource is managed by *%s* ⚠️" )
View Source
const ( OperatorNameLabel = "goharbor.io/operator-controller" OperatorVersionLabel = "goharbor.io/operator-version" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { client.Client Name string Version string ConfigStore *configstore.Store Log logr.Logger Scheme *runtime.Scheme // contains filtered or unexported fields }
func NewController ¶
func NewController(ctx context.Context, name string, rm ResourceManager, config *configstore.Store) *Controller
func (*Controller) AddBasicResource ¶
func (*Controller) AddCertificateToManage ¶
func (c *Controller) AddCertificateToManage(ctx context.Context, resource *certv1.Certificate, dependencies ...graph.Resource) (graph.Resource, error)
func (*Controller) AddConfigMapToManage ¶
func (*Controller) AddDeploymentToManage ¶
func (c *Controller) AddDeploymentToManage(ctx context.Context, resource *appsv1.Deployment, dependencies ...graph.Resource) (graph.Resource, error)
func (*Controller) AddExternalResource ¶
func (*Controller) AddExternalTypedSecret ¶
func (*Controller) AddGVKToSpan ¶
func (c *Controller) AddGVKToSpan(ctx context.Context, span opentracing.Span, resource runtime.Object) (gvk schema.GroupVersionKind)
func (*Controller) AddImmutableSecretToManage ¶
func (*Controller) AddIngressToManage ¶
func (*Controller) AddIssuerToManage ¶
func (*Controller) AddSecretToManage ¶
func (*Controller) AddServiceToManage ¶
func (*Controller) AddUnsctructuredToManage ¶
func (c *Controller) AddUnsctructuredToManage(ctx context.Context, resource *unstructured.Unstructured, dependencies ...graph.Resource) (graph.Resource, error)
func (*Controller) DeploymentMutateFn ¶
func (*Controller) EnsureReady ¶
func (*Controller) EnsureSecretType ¶
func (*Controller) GetAndFilter ¶
func (*Controller) GetFQDN ¶
func (c *Controller) GetFQDN() string
func (*Controller) GetName ¶
func (c *Controller) GetName() string
func (*Controller) GetTemplatedConfig ¶
func (*Controller) GetVersion ¶
func (c *Controller) GetVersion() string
func (*Controller) GlobalMutateFn ¶
func (c *Controller) GlobalMutateFn(ctx context.Context) resources.Mutable
func (*Controller) HandleError ¶
func (*Controller) Label ¶
func (c *Controller) Label(suffix ...string) string
func (*Controller) LabelWithPrefix ¶
func (c *Controller) LabelWithPrefix(prefix string, suffix ...string) string
func (*Controller) NewContext ¶
func (c *Controller) NewContext(req ctrl.Request) context.Context
func (*Controller) NormalizeName ¶
func (*Controller) ProcessFunc ¶
func (*Controller) SetControllerStatus ¶
func (c *Controller) SetControllerStatus(ctx context.Context, data map[string]interface{}) error
func (*Controller) SetErrorConditions ¶
func (*Controller) SetErrorStatus ¶
func (*Controller) SetSuccessConditions ¶
func (c *Controller) SetSuccessConditions(ctx context.Context, data map[string]interface{}) error
func (*Controller) SetSuccessStatus ¶
func (*Controller) SetupWithManager ¶
type Reconciler ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.