
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: pipelines-hello-aro
  name: pipelines-hello-aro
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pipelines-hello-aro
  template:
    metadata:
      labels:
        app: pipelines-hello-aro
    spec:
      containers:
        - image: image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/hello-aro:latest
          imagePullPolicy: Always
          name: pipelines-hello-aro
          resources:
            limits:
              memory: "100Mi"
              cpu: "1"
            requests:
              memory: "50Mi"
              cpu: "0.25"
          ports:
            - containerPort: 8080
              protocol: TCP
            - containerPort: 9090
              protocol: TCP
          env:
            - name: "OPENSHIFT_NODEJS_IP"
              value: "127.0.0.1"
            - name: "OPENSHIFT_NODEJS_HOST"
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name    
            - name: "OPENSHIFT_NODEJS_PORT"
              value: "8080"