apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: test-http
  labels: {test: http}
spec:
  selector:
    matchLabels: {test: http}
  template:
    metadata:
      labels: {test: http}
    spec:
      containers:
      - image: curlimages/curl@sha256:fa32ef426092b88ee0b569d6f81ab0203ee527692a94ec2e6ceb2fd0b6b2755c
        name: https-test-eksctl
        command:
        - sleep
        - "3600"
        stdin: true
        tty: true
        readinessProbe:
          initialDelaySeconds: 0
          periodSeconds: 3
          failureThreshold: 3
          timeoutSeconds: 1
          exec:
            command:
            - curl
            - --fail
            - --silent
            - --head
            - eksctl.io
      - image: curlimages/curl@sha256:fa32ef426092b88ee0b569d6f81ab0203ee527692a94ec2e6ceb2fd0b6b2755c
        name: https-test-kubernetes
        command:
        - sleep
        - "3600"
        stdin: true
        tty: true
        readinessProbe:
          initialDelaySeconds: 0
          periodSeconds: 3
          failureThreshold: 3
          timeoutSeconds: 1
          exec:
            command:
            - curl
            - --fail
            - --silent
            - --head
            - kubernetes.io
      - image: curlimages/curl@sha256:fa32ef426092b88ee0b569d6f81ab0203ee527692a94ec2e6ceb2fd0b6b2755c
        name: https-test-metadata
        command:
        - sleep
        - "3600"
        stdin: true
        tty: true
        readinessProbe:
          initialDelaySeconds: 0
          periodSeconds: 3
          failureThreshold: 3
          timeoutSeconds: 1
          exec:
            command:
              - /bin/sh
              - -c
              - |-
                TOKEN=$(curl --fail --silent -X PUT -H "X-aws-ec2-metadata-token-ttl-seconds: 300" "http://169.254.169.254/latest/api/token");
                curl --fail --silent -H "X-aws-ec2-metadata-token: $TOKEN" "http://169.254.169.254/latest/meta-data/local-ipv4";
