Documentation ¶
Index ¶
- Constants
- func IsInvalidConfig(err error) bool
- func IsNotFound(err error) bool
- func IsWrongType(err error) bool
- type Config
- type Resource
- func (r *Resource) ApplyCreateChange(ctx context.Context, obj, createChange interface{}) error
- func (r *Resource) ApplyDeleteChange(ctx context.Context, obj, deleteChange interface{}) error
- func (r *Resource) ApplyUpdateChange(ctx context.Context, obj, updateChange interface{}) error
- func (r *Resource) GetCurrentState(ctx context.Context, obj interface{}) (interface{}, error)
- func (r *Resource) GetDesiredState(ctx context.Context, obj interface{}) (interface{}, error)
- func (r *Resource) Name() string
- func (r *Resource) NewDeletePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*crud.Patch, error)
- func (r *Resource) NewUpdatePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*crud.Patch, error)
Constants ¶
const (
// Name is the identifier of the resource.
Name = "certconfig"
)
Variables ¶
This section is empty.
Functions ¶
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
Types ¶
type Config ¶
type Config struct { G8sClient versioned.Interface Logger micrologger.Logger APIIP string CertTTL string Provider string }
Config represents the configuration used to create a new cloud config resource.
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource implements the cloud config resource.
func (*Resource) ApplyCreateChange ¶
ApplyCreateChange takes observed custom object and create portion of the Patch provided by NewUpdatePatch or NewDeletePatch. It creates CertConfig objects when new cluster certificates are needed.
func (*Resource) ApplyDeleteChange ¶
func (*Resource) ApplyUpdateChange ¶
ApplyUpdateChange takes observed custom object and update portion of the Patch provided by NewUpdatePatch or NewDeletePatch.
func (*Resource) GetCurrentState ¶
GetCurrentState takes observed custom object as an input and based on that information looks for current state of cluster certconfigs and returns them. Return value is of type []*v1alpha1.CertConfig.
func (*Resource) GetDesiredState ¶
GetDesiredState returns all desired CertConfigs for managed certificates.
func (*Resource) NewDeletePatch ¶
func (r *Resource) NewDeletePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*crud.Patch, error)
NewDeletePatch is called upon observed custom object deletion. It receives the deleted custom object, the current state as provided by GetCurrentState and the desired state as provided by GetDesiredState. NewDeletePatch analyses the current and desired state and returns the patch to be applied by Create, Update and Delete functions.