apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: StatefulSet
metadata:
  name: open5gs-pcrf-deployment
  namespace: open5gs
  labels:
    epc-mode: pcrf
spec:
  replicas: 1
  serviceName: "open5gs-pcrf-svc-pool"
  selector:
    matchLabels:
      epc-mode: pcrf
  template:
    metadata:
      labels:
        epc-mode: pcrf
    spec:
      containers:
        - name: pcrf
          image: fjvicens/open5gs-base:v0.1
          imagePullPolicy: Always
          command: ["open5gs-pcrfd", "-c", "/open5gs/config-map/pcrf.yaml"]
          volumeMounts:
          - name: open5gs-pcrf-config
            mountPath: /open5gs/config-map/pcrf.yaml
            subPath: "pcrf.yaml"
          - name: open5gs-pcrf-diameter
            mountPath: /open5gs/config-map/diameter-pcrf.conf
            subPath: "diameter-pcrf.conf"            
      volumes:
        - name: open5gs-pcrf-config
          configMap:
            name: open5gs-pcrf-config
        - name: open5gs-pcrf-diameter
          configMap:
            name: open5gs-pcrf-diameter
