Skip to content

Commit

Permalink
Remove gpu support
Browse files Browse the repository at this point in the history
  • Loading branch information
jknipper committed Jul 13, 2023
1 parent f898d76 commit 8058042
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 187 deletions.
7 changes: 0 additions & 7 deletions pkg/controller/ground/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"github.com/sapcc/kubernikus/pkg/controller/ground/bootstrap/ccm"
"github.com/sapcc/kubernikus/pkg/controller/ground/bootstrap/csi"
"github.com/sapcc/kubernikus/pkg/controller/ground/bootstrap/dns"
"github.com/sapcc/kubernikus/pkg/controller/ground/bootstrap/gpu"
"github.com/sapcc/kubernikus/pkg/controller/ground/bootstrap/network"
"github.com/sapcc/kubernikus/pkg/util"
"github.com/sapcc/kubernikus/pkg/version"
Expand Down Expand Up @@ -81,12 +80,6 @@ func SeedKluster(clients config.Clients, factories config.Factories, images vers
}
}

if ok, _ := util.KlusterVersionConstraint(kluster, ">= 1.10"); ok {
if err := gpu.SeedGPUSupport(kubernetes); err != nil {
return errors.Wrap(err, "seed GPU support")
}
}

if ok, _ := util.KlusterVersionConstraint(kluster, ">= 1.20"); ok {
dynamicKubernetes, err := clients.Satellites.DynamicClientFor(kluster)
if err != nil {
Expand Down
37 changes: 0 additions & 37 deletions pkg/controller/ground/bootstrap/gpu/gpu.go

This file was deleted.

129 changes: 0 additions & 129 deletions pkg/controller/ground/bootstrap/gpu/manifest.go

This file was deleted.

6 changes: 0 additions & 6 deletions pkg/templates/ignition.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,6 @@ func (i *ignition) GenerateNode(kluster *kubernikusv1.Kluster, pool *models.Node
isFlatcar := true
if pool != nil {
nodeLabels = append(nodeLabels, "ccloud.sap.com/nodepool="+pool.Name)
if strings.HasPrefix(pool.Flavor, "zg") {
nodeLabels = append(nodeLabels, "gpu=nvidia-tesla-v100")
}
if strings.HasPrefix(pool.Flavor, "zg") {
nodeTaints = append(nodeTaints, "nvidia.com/gpu=present:NoSchedule")
}
for _, userTaint := range pool.Taints {
nodeTaints = append(nodeTaints, userTaint)
}
Expand Down
8 changes: 0 additions & 8 deletions pkg/templates/ignition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,4 @@ func TestNodeLabels(t *testing.T) {
//Ensure we rendered the expected template
assert.Contains(t, string(data), fmt.Sprintf("--node-labels=ccloud.sap.com/nodepool=%s", pool.Name))
}

gpuPool := &models.NodePool{Name: "some-name", Flavor: "zghuh"}
data, err = Ignition.GenerateNode(kluster, gpuPool, "test", &testKlusterSecret, false, imageRegistry, log.NewNopLogger())
if assert.NoError(t, err, "Failed to generate node") {
//Ensure we rendered the expected template
assert.Contains(t, string(data), fmt.Sprintf("--node-labels=ccloud.sap.com/nodepool=%s,gpu=nvidia-tesla-v100", pool.Name))
assert.Contains(t, string(data), fmt.Sprintf("--register-with-taints=nvidia.com/gpu=present:NoSchedule"))
}
}

0 comments on commit 8058042

Please sign in to comment.