Documentation
¶
Index ¶
Constants ¶
const ControllerName = "virtual-cluster-access"
ControllerName is the name of this controller.
Variables ¶
var CreateTemporaryFile = afero.TempFile
CreateTemporaryFile creates a temporary file. Exposed for testing.
var NewVirtualClient = func(restConfig *rest.Config) (client.Client, error) { return client.New(restConfig, client.Options{Scheme: operatorclient.VirtualScheme}) }
NewVirtualClient builds a client to the virtual cluster from the given REST config. Exposed for testing.
Functions ¶
func IsGardenerInternalSecretPredicate ¶
IsGardenerInternalSecretPredicate is a predicate that returns true if the object matches the given name and namespace.
Types ¶
type Reconciler ¶
type Reconciler struct {
Client client.Client
FS afero.Fs
Channel chan event.TypedGenericEvent[*rest.Config]
GardenNamespace string
ConcurrentSyncs int
APIAudiences []string
Clock clock.Clock
// 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.