Skip to content

Instantly share code, notes, and snippets.

@pritidesai
Last active June 16, 2020 06:20
Show Gist options
  • Save pritidesai/8dc21d25f19f91231484c41cbc46ada7 to your computer and use it in GitHub Desktop.
Save pritidesai/8dc21d25f19f91231484c41cbc46ada7 to your computer and use it in GitHub Desktop.
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: pipeline-with-pipeline-with-task-to-echo-good-morning
spec:
tasks:
- name: echo-good-morning
metadata:
labels:
custom1: value1
custom2: value2
custom3: value3
annotations:
acustom1: value1
acustom2: value2
taskSpec:
steps:
- name: echo
image: ubuntu
script: |
#!/usr/bin/env bash
echo "Good Morning!"
---
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: pipelinerun-with-pipeline-with-task-to-echo-good-morning
spec:
pipelineRef:
name: pipeline-with-pipeline-with-task-to-echo-good-morning
@pritidesai
Copy link
Author

kubectl get pods -o json
{
    "apiVersion": "v1",
    "items": [
        {
            "apiVersion": "v1",
            "kind": "Pod",
            "metadata": {
                "annotations": {
                    "acustom1": "value1",
                    "acustom2": "value2",
                    "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"tekton.dev/v1beta1\",\"kind\":\"Pipeline\",\"metadata\":{\"annotations\":{},\"name\":\"pipeline-with-pipeline-with-task-to-echo-good-morning\",\"namespace\":\"default\"},\"spec\":{\"tasks\":[{\"metadata\":{\"annotations\":{\"acustom1\":\"value1\",\"acustom2\":\"value2\"},\"labels\":{\"custom1\":\"value1\",\"custom2\":\"value2\",\"custom3\":\"value3\"}},\"name\":\"echo-good-morning\",\"taskSpec\":{\"steps\":[{\"image\":\"ubuntu\",\"name\":\"echo\",\"script\":\"#!/usr/bin/env bash\\necho \\\"Good Morning!\\\"  \\n\"}]}}]}}\n",
                    "pipeline.tekton.dev/release": "devel",
                    "tekton.dev/ready": "READY"
                },
                "creationTimestamp": "2020-06-16T06:17:44Z",
                "labels": {
                    "app.kubernetes.io/managed-by": "tekton-pipelines",
                    "custom1": "value1",
                    "custom2": "value2",
                    "custom3": "value3",
                    "tekton.dev/pipeline": "pipeline-with-pipeline-with-task-to-echo-good-morning",
                    "tekton.dev/pipelineRun": "pipelinerun-with-pipeline-with-task-to-echo-good-morning",
                    "tekton.dev/pipelineTask": "echo-good-morning",
                    "tekton.dev/taskRun": "pipelinerun-with-pipeline-with-task-to-echo-good-morning--8wshf"
                },
                "name": "pipelinerun-with-pipeline-with-task-to-echo-good-morning--8jqpx",
                "namespace": "default",
                "ownerReferences": [
                    {
                        "apiVersion": "tekton.dev/v1beta1",
                        "blockOwnerDeletion": true,
                        "controller": true,
                        "kind": "TaskRun",
                        "name": "pipelinerun-with-pipeline-with-task-to-echo-good-morning--8wshf",
                        "uid": "08e3707d-7c54-44df-a8d9-ebb83c0ee38d"
                    }
                ],
                "resourceVersion": "4478247",
                "selfLink": "/api/v1/namespaces/default/pods/pipelinerun-with-pipeline-with-task-to-echo-good-morning--8jqpx",
                "uid": "c273e672-63af-4aaf-8d5f-36726a87526d"
            },
            "spec": {
                "containers": [
                    {
                        "args": [
                            "-wait_file",
                            "/tekton/downward/ready",
                            "-wait_file_content",
                            "-post_file",
                            "/tekton/tools/0",
                            "-termination_path",
                            "/tekton/termination",
                            "-entrypoint",
                            "/tekton/scripts/script-0-2xdll",
                            "--"
                        ],
                        "command": [
                            "/tekton/tools/entrypoint"
                        ],
                        "env": [
                            {
                                "name": "HOME",
                                "value": "/tekton/home"
                            }
                        ],
                        "image": "ubuntu",
                        "imagePullPolicy": "Always",
                        "name": "step-echo",
                        "resources": {
                            "requests": {
                                "cpu": "0",
                                "ephemeral-storage": "0",
                                "memory": "0"
                            }
                        },
                        "terminationMessagePath": "/tekton/termination",
                        "terminationMessagePolicy": "File",
                        "volumeMounts": [
                            {
                                "mountPath": "/tekton/scripts",
                                "name": "tekton-internal-scripts"
                            },
                            {
                                "mountPath": "/tekton/tools",
                                "name": "tekton-internal-tools"
                            },
                            {
                                "mountPath": "/tekton/downward",
                                "name": "tekton-internal-downward"
                            },
                            {
                                "mountPath": "/workspace",
                                "name": "tekton-internal-workspace"
                            },
                            {
                                "mountPath": "/tekton/home",
                                "name": "tekton-internal-home"
                            },
                            {
                                "mountPath": "/tekton/results",
                                "name": "tekton-internal-results"
                            },
                            {
                                "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
                                "name": "default-token-8bljx",
                                "readOnly": true
                            }
                        ],
                        "workingDir": "/workspace"
                    }
                ],
                "dnsPolicy": "ClusterFirst",
                "enableServiceLinks": true,
                "initContainers": [
                    {
                        "args": [
                            "-c",
                            "tmpfile=\"/tekton/scripts/script-0-2xdll\"\ntouch ${tmpfile} \u0026\u0026 chmod +x ${tmpfile}\ncat \u003e ${tmpfile} \u003c\u003c 'script-heredoc-randomly-generated-v82g2'\n#!/usr/bin/env bash\necho \"Good Morning!\"  \n\nscript-heredoc-randomly-generated-v82g2\n"
                        ],
                        "command": [
                            "sh"
                        ],
                        "image": "gcr.io/distroless/base@sha256:f79e093f9ba639c957ee857b1ad57ae5046c328998bf8f72b30081db4d8edbe4",
                        "imagePullPolicy": "IfNotPresent",
                        "name": "place-scripts",
                        "resources": {},
                        "terminationMessagePath": "/dev/termination-log",
                        "terminationMessagePolicy": "File",
                        "tty": true,
                        "volumeMounts": [
                            {
                                "mountPath": "/tekton/scripts",
                                "name": "tekton-internal-scripts"
                            },
                            {
                                "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
                                "name": "default-token-8bljx",
                                "readOnly": true
                            }
                        ]
                    },
                    {
                        "command": [
                            "cp",
                            "/ko-app/entrypoint",
                            "/tekton/tools/entrypoint"
                        ],
                        "image": "docker.io/pritidesai/entrypoint-bff0a22da108bc2f16c818c97641a296@sha256:e49160cefabc65071bf0ff6fb1ec958d5afc0efe3c58c2f5b78b4496ee575c5e",
                        "imagePullPolicy": "IfNotPresent",
                        "name": "place-tools",
                        "resources": {},
                        "terminationMessagePath": "/dev/termination-log",
                        "terminationMessagePolicy": "File",
                        "volumeMounts": [
                            {
                                "mountPath": "/tekton/tools",
                                "name": "tekton-internal-tools"
                            },
                            {
                                "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
                                "name": "default-token-8bljx",
                                "readOnly": true
                            }
                        ]
                    }
                ],
                "nodeName": "docker-desktop",
                "priority": 0,
                "restartPolicy": "Never",
                "schedulerName": "default-scheduler",
                "securityContext": {},
                "serviceAccount": "default",
                "serviceAccountName": "default",
                "terminationGracePeriodSeconds": 30,
                "tolerations": [
                    {
                        "effect": "NoExecute",
                        "key": "node.kubernetes.io/not-ready",
                        "operator": "Exists",
                        "tolerationSeconds": 300
                    },
                    {
                        "effect": "NoExecute",
                        "key": "node.kubernetes.io/unreachable",
                        "operator": "Exists",
                        "tolerationSeconds": 300
                    }
                ],
                "volumes": [
                    {
                        "emptyDir": {},
                        "name": "tekton-internal-workspace"
                    },
                    {
                        "emptyDir": {},
                        "name": "tekton-internal-home"
                    },
                    {
                        "emptyDir": {},
                        "name": "tekton-internal-results"
                    },
                    {
                        "emptyDir": {},
                        "name": "tekton-internal-scripts"
                    },
                    {
                        "emptyDir": {},
                        "name": "tekton-internal-tools"
                    },
                    {
                        "downwardAPI": {
                            "defaultMode": 420,
                            "items": [
                                {
                                    "fieldRef": {
                                        "apiVersion": "v1",
                                        "fieldPath": "metadata.annotations['tekton.dev/ready']"
                                    },
                                    "path": "ready"
                                }
                            ]
                        },
                        "name": "tekton-internal-downward"
                    },
                    {
                        "name": "default-token-8bljx",
                        "secret": {
                            "defaultMode": 420,
                            "secretName": "default-token-8bljx"
                        }
                    }
                ]
            },
            "status": {
                "conditions": [
                    {
                        "lastProbeTime": null,
                        "lastTransitionTime": "2020-06-16T06:17:50Z",
                        "reason": "PodCompleted",
                        "status": "True",
                        "type": "Initialized"
                    },
                    {
                        "lastProbeTime": null,
                        "lastTransitionTime": "2020-06-16T06:17:53Z",
                        "reason": "PodCompleted",
                        "status": "False",
                        "type": "Ready"
                    },
                    {
                        "lastProbeTime": null,
                        "lastTransitionTime": "2020-06-16T06:17:53Z",
                        "reason": "PodCompleted",
                        "status": "False",
                        "type": "ContainersReady"
                    },
                    {
                        "lastProbeTime": null,
                        "lastTransitionTime": "2020-06-16T06:17:44Z",
                        "status": "True",
                        "type": "PodScheduled"
                    }
                ],
                "containerStatuses": [
                    {
                        "containerID": "docker://7580313e72140f98f9171bfb519ad0db900007443c4db0aa3029f67cb39843b4",
                        "image": "ubuntu:latest",
                        "imageID": "docker-pullable://ubuntu@sha256:747d2dbbaaee995098c9792d99bd333c6783ce56150d1b11e333bbceed5c54d7",
                        "lastState": {},
                        "name": "step-echo",
                        "ready": false,
                        "restartCount": 0,
                        "state": {
                            "terminated": {
                                "containerID": "docker://7580313e72140f98f9171bfb519ad0db900007443c4db0aa3029f67cb39843b4",
                                "exitCode": 0,
                                "finishedAt": "2020-06-16T06:17:53Z",
                                "message": "[{\"key\":\"StartedAt\",\"value\":\"2020-06-16T06:17:53.099Z\",\"resourceRef\":{}}]",
                                "reason": "Completed",
                                "startedAt": "2020-06-16T06:17:52Z"
                            }
                        }
                    }
                ],
                "hostIP": "192.168.65.3",
                "initContainerStatuses": [
                    {
                        "containerID": "docker://c32efb2b3a4907c43d2f3c85d4a9486adf168d3011cd52715185c1ca52f5198e",
                        "image": "sha256:4a6f2dfa03471bdef939c3946c8f657a0c7dc69a1d0fe7042c8af8084762dde0",
                        "imageID": "docker-pullable://gcr.io/distroless/base@sha256:f79e093f9ba639c957ee857b1ad57ae5046c328998bf8f72b30081db4d8edbe4",
                        "lastState": {},
                        "name": "place-scripts",
                        "ready": true,
                        "restartCount": 0,
                        "state": {
                            "terminated": {
                                "containerID": "docker://c32efb2b3a4907c43d2f3c85d4a9486adf168d3011cd52715185c1ca52f5198e",
                                "exitCode": 0,
                                "finishedAt": "2020-06-16T06:17:45Z",
                                "reason": "Completed",
                                "startedAt": "2020-06-16T06:17:45Z"
                            }
                        }
                    },
                    {
                        "containerID": "docker://272aedf31e18c4c0ecb2a25d448055c59528389d02a006164c5f36d6458b8f22",
                        "image": "pritidesai/entrypoint-bff0a22da108bc2f16c818c97641a296@sha256:e49160cefabc65071bf0ff6fb1ec958d5afc0efe3c58c2f5b78b4496ee575c5e",
                        "imageID": "docker-pullable://pritidesai/entrypoint-bff0a22da108bc2f16c818c97641a296@sha256:e49160cefabc65071bf0ff6fb1ec958d5afc0efe3c58c2f5b78b4496ee575c5e",
                        "lastState": {},
                        "name": "place-tools",
                        "ready": true,
                        "restartCount": 0,
                        "state": {
                            "terminated": {
                                "containerID": "docker://272aedf31e18c4c0ecb2a25d448055c59528389d02a006164c5f36d6458b8f22",
                                "exitCode": 0,
                                "finishedAt": "2020-06-16T06:17:50Z",
                                "reason": "Completed",
                                "startedAt": "2020-06-16T06:17:50Z"
                            }
                        }
                    }
                ],
                "phase": "Succeeded",
                "podIP": "10.1.38.107",
                "qosClass": "BestEffort",
                "startTime": "2020-06-16T06:17:44Z"
            }
        }
    ],
    "kind": "List",
    "metadata": {
        "resourceVersion": "",
        "selfLink": ""
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment