From 4ec32bafa7b61c221e0577a01810ef54e420110a Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 1 Oct 2024 10:17:22 +0200 Subject: [PATCH] add volumes to container as map --- entrypoint.go | 4 ++++ models/resources/processing/processing.go | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/entrypoint.go b/entrypoint.go index 0600357..c5bcf16 100644 --- a/entrypoint.go +++ b/entrypoint.go @@ -158,6 +158,10 @@ func SetConfig(mongoUrl string, database string, natsUrl string, lokiUrl string, Type: "string", ReadOnly: false, } + m["volumes"] = resource_model.Model{ + Type: "map[string]string", + ReadOnly: false, + } } accessor.StoreOne(&resource_model.ResourceModel{ ResourceType: model, diff --git a/models/resources/processing/processing.go b/models/resources/processing/processing.go index b92970c..1e75db3 100644 --- a/models/resources/processing/processing.go +++ b/models/resources/processing/processing.go @@ -9,17 +9,12 @@ import ( "cloud.o-forge.io/core/oc-lib/tools" ) -type Volume struct { - Name string `json:"name,omitempty" bson:"name,omitempty"` // Name is the volume name - Path string `json:"path,omitempty" bson:"path,omitempty"` // Path is the volume path -} - type Container struct { Image string `json:"image,omitempty" bson:"image,omitempty"` // Image is the container image Command string `json:"command,omitempty" bson:"command,omitempty"` // Command is the container command Args string `json:"args,omitempty" bson:"args,omitempty"` // Args is the container arguments Env map[string]string `json:"env,omitempty" bson:"env,omitempty"` // Env is the container environment variables - Volumes []Volume + Volumes map[string]string `json:"volumes,omitempty" bson:"volumes,omitempty"` // Volumes is the container volumes } type Expose struct {