Skip to content

Commit

Permalink
fix import type label
Browse files Browse the repository at this point in the history
  • Loading branch information
franzmueller committed Jan 23, 2024
1 parent efc5e61 commit e10b69f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/deploy/rancher2-api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (r *Rancher2) CreateContainer(name string, image string, env map[string]str
labels := map[string]string{
"user": userid,
"importId": name,
"importTypeId": importTypeId,
"importTypeId": strings.ReplaceAll(importTypeId, ":", "_"),
}
reqBody := &Request{
Name: name,
Expand Down Expand Up @@ -117,7 +117,7 @@ func (r *Rancher2) CreateContainer(name string, image string, env map[string]str
request.Url = r.url + "projects/" + r.projectId
if restart {
request.Url += "/workloads"
reqBody.Selector = Selector{MatchLabels: map[string]string{"importId": name}}
reqBody.Selector = Selector{MatchLabels: labels}
autoscaleRequestBody.Spec.TargetRef.ApiVersion = "apps/v1"
autoscaleRequestBody.Spec.TargetRef.Kind = "Deployment"
} else {
Expand Down

0 comments on commit e10b69f

Please sign in to comment.