apiVersion: apps/v1
kind: Deployment
metadata:
  name: appteam01-netshoot #{APP_TEAM}-{APP}
  labels:
    app: appteam01-netshoot
    org: denteam
spec:
  replicas: 1
  selector:
    matchLabels:
      app: appteam01-netshoot
  template:
    metadata:
      labels:
        app: appteam01-netshoot
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: app
                    operator: In
                    values:
                      - appteam01-netshoot
              topologyKey: "kubernetes.io/hostname"
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 100
              podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: app
                      operator: In
                      values:
                        - appteam01-netshoot
                topologyKey: failure-domain.ford.com/zone
      serviceAccountName: default
      dnsPolicy: ClusterFirst
      imagePullSecrets:
        - name:  denteam-image-repo-secret #{APPTEAM}-
      containers:
        - name: appteam01-netshoot
#          image: registry.ford.com/den-org/kubetool:0.0.1-build-2-gef0de0c
#          image: registry.redhat.io/rhel8/support-tools
          image: registry.ford.com/den-org/netshoot:latest
          imagePullPolicy: Always
          stdin: true
          tty: true
          env:
            #- name: TLS_CERT
            #  value: /etc/tls/tls.crt
            #- name: TLS_KEY
            #  value: /etc/tls/tls.key
            - name: TCP_PORT
              value: "8080"
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: SERVICE_ACCOUNT
              valueFrom:
                fieldRef:
                  fieldPath: spec.serviceAccountName
          resources:
            requests:
              memory: "2Gi"
              cpu: "1000m"
            limits:
              memory: "4Gi"
              cpu: "2000m"

