func (r *ConfigMapReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
	_ = r.log.WithValues("configmap", req.NamespacedName)

	var err error
	// Create a new signer using the private key that the instances will be configured with
	r.signer, err = signer.Create(kubeTypes.NamespacedName{Namespace: r.watchNamespace,
		Name: secrets.PrivateKeySecret}, r.client)
	if err != nil {
		return ctrl.Result{}, errors.Wrapf(err, "unable to create signer from private key secret")
	}

	// Fetch the ConfigMap. The predicate will have filtered out any ConfigMaps that we should not reconcile
	// so it is safe to assume that all ConfigMaps being reconciled describe hosts that need to be present in the
	// cluster.
	configMap := &core.ConfigMap{}
	if err := r.client.Get(ctx, req.NamespacedName, configMap); err != nil {
		if k8sapierrors.IsNotFound(err) {
			// Request object not found, could have been deleted after reconcile request.
			// Owned objects are automatically garbage collected. For additional cleanup logic use finalizers.
			// Return and don't requeue
			return ctrl.Result{}, nil
		}
		// Error reading the object - requeue the request.
		return ctrl.Result{}, err
	}

	return ctrl.Result{}, r.reconcileNodes(ctx, configMap)
}
// 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.7.2/pkg/reconcile
Reconcile is part of the main kubernetes reconciliation loop which aims to
move the current state of the cluster closer to the desired state.
// 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 . 7 . 2 / pkg / reconcile
func (r *ConfigMapReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
	_ = r.log.WithValues("configmap", req.NamespacedName)
	var err error
	r.signer, err = signer.Create(kubeTypes.NamespacedName{Namespace: r.watchNamespace,
		Name: secrets.PrivateKeySecret}, r.client)
	if err != nil {
		return ctrl.Result{}, errors.Wrapf(err, "unable to create signer from private key secret")
	}
	configMap := &core.ConfigMap{}
	if err := r.client.Get(ctx, req.NamespacedName, configMap); err != nil {
		if k8sapierrors.IsNotFound(err) {
			return ctrl.Result{}, nil
		}
		return ctrl.Result{}, err
	}
	return ctrl.Result{}, r.reconcileNodes(ctx, configMap)
}
func ( r * ConfigMapReconciler ) Reconcile ( ctx context . Context , req ctrl . Request ) ( ctrl . Result , error ) { _ = r . log . WithValues ( " " , req . NamespacedName ) var err error r . signer , err = signer . Create ( kubeTypes . NamespacedName { Namespace : r . watchNamespace , Name : secrets . PrivateKeySecret } , r . client ) if err != nil { return ctrl . Result { } , errors . Wrapf ( err , " " ) } configMap := & core . ConfigMap { } if err := r . client . Get ( ctx , req . NamespacedName , configMap ) ; err != nil { if k8sapierrors . IsNotFound ( err ) { return ctrl . Result { } , nil } return ctrl . Result { } , err } return ctrl . Result { } , r . reconcileNodes ( ctx , configMap ) }
Reconcile is part of the main kubernetes reconciliation loop which aims to
move the current state of the cluster closer to the desired state.
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state .
// Create a new signer using the private key that the instances will be configured with // Fetch the ConfigMap. The predicate will have filtered out any ConfigMaps that we should not reconcile // so it is safe to assume that all ConfigMaps being reconciled describe hosts that need to be present in the // cluster. // Request object not found, could have been deleted after reconcile request. // Owned objects are automatically garbage collected. For additional cleanup logic use finalizers. // Return and don't requeue // Error reading the object - requeue the request.