Documentation
¶
Index ¶
- Constants
- func AsResult(err error) (ctrl.Result, error)
- func ConditionFailed(reason, msgFmt string, args ...any) error
- func ConditionUnknown(reason, msgFmt string, args ...any) error
- func MarkCondition(err error, failure, unknown markConditionFunc)
- func NewResultError(result ctrl.Result, err error) error
- func NewSecret(name, namespace string, opts ...SecretOpt) v1.Secret
- func TemporaryError(err error) error
- func TerminalError(err error) error
- type AccountReconciler
- type BaseReconciler
- type NKeyFactory
- type OperatorReconciler
- type SecretOpt
- type SigningKeyReconciler
- type UserReconciler
Constants ¶
const AccountFinalizer = "accounts.nats.io/finalizer"
Variables ¶
This section is empty.
Functions ¶
func AsResult ¶
AsResult uses err to return a ctrl.Result and error to the reconciler runtime, taking into account whether the error is temporary, terminal or neither. The fallback is to return an empty result with the causing error, resulting in the reconciler runtime logging the error and re-enqueuing the reconciliation.
func ConditionFailed ¶
func ConditionUnknown ¶
func MarkCondition ¶
func MarkCondition(err error, failure, unknown markConditionFunc)
MarkCondition uses err to mark the condition of the owning object. If err contains a conditionError, the condition will be marked as either failed or unknown, depending on the state of said conditionError.
func NewResultError ¶
NewResultError is used to terminate reconciliation and control whether the request should be re-enqueued by the result parameter.
func NewSecret ¶
NewSecret creates a new secret with the given name and namespace. Other options can be passed in to set desired fields.
func TemporaryError ¶
TemporaryError is used to terminate reconciliation and will result in the request being re-enqueued.
func TerminalError ¶
TerminalError is used to terminate reconciliation and will not result in the request being re-enqueued.
Types ¶
type AccountReconciler ¶
type AccountReconciler struct { *BaseReconciler SysAccountLoader *nsc.SystemAccountLoader }
AccountReconciler reconciles an Account object
func (*AccountReconciler) Reconcile ¶
func (r *AccountReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile
func (*AccountReconciler) SetupWithManager ¶
func (r *AccountReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type BaseReconciler ¶
type BaseReconciler struct { client.Client Scheme *runtime.Scheme CoreV1 corev1.CoreV1Interface AccountsV1Alpha1 accountsv1alpha1.AccountsV1alpha1Interface EventRecorder record.EventRecorder }
type NKeyFactory ¶
type OperatorReconciler ¶
type OperatorReconciler struct {
*BaseReconciler
}
OperatorReconciler reconciles a Operator object
func (*OperatorReconciler) Reconcile ¶
func (r *OperatorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile
func (*OperatorReconciler) SetupWithManager ¶
func (r *OperatorReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SecretOpt ¶
func WithAnnotations ¶
WithAnnotations sets the annotations of the ObjectMeta in the secret.
func WithImmutable ¶
WithImmutable sets the immutable field of the secret.
func WithLabels ¶
WithLabels sets the labels of the ObjectMeta in the secret.
func WithStringData ¶
WithStringData sets the string data of the secret.
type SigningKeyReconciler ¶
type SigningKeyReconciler struct { client.Client Scheme *runtime.Scheme CoreV1 corev1.CoreV1Interface AccountsV1Alpha1 accountsclientsets.AccountsV1alpha1Interface }
SigningKeyReconciler reconciles a SigningKey object
func (*SigningKeyReconciler) Reconcile ¶
func (r *SigningKeyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile
func (*SigningKeyReconciler) SetupWithManager ¶
func (r *SigningKeyReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type UserReconciler ¶
type UserReconciler struct {
*BaseReconciler
}
UserReconciler reconciles a User object
func (*UserReconciler) Reconcile ¶
func (r *UserReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile
func (*UserReconciler) SetupWithManager ¶
func (r *UserReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.