apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: app-kubia
  labels:
    app: kubia
    tier: app
spec:
  replicas: 5
  selector:
    matchLabels:
      tier: app
  template:
    metadata:
      labels:
        tier: app
    spec:
      containers:
        - name: diguage-kubia
          image: diguage/kubia
          ports:
            - containerPort: 8080
              protocol: TCP
          env:
            - name: RETRY_CONFIG_COUNT
              valueFrom:
                configMapKeyRef:
                  name: retry-config
                  key: retry-count
            - name: RETRY_CONFIG_TIMEOUT
              valueFrom:
                configMapKeyRef:
                  name: retry-config
                  key: timeout
          volumeMounts:
            - name: retry-config
              mountPath: /retry-config.conf
              readOnly: true
      volumes:
        - name: retry-config
          configMap:
            name: retry-config
