Documentation
¶
Index ¶
Constants ¶
View Source
const ControllerName = "virtual-cluster-access"
ControllerName is the name of this controller.
Variables ¶
View Source
var CreateTemporaryFile = afero.TempFile
CreateTemporaryFile creates a temporary file. Exposed for testing.
Functions ¶
func HasRenewAnnotationPredicate ¶
HasRenewAnnotationPredicate is a predicate that returns true if the object has a 'resourcesv1alpha1.ServiceAccountTokenRenewTimestamp' annotation.
Types ¶
type Reconciler ¶
type Reconciler struct {
Client client.Client
FS afero.Fs
Channel chan event.TypedGenericEvent[*rest.Config]
// contains filtered or unexported fields
}
Reconciler reconciles garden access secrets.
func (*Reconciler) AddToManager ¶
func (r *Reconciler) AddToManager(mgr manager.Manager, namespace, secretName string) error
AddToManager adds Reconciler to the given manager.
func (*Reconciler) Reconcile ¶
func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile processes the given access secret in the request. It extracts the included Kubeconfig, and prepares a dedicated REST config where the inline bearer token is replaced by a bearer token file. Any subsequent reconciliation run causes the content of the BearerTokenFile to be updated with the token found in the access secret.
Click to show internal directories.
Click to hide internal directories.