From 72b82f481f253455b0a5f919b47a60e82da38160 Mon Sep 17 00:00:00 2001 From: Abdullah <55325434+Abdullahxz@users.noreply.github.com> Date: Fri, 7 Jun 2024 12:56:04 +0500 Subject: [PATCH 1/2] feat: added workflow to cp from pod to local --- specs/kubernetes/copy_from_pod_to_local.yaml | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 specs/kubernetes/copy_from_pod_to_local.yaml diff --git a/specs/kubernetes/copy_from_pod_to_local.yaml b/specs/kubernetes/copy_from_pod_to_local.yaml new file mode 100644 index 00000000..9b6159f0 --- /dev/null +++ b/specs/kubernetes/copy_from_pod_to_local.yaml @@ -0,0 +1,28 @@ +--- +name: Copy files or directories from containers to local. +command: > + kubectl cp {{namespace}}/{{pod}}:{{pod_file_path}} {{local_file_path}} +tags: + - kubernetes +description: 'Copy file or directories from a container to local filesystem.' +arguments: + - name: namespace + description: Namespace the pod resides in. + default_value: default + + - name: pod + description: Name of pod. + default_value: ~ + + - name: pod_file_path + description: Source path of the file or directory in the container. + default_value: ~ + + - name: local_file_path + description: Destination path of the file or directory in local filesystem. + default_value: ~ + +source_url: "https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cp/" +author: Abdullahxz +author_url: "https://github.com/Abdullahxz" +shells: [] From 7ace551d61170269ab8d35f682d43aeaa25e3179 Mon Sep 17 00:00:00 2001 From: Abdullah <55325434+Abdullahxz@users.noreply.github.com> Date: Fri, 7 Jun 2024 12:58:58 +0500 Subject: [PATCH 2/2] feat: added workflow to cp from local to pod --- specs/kubernetes/copy_from_local_to_pod.yaml | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 specs/kubernetes/copy_from_local_to_pod.yaml diff --git a/specs/kubernetes/copy_from_local_to_pod.yaml b/specs/kubernetes/copy_from_local_to_pod.yaml new file mode 100644 index 00000000..829b8564 --- /dev/null +++ b/specs/kubernetes/copy_from_local_to_pod.yaml @@ -0,0 +1,28 @@ +--- +name: Copy files or directories from local to container. +command: > + kubectl cp {{local_file_path}} {{namespace}}/{{pod}}:{{pod_file_path}} +tags: + - kubernetes +description: 'Copy file or directories from local filesystem to a container.' +arguments: + - name: local_file_path + description: Source path of the file or directory in local filesystem. + default_value: ~ + + - name: namespace + description: Namespace the pod resides in. + default_value: default + + - name: pod + description: Name of pod. + default_value: ~ + + - name: pod_file_path + description: Destination path of the file or directory in the container. + default_value: ~ + +source_url: "https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cp/" +author: Abdullahxz +author_url: "https://github.com/Abdullahxz" +shells: []