# Copyright (c) 2020 Swisscom Blockchain AG
# Licensed under MIT License
apiVersion: apps/v1
kind: Deployment
metadata:
  name: polkadot-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: polkadot-operator
  template:
    metadata:
      labels:
        name: polkadot-operator
    spec:
      serviceAccountName: polkadot-operator
      containers:
        - name: polkadot-operator
          image: ironoa/customresource-operator:v0.0.9 #define your favourite
          command:
          - polkadot-k8s-operator
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "polkadot-operator"
            - name: CONTROLLER_NAME
              value: "polkadot-controller"
            - name: IMAGE_CLIENT
              value: "parity/polkadot"
            - name: METRICS_PORT
              value: "9615"
            - name: P2P_PORT
              value: "30333"
            - name: RPC_PORT
              value: "9933"
            - name: WS_PORT
              value: "9944"