add index on containers.machine_id

This commit is contained in:
Pavel Sviderski
2024-11-16 07:00:09 +10:00
parent e82b78df49
commit e73e38957a
2 changed files with 9 additions and 2 deletions
+7 -2
View File
@@ -16,6 +16,11 @@ import (
"uncloud/internal/secret"
)
const (
LabelServiceID = "uncloud.service.id"
LabelServiceName = "uncloud.service.name"
)
// ServiceOptions contains all the options for creating a service.
type ServiceOptions struct {
Image string
@@ -100,8 +105,8 @@ func (c *Client) RunService(ctx context.Context, opts *ServiceOptions) (RunServi
config := &container.Config{
Image: opts.Image,
Labels: map[string]string{
"uncloud.service.id": serviceID,
"uncloud.service.name": serviceName,
LabelServiceID: serviceID,
LabelServiceName: serviceName,
},
}
netConfig := &network.NetworkingConfig{