apiVersion: apps/v1
kind: Deployment
metadata:
  name: league-ranking
  labels:
    service: league-ranking
    app: lightshield
spec:
  selector:
    matchLabels:
      name: league-ranking
      app: lightshield
  template:
    metadata:
      labels:
        name: league-ranking
        app: lightshield
    spec:
      containers:
        - name: league-ranking
          image: lightshield/league_ranking:latest
          imagePullPolicy: Never
          ports:
            - containerPort: 80
          env:
            - name: SERVER
              value: EUW1

            - name: PERSISTENT_HOST
              valueFrom:
                configMapKeyRef:
                  name: config
                  key: PERSISTENT_HOST

            - name: API_KEY
              valueFrom:
                secretKeyRef:
                  name: secrets
                  key: API_KEY

            - name: PERSISTENT_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: secrets
                  key: PERSISTENT_PASSWORD
