Skip to content

Commit

Permalink
fix(platform): remove qgpu config (#2080)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lis authored Sep 23, 2022
1 parent ca704c3 commit 862430a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 31 deletions.
10 changes: 2 additions & 8 deletions pkg/platform/provider/baremetal/cluster/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,7 @@ func completeServiceIP(cluster *v1.Cluster) error {
cluster.Annotations = make(map[string]string)
}
for index, name := range map[int]string{
constants.GPUQuotaAdmissionIPIndex: constants.GPUQuotaAdmissionIPAnnotaion,
constants.QGPUQuotaAdmissionIPIndex: constants.QGPUQuotaAdmissionIPAnnotaion,
constants.GPUQuotaAdmissionIPIndex: constants.GPUQuotaAdmissionIPAnnotaion,
} {
ip, err := GetIndexedIP(cluster.Status.ServiceCIDR, index)
if err != nil {
Expand Down Expand Up @@ -770,16 +769,11 @@ func (p *Provider) EnsurePrepareForControlplane(ctx context.Context, c *v1.Clust
oidcCa, _ := ioutil.ReadFile(constants.OIDCConfigFile)
auditPolicyData, _ := ioutil.ReadFile(constants.AuditPolicyConfigFile)
GPUQuotaAdmissionHost := c.Annotations[constants.GPUQuotaAdmissionIPAnnotaion]
QGPUQuotaAdmissionHost := c.Annotations[constants.QGPUQuotaAdmissionIPAnnotaion]
if GPUQuotaAdmissionHost == "" {
GPUQuotaAdmissionHost = "gpu-quota-admission"
}
if QGPUQuotaAdmissionHost == "" {
GPUQuotaAdmissionHost = "qgpu-quota-admission"
}
schedulerPolicyConfig, err := template.ParseString(schedulerPolicyConfig, map[string]interface{}{
"GPUQuotaAdmissionHost": GPUQuotaAdmissionHost,
"QGPUQuotaAdmissionHost": QGPUQuotaAdmissionHost,
"GPUQuotaAdmissionHost": GPUQuotaAdmissionHost,
})
if err != nil {
return errors.Wrap(err, "parse schedulerPolicyConfig error")
Expand Down
19 changes: 2 additions & 17 deletions pkg/platform/provider/baremetal/cluster/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,8 @@ const (
"name" : "tke.cloud.tencent.com/eni-ip"
}
],
"nodeCacheCapable" : false
},
{
"urlPrefix": "http://{{.QGPUQuotaAdmissionHost}}:12345/scheduler",
"filterVerb" : "filter",
"prioritizeVerb": "priorities",
"weight": 10,
"bindVerb": "bind",
"nodeCacheCapable": true,
"managedResources" : [
{
"name": "tke.cloud.tencent.com/qgpu-core"
},
{
"name" : "tke.cloud.tencent.com/qgpu-memory"
}
]
"nodeCacheCapable" : false,
"urlPrefix" : ""
}
],
"kind" : "Policy"
Expand Down
10 changes: 4 additions & 6 deletions pkg/platform/provider/baremetal/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,10 @@ const (
MetricsServerManifest = ManifestsDir + "metrics-server/metrics-server.yaml"
CiliumManifest = SrcDir + "cilium/*.yaml"

KUBERNETES = 1
DNSIPIndex = 10
GPUQuotaAdmissionIPIndex = 9
QGPUQuotaAdmissionIPIndex = 8
GPUQuotaAdmissionIPAnnotaion = platformv1.GroupName + "/gpu-quota-admission-ip"
QGPUQuotaAdmissionIPAnnotaion = platformv1.GroupName + "/qgpu-quota-admission-ip"
KUBERNETES = 1
DNSIPIndex = 10
GPUQuotaAdmissionIPIndex = 9
GPUQuotaAdmissionIPAnnotaion = platformv1.GroupName + "/gpu-quota-admission-ip"

// RenewCertsTimeThreshold control how long time left to renew certs
RenewCertsTimeThreshold = 30 * 24 * time.Hour
Expand Down

0 comments on commit 862430a

Please sign in to comment.