There should be a way to revisit kanister phase's pods #1226
Replies: 4 comments 2 replies
-
I was able to use the action set apiVersion: cr.kanister.io/v1alpha1
kind: Blueprint
metadata:
name: backup
namespace: kanister
actions:
debug:
phases:
- func: KubeTask
name: debug-task
args:
namespace: "{{ .Deployment.Namespace }}"
image: busybox
command:
- sh
- "-c"
- |
echo "test debug task"
exit 1
---
apiVersion: cr.kanister.io/v1alpha1
kind: ActionSet
metadata:
generateName: time-logger-debug-
namespace: kanister
spec:
actions:
- name: debug
blueprint: backup
object:
kind: Deployment
name: time-logger
namespace: default
podOverride:
restartPolicy: Always $ k get po
NAME READY STATUS RESTARTS AGE
kanister-job-vvc6c 0/1 CrashLoopBackOff 5 (29s ago) 3m32s |
Beta Was this translation helpful? Give feedback.
-
Per discussion with @pavannd1 and @viveksinghggits, first, we need a way to stream the command output back to the task/job pod asynchronously, and then decide on where to drain the output to, in order to retain them after task/job pod is terminated. One approach is to append the output to the actionset that triggers the operation. Ongoing PRs: |
Beta Was this translation helpful? Give feedback.
-
I think I was able to use phases:
- name: describeSnapshots
func: KubeTask
args:
namespace: "{{ .StatefulSet.Namespace }}"
image: ghcr.io/kanisterio/postgres-kanister-tools:0.78.0
command:
- sh
- -c
- |
logs=$(aws ec2 describe-snapshots --owner-ids self --filters Name=volume-id,Values={{ .ArtifactsIn.EBS.KeyValue.VolumeID }} --output=json 2>&1)
kando output snapshotList "$logs" That attached the log outputs to the actionset. |
Beta Was this translation helpful? Give feedback.
-
Maybe all we need to do is just make sure |
Beta Was this translation helpful? Give feedback.
-
In the cases where we run a new pod as part of kanister phase, for example kubetask, and the pod was terminated we don't have a way to see the logs of that pod.
In the cases where the failure is in the kubetask pod, debugging becomes a problem because we don't have a way to access the things that have been logged into the kubetask pod.
Beta Was this translation helpful? Give feedback.
All reactions