name: Pod Life Cycle
services:
  lifecycle-pod:
    name: lifecycle-pod
    type: Pod
    apiVersion: v1
    namespace: default
    model: kubernetes
    settings:
      spec:
        containers:
        - image: nginx
          lifecycle:
            post Start:
              exec:
                command:
                - /bin/sh
                - -c
                - echo Hello from the postStart handler > /usr/share/message
            pre Stop:
              exec:
                command:
                - /bin/sh
                - -c
                - nginx -s quit; while killall -0 nginx; do sleep 1; done
          name: lifecycle-container
    traits:
      meshmap:
        edges: []
        id: 3f237690-0009-4b32-bdd7-8de4d87c5912
        meshmodel-metadata:
          capabilities: ""
          genealogy: ""
          isAnnotation: false
          isCustomResource: false
          isModelAnnotation: "FALSE"
          isNamespaced: true
          logoURL: https://github.com/cncf/artwork/blob/master/projects/kubernetes/icon/white/kubernetes-icon-white.svg
          model: kubernetes
          modelDisplayName: Kubernetes
          primaryColor: '#326CE5'
          published: true
          secondaryColor: '#7aa1f0'
          shape: round-rectangle
          styleOverrides: ""
          subCategory: Scheduling & Orchestration
          svgColor: ui/public/static/img/meshmodels/kubernetes/color/kubernetes-color.svg
          svgComplete: ""
          svgWhite: ui/public/static/img/meshmodels/kubernetes/white/kubernetes-white.svg
        position:
          posX: 170
          posY: 170
        whiteboardData:
          style:
            z-index: 3
