Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go mod should not require k8s.io/kubernetes #473

Open
whizard opened this issue Apr 15, 2020 · 6 comments
Open

go mod should not require k8s.io/kubernetes #473

whizard opened this issue Apr 15, 2020 · 6 comments
Labels
tech debt Technical debt

Comments

@whizard
Copy link

whizard commented Apr 15, 2020

The latest argo-rollouts v0.8.0 go.mod should not require k8s.io/kubernetes. When I upgraded from "github.com/argoproj/argo-rollouts v0.7.2" to "github.com/argoproj/argo-rollouts v0.8.0" "go mod tidy" reports the following errors:

 go: github.com/argoproj/argo-rollouts@v0.8.0 requires
k8s.io/kubernetes@v1.17.3 requires
k8s.io/api@v0.0.0: reading k8s.io/api/go.mod at revision v0.0.0: unknown revision v0.0.0

For example:

do this: import "k8s.io/api"
not this: import "k8s.io/kubernetes/pkg/api"

do this: import "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
not this: import "k8s.io/kubernetes/pkg/controller"

See: kubernetes/kubernetes#81878

@dthomson25
Copy link
Member

dthomson25 commented May 5, 2020

In order to remove our dependency on k/k, we need to find replacements for the following:

  • From "k8s.io/kubernetes/pkg/controller":
    • ComputeHash
    • FilterReplicaSets
    • ReplicaSetsByCreationTimestamp
    • FilterActiveReplicaSets
    • controller.RSControlInterface
    • RealRSControl
    • RecheckDeletionTimestamp
    • NewReplicaSetControllerRefManager
  • From "k8s.io/kubernetes/pkg/util/labels"
    • CloneAndAddLabel
    • CloneSelectorAndAddLabel
  • From "k8s.io/kubernetes/pkg/util/hash"
    • DeepHashObject
  • From "k8s.io/kubernetes/pkg/apis/core/v1"
    • SetObjectDefaults_PodTemplate
  • From "k8s.io/kubernetes/pkg/util/node":
    • NodeUnreachablePodReason
  • From "k8s.io/kubernetes/cmd/kubeadm/app/util":
    • util.CheckErr

I think that's all the function calls from the k/k library. I think some of these function calls will be easy to duplicate or find in a different library, but I'm concerned others will be less flexible.

@derekperkins
Copy link
Contributor

Other argo projects are dealing with this too.
argoproj/gitops-engine#56

@vishal-yadav
Copy link

The issue appears for the latest release (v1.1.1) as well (Checkout code step in https://argoproj.github.io/argo-rollouts/CONTRIBUTING/#pre-requisites). Should simply use git clone/checkout?

$ go get -u github.com/argoproj/argo-rollouts
go: downloading github.com/argoproj/argo-rollouts v1.1.1
go get: github.com/argoproj/argo-rollouts@v1.1.1 requires
        k8s.io/kubernetes@v1.20.4 requires
        k8s.io/api@v0.0.0: reading k8s.io/api/go.mod at revision v0.0.0: unknown revision v0.0.0

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2022

This issue is stale because it has been open 60 days with no activity.

@zachaller
Copy link
Collaborator

@wardady
Copy link

wardady commented Jul 4, 2024

Hi folks. Do you happen to have any updates on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech debt Technical debt
Projects
None yet
Development

No branches or pull requests

7 participants