diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000..3cab280ce1 Binary files /dev/null and b/.DS_Store differ diff --git a/apis/.DS_Store b/apis/.DS_Store new file mode 100644 index 0000000000..8a9fbc744c Binary files /dev/null and b/apis/.DS_Store differ diff --git a/apis/apiserver/.DS_Store b/apis/apiserver/.DS_Store new file mode 100644 index 0000000000..783d0fd14f Binary files /dev/null and b/apis/apiserver/.DS_Store differ diff --git a/apis/vshn/.DS_Store b/apis/vshn/.DS_Store new file mode 100644 index 0000000000..783d0fd14f Binary files /dev/null and b/apis/vshn/.DS_Store differ diff --git a/docs/modules/ROOT/assets/.DS_Store b/docs/modules/ROOT/assets/.DS_Store new file mode 100644 index 0000000000..cd3a2cf86a Binary files /dev/null and b/docs/modules/ROOT/assets/.DS_Store differ diff --git a/pkg/.DS_Store b/pkg/.DS_Store new file mode 100644 index 0000000000..a59774a81a Binary files /dev/null and b/pkg/.DS_Store differ diff --git a/pkg/apiserver/.DS_Store b/pkg/apiserver/.DS_Store new file mode 100644 index 0000000000..c453382143 Binary files /dev/null and b/pkg/apiserver/.DS_Store differ diff --git a/pkg/apiserver/vshn/.DS_Store b/pkg/apiserver/vshn/.DS_Store new file mode 100644 index 0000000000..5fc806cc59 Binary files /dev/null and b/pkg/apiserver/vshn/.DS_Store differ diff --git a/pkg/comp-functions/functions/vshnnextcloud/deploy.go b/pkg/comp-functions/functions/vshnnextcloud/deploy.go index 5557033c09..9ef984b5c9 100644 --- a/pkg/comp-functions/functions/vshnnextcloud/deploy.go +++ b/pkg/comp-functions/functions/vshnnextcloud/deploy.go @@ -22,7 +22,6 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "sigs.k8s.io/yaml" ) const ( @@ -397,57 +396,54 @@ func newRelease(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.V } func configureCronSidecar(values map[string]interface{}, version string) error { - extraSidecarContainers := map[string]any{ - "name": "cron", - "command": []string{ - "/cron.sh", - }, - "image": "nextcloud:" + version, - "volumeMounts": []map[string]any{ - { - "mountPath": "/var/www", - "name": "nextcloud-data", - "subpath": "root", - }, - { - "mountPath": "/var/www/html", - "name": "nextcloud-data", - "subPath": "html", + extraSidecarContainers := []any{ + map[string]any{ + "name": "cron", + "command": []any{ + "/cron.sh", }, - { - "mountPath": "/var/www/html/data", - "name": "nextcloud-data", - "subPath": "data", - }, - { - "mountPath": "/var/www/html/config", - "name": "nextcloud-data", - "subPath": "config", - }, - { - "mountPath": "/var/www/html/custom_apps", - "name": "nextcloud-data", - "subPath": "custom_apps", - }, - { - "mountPath": "/var/www/tmp", - "name": "nextcloud-data", - "subPath": "tmp", - }, - { - "mountPath": "/var/www/html/themes", - "name": "nextcloud-data", - "subPath": "themes", + "image": "nextcloud:" + version, + "volumeMounts": []any{ + map[string]any{ + "mountPath": "/var/www", + "name": "nextcloud-data", + "subpath": "root", + }, + map[string]any{ + "mountPath": "/var/www/html", + "name": "nextcloud-data", + "subPath": "html", + }, + map[string]any{ + "mountPath": "/var/www/html/data", + "name": "nextcloud-data", + "subPath": "data", + }, + map[string]any{ + "mountPath": "/var/www/html/config", + "name": "nextcloud-data", + "subPath": "config", + }, + map[string]any{ + "mountPath": "/var/www/html/custom_apps", + "name": "nextcloud-data", + "subPath": "custom_apps", + }, + map[string]any{ + "mountPath": "/var/www/tmp", + "name": "nextcloud-data", + "subPath": "tmp", + }, + map[string]any{ + "mountPath": "/var/www/html/themes", + "name": "nextcloud-data", + "subPath": "themes", + }, }, }, } - stringSidecarContainers, err := toYAML(extraSidecarContainers) - if err != nil { - return fmt.Errorf("cannot parse extraSidecarContainers: %w", err) - } - - return unstructured.SetNestedField(values, []string{stringSidecarContainers}, []string{"nextcloud", "extraSidecarContainers"}...) + return unstructured.SetNestedSlice(values, extraSidecarContainers, []string{"nextcloud", "extraSidecarContainers"}...) } func addApacheConfig(svc *runtime.ServiceRuntime, comp *vshnv1.VSHNNextcloud) error { @@ -505,8 +501,3 @@ func validateFQDNs(fqdns []string) error { } return nil } - -func toYAML(obj any) (string, error) { - yamlBytes, err := yaml.Marshal(obj) - return string(yamlBytes), err -}