copy-1.4.0

KOSI Plugin copy Version 1.4.0

Summary

With the copy Plugin you can either copy a file or a whole directory recursively.

Keys

Key Description
src Mandatory set to the absolute path to the source file or folder.
dest Mandatory set to the absolute path to the destination file or folder.
overwrite true/false With overwrite true an already existing file or folder will be overwritten. The default value is set to false.

Usage

Example 1 - copy file

languageversion = "0.1.0";
apiversion = "kubernative/kubeops/kosi/user/v3";
name = "kosi-example-packagev3";
description = "kosi-example-package";
version = "0.1.0";
docs = "docs.tgz";
logo = "logo.png";

files =
{
  input="template.yaml";
}

containers =
{
    example=["docker.io", "nginx", "latest"];
}

install
{
    copy(src='"/absolute/path/to/file"'; dest='"/absolute/path/to/the/dest/file"';overwrite='"true/false"');
}

When copying, a new file is inevitably created in the destination directory. Da wird nicht der Dateiname verändert, sondern die Datei mit dem neuen Namen daneben gelegt.

Example 2 - copy folder

languageversion = "0.1.0";
apiversion = "kubernative/kubeops/kosi/user/v3";
name = "kosi-example-packagev3";
description = "kosi-example-package";
version = "0.1.0";
docs = "docs.tgz";
logo = "logo.png";

files =
{
  input="template.yaml";
}

containers =
{
    example=["docker.io", "nginx", "latest"];
}

install
{
    copy(src='"/absolute/path/to/folder"'; dest='"/absolute/path/to/the/dest/folder"';overwrite='"true/false"');
}

If the destination folder does not exists, it will be created. The content of the src folder will be copied into the dest folder.

⚠️ Be careful, overwritten data will be lost and will be not recoverable! ⚠️