input: Write a function to validate a Kubernetes pod YAML configuration that publishes a tweet every 5 minutes. The function should return True if the configuration is valid and False otherwise. The YAML should include a Pod definition with a container that has a command to execute a tweet publishing script every 5 minutes and a ConfigMap with the crontab data.
  assert validate_pod_yaml("""apiVersion: v1
  kind: Pod
  metadata:
    name: tweet-publisher
  spec:
    containers:
      - name: tweet-publisher
        image: <INSERT_PUBLIC_PULLABLE_IMAGE_PATH_HERE>
        command:
          - sh
          - -c
          - 'crontab -lcrontab && while true; do python publish-tweet.py && crontab -l | { cat; echo "*/5 * * * * python publish-tweet.py"; } | crontab -; sleep 31622400; done'
  """)==False
  assert validate_pod_yaml("""apiVersion: v1
  kind: Pod
  metadata:
    name: tweet-publisher
  spec:
    containers:
      - name: tweet-publisher
        image: <INSERT_PUBLIC_PULLABLE_IMAGE_PATH_HERE>
        command:
          - sh
          - -c
          - 'crontab -lcrontab && while true; do python publish-tweet.py && crontab -l | { cat; echo "*/5 * * * * python publish-tweet.py"; } | crontab -; sleep 31622400; done'
        volumeMounts:
          - mountPath: /crontab/crontab
            subPath: crontab
            name: cronmount
    volumes:
      - name: cronmount
        configMap:
          name: tweet-cron
  ---
  apiVersion: v1
  kind: ConfigMap
  metadata:
    name: tweet-cron
  data:
    crontab: "* * * * * python publish-tweet.py"
  """)==True
output: 
  def validate_pod_yaml(yaml_str):
      import yaml
      try:
          data = yaml.safe_load_all(yaml_str)
          pod_data = next(data)
          configmap_data = next(data, None)
          
          if pod_data.get('kind') != 'Pod':
              return False
          
          containers = pod_data.get('spec', {}).get('containers', [])
          if not containers:
              return False
          
          container = containers[0]
          command = container.get('command', [])
          if not command or command[0] != 'sh' or command[1] != '-c':
              return False
          
          crontab_command = "crontab -l | { cat; echo \"*/5 * * * * python publish-tweet.py\"; } | crontab -"
          if crontab_command not in command[2]:
              return False
          
          volumes = pod_data.get('spec', {}).get('volumes', [])
          if not volumes or volumes[0].get('name') != 'cronmount':
              return False
          
          if configmap_data is None or configmap_data.get('kind') != 'ConfigMap':
              return False
          
          configmap_name = configmap_data.get('metadata', {}).get('name')
          if configmap_name != 'tweet-cron':
              return False
          
          crontab_data = configmap_data.get('data', {}).get('crontab')
          if crontab_data != "* * * * * python publish-tweet.py":
              return False
          
          return True
      except:
          return False
  