Skip to content

Commit

Permalink
add root package docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fprojetto committed Aug 3, 2021
1 parent 2a28407 commit 49e30cb
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions cmd/virtual-kubelet/root/root.go
Expand Up @@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package root provides methods to build and start the virtual-kubelet.
package root

import (
"context"
"fmt"
"os"
"path"
"time"
Expand All @@ -37,7 +37,6 @@ import (
"k8s.io/client-go/util/workqueue"
"k8s.io/klog"

"github.com/liqotech/liqo/apis/sharing/v1alpha1"
"github.com/liqotech/liqo/cmd/virtual-kubelet/provider"
"github.com/liqotech/liqo/internal/utils/errdefs"
crdclient "github.com/liqotech/liqo/pkg/crdClient"
Expand Down Expand Up @@ -278,25 +277,6 @@ func runRootCommand(ctx context.Context, s *provider.Store, c *Opts) error {
return nil
}

func createOwnerReference(c *crdclient.CRDClient, advName, namespace string) []metav1.OwnerReference {
d, err := c.Resource("advertisements").Namespace(namespace).Get(advName, &metav1.GetOptions{})
if err != nil {
if k8serrors.IsNotFound(err) {
klog.Info("advertisement not found, setting empty owner reference")
}
return []metav1.OwnerReference{}
}

return []metav1.OwnerReference{
{
APIVersion: fmt.Sprintf("%s/%s", v1alpha1.GroupVersion.Group, v1alpha1.GroupVersion.Version),
Kind: "Advertisement",
Name: advName,
UID: d.(metav1.Object).GetUID(),
},
}
}

// newPodControllerWorkqueueRateLimiter returns a new custom rate limiter to be assigned to the pod controller workqueues.
// Differently from the standard workqueue.DefaultControllerRateLimiter(), composed of an overall bucket rate limiter
// and a per-item exponential rate limiter to address failures, this includes only the latter component. Hance avoiding
Expand Down

0 comments on commit 49e30cb

Please sign in to comment.