apiVersion: apps/v1
kind: Deployment
metadata:
  name: xray-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: xray-operator
  template:
    metadata:
      labels:
        name: xray-operator
    spec:
      serviceAccountName: xray-operator
      containers:
        - name: xray-operator
          image: registry.connect.redhat.com/jfrog/xray-operator
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "xray-operator"
            - name: RELATED_IMAGE_XRAY_SERVER_IMAGE_REPOSITORY
              value: "registry.connect.redhat.com/jfrog/xray-server"
            - name: RELATED_IMAGE_XRAY_ANALYSIS_IMAGE_REPOSITORY
              value: "registry.connect.redhat.com/jfrog/xray-analysis"
            - name: RELATED_IMAGE_XRAY_PERSIST_IMAGE_REPOSITORY
              value: "registry.connect.redhat.com/jfrog/xray-persist"
            - name: RELATED_IMAGE_XRAY_INDEXER_IMAGE_REPOSITORY
              value: "registry.connect.redhat.com/jfrog/xray-indexer"
            - name: RELATED_IMAGE_XRAY_ROUTER_IMAGE_REPOSITORY
              value: "registry.connect.redhat.com/jfrog/xray-router"
            - name: RELATED_IMAGE_XRAY_RABBITMQ_IMAGE_REPOSITORY
              value: "registry.connect.redhat.com/jfrog/xray-rabbitmq"