apiVersion: apps/v1
kind: Deployment
metadata:
  name: tpcc-main
  labels:
    app: tpcc-main 
    trace_agent_type: jaeger
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tpcc-main 
  template:
    metadata:
      labels:
        app: tpcc-main 
        trace_agent_type: jaeger
    spec:
      containers:
      - name: tpcc-main 
        image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-main:R30020210216
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 30080
        env:
          - name: CLST_ID
            value: {{ .Values.global.CLUSTER_ID }}
          - name: NODE_ID
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: POD_ID
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: JAEGER_SERVICE_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.labels['app']
          - name: JAEGER_AGENT_HOST
            value: cloudmoa-trace-agent.{{ .Values.global.AGENT_NAMESPACE }}
          - name: JAEGER_AGENT_PORT
            value: "6831"
          - name: JAEGER_TAGS
            value: xm_clst_id=$(CLST_ID),xm_node_id=$(NODE_ID),xm_namespace=$(NAMESPACE),xm_pod_id=$(POD_ID)
        envFrom:
          - configMapRef:
               name: tpcc-config
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tpcc-neworder
  labels:
    app: tpcc-neworder
    trace_agent_type: jaeger
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tpcc-neworder
  template:
    metadata:
      labels:
        app: tpcc-neworder
        trace_agent_type: jaeger
    spec:
      containers:
      - name: tpcc-neworder
        image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-neworder:R30020210216
        #image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-neworder:latest
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 30081
        env:
          - name: CLST_ID
            value: {{ .Values.global.CLUSTER_ID }}
          - name: NODE_ID
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: POD_ID
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: JAEGER_SERVICE_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.labels['app']
          - name: JAEGER_AGENT_HOST
            value: cloudmoa-trace-agent.{{ .Values.global.AGENT_NAMESPACE }}
          - name: JAEGER_AGENT_PORT
            value: "6831"
          - name: JAEGER_TAGS
            value: xm_clst_id=$(CLST_ID),xm_node_id=$(NODE_ID),xm_namespace=$(NAMESPACE),xm_pod_id=$(POD_ID)        
        envFrom:
          - configMapRef:
              name: tpcc-config
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tpcc-delivery
  labels:
    app: tpcc-delivery
    trace_agent_type: jaeger
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tpcc-delivery
  template:
    metadata:
      labels:
        app: tpcc-delivery
        trace_agent_type: jaeger
    spec:
      containers:
      - name: tpcc-delivery
        image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-delivery:R30020210216
        #image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-delivery:latest
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 30083
        env:
          - name: CLST_ID
            value: {{ .Values.global.CLUSTER_ID }}
          - name: NODE_ID
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: POD_ID
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: JAEGER_SERVICE_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.labels['app']
          - name: JAEGER_AGENT_HOST
            value: cloudmoa-trace-agent.{{ .Values.global.AGENT_NAMESPACE }}
          - name: JAEGER_AGENT_PORT
            value: "6831"
          - name: JAEGER_TAGS
            value: xm_clst_id=$(CLST_ID),xm_node_id=$(NODE_ID),xm_namespace=$(NAMESPACE),xm_pod_id=$(POD_ID)
        envFrom:
          - configMapRef:
              name: tpcc-config
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tpcc-orderstatus
  labels:
    app: tpcc-orderstatus
    trace_agent_type: jaeger
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tpcc-orderstatus
  template:
    metadata:
      labels:
        app: tpcc-orderstatus
        trace_agent_type: jaeger
    spec:
      containers:
      - name: tpcc-orderstatus
        image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-orderstatus:R30020210216
        #image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-orderstatus:latest
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 30084
        env:
          - name: CLST_ID
            value: {{ .Values.global.CLUSTER_ID }}
          - name: NODE_ID
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: POD_ID
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: JAEGER_SERVICE_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.labels['app']
          - name: JAEGER_AGENT_HOST
            value: cloudmoa-trace-agent.{{ .Values.global.AGENT_NAMESPACE }}
          - name: JAEGER_AGENT_PORT
            value: "6831"
          - name: JAEGER_TAGS
            value: xm_clst_id=$(CLST_ID),xm_node_id=$(NODE_ID),xm_namespace=$(NAMESPACE),xm_pod_id=$(POD_ID)
        envFrom:
          - configMapRef:
              name: tpcc-config
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tpcc-payment
  labels:
    app: tpcc-payment
    trace_agent_type: jaeger
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tpcc-payment
  template:
    metadata:
      labels:
        app: tpcc-payment
        trace_agent_type: jaeger
    spec:
      containers:
      - name: tpcc-payment
        image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-payment:R30020210216
        #image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-payment:latest
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 30082
        env:
          - name: CLST_ID
            value: {{ .Values.global.CLUSTER_ID }}
          - name: NODE_ID
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: POD_ID
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: JAEGER_SERVICE_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.labels['app']
          - name: JAEGER_AGENT_HOST
            value: cloudmoa-trace-agent.{{ .Values.global.AGENT_NAMESPACE }}
          - name: JAEGER_AGENT_PORT
            value: "6831"
          - name: JAEGER_TAGS
            value: xm_clst_id=$(CLST_ID),xm_node_id=$(NODE_ID),xm_namespace=$(NAMESPACE),xm_pod_id=$(POD_ID)
        envFrom:
          - configMapRef:
              name: tpcc-config
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tpcc-stocklevel
  labels:
    app: tpcc-stocklevel
    trace_agent_type: jaeger
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tpcc-stocklevel
  template:
    metadata:
      labels:
        app: tpcc-stocklevel
        trace_agent_type: jaeger
    spec:
      containers:
      - name: tpcc-stocklevel
        image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-stocklevel:R30020210216
        #image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-stocklevel:latest
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 30085
        env:
          - name: CLST_ID
            value: {{ .Values.global.CLUSTER_ID }}
          - name: NODE_ID
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: POD_ID
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: JAEGER_SERVICE_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.labels['app']
          - name: JAEGER_AGENT_HOST
            value: cloudmoa-trace-agent.{{ .Values.global.AGENT_NAMESPACE }}
          - name: JAEGER_AGENT_PORT
            value: "6831"
          - name: JAEGER_TAGS
            value: xm_clst_id=$(CLST_ID),xm_node_id=$(NODE_ID),xm_namespace=$(NAMESPACE),xm_pod_id=$(POD_ID)
        envFrom:
          - configMapRef:
              name: tpcc-config
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tpcc-sendmail
  labels:
    app: tpcc-sendmail
    trace_agent_type: jaeger
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tpcc-sendmail
  template:
    metadata:
      labels:
        app: tpcc-sendmail
        trace_agent_type: jaeger
    spec:
      containers:
      - name: tpcc-sendmail
        image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-sendmail:R30020210216
        #image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-sendmail:latest
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 30086
        env:
          - name: CLST_ID
            value: {{ .Values.global.CLUSTER_ID }}
          - name: NODE_ID
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: POD_ID
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: JAEGER_SERVICE_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.labels['app']
          - name: JAEGER_AGENT_HOST
            value: cloudmoa-trace-agent.{{ .Values.global.AGENT_NAMESPACE }}
          - name: JAEGER_AGENT_PORT
            value: "6831"
          - name: JAEGER_TAGS
            value: xm_clst_id=$(CLST_ID),xm_node_id=$(NODE_ID),xm_namespace=$(NAMESPACE),xm_pod_id=$(POD_ID)
        envFrom:
          - configMapRef:
              name: tpcc-config
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tpcc-user
  labels:
    app: tpcc-user
    trace_agent_type: jaeger
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tpcc-user
  template:
    metadata:
      labels:
        app: tpcc-user
        trace_agent_type: jaeger
    spec:
      containers:
      - name: tpcc-user
        image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-user:R30020210216
        #image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-user:latest
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 30087
        env:
          - name: CLST_ID
            value: {{ .Values.global.CLUSTER_ID }}
          - name: NODE_ID
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: POD_ID
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: JAEGER_SERVICE_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.labels['app']
          - name: JAEGER_AGENT_HOST
            value: cloudmoa-trace-agent.{{ .Values.global.AGENT_NAMESPACE }}
          - name: JAEGER_AGENT_PORT
            value: "6831"
          - name: JAEGER_TAGS
            value: xm_clst_id=$(CLST_ID),xm_node_id=$(NODE_ID),xm_namespace=$(NAMESPACE),xm_pod_id=$(POD_ID)
        envFrom:
          - configMapRef:
              name: tpcc-config
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tpcc-shipping
  labels:
    app: tpcc-shipping
    trace_agent_type: jaeger
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tpcc-shipping
  template:
    metadata:
      labels:
        app: tpcc-shipping
        trace_agent_type: jaeger
    spec:
      containers:
      - name: tpcc-shipping
        image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-shipping:R30020210216
        #image: {{ .Values.global.IMXC_IN_REGISTRY }}/tpcc-shipping:latest
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 30088
        env:
          - name: CLST_ID
            value: {{ .Values.global.CLUSTER_ID }}
          - name: NODE_ID
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: POD_ID
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: JAEGER_SERVICE_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.labels['app']
          - name: JAEGER_AGENT_HOST
            value: cloudmoa-trace-agent.{{ .Values.global.AGENT_NAMESPACE }}
          - name: JAEGER_AGENT_PORT
            value: "6831"
          - name: JAEGER_TAGS
            value: xm_clst_id=$(CLST_ID),xm_node_id=$(NODE_ID),xm_namespace=$(NAMESPACE),xm_pod_id=$(POD_ID)
        envFrom:
          - configMapRef:
              name: tpcc-config
---
