apiVersion: v1
kind: ReplicationController
spec:
  replicas: {{ glance_api_replicas }}
  selector:
      service: glance
      type: api
  template:
    metadata:
      labels:
        service: glance
        type: api
    spec:
      containers:
        - name: glance-api
          image: "{{ glance_api_image_full }}"
          volumeMounts:
            - mountPath: {{ container_config_directory }}
              name: glance-config
            - mountPath: /var/lib/glance/
              name: glance-persistent-storage
            - mountPath: /var/log/kolla/
              name: kolla-logs
            - mountPath: /etc/localtime
              name: etc-localtime
          env:
            - name: KOLLA_CONFIG_STRATEGY
              value: {{ config_strategy }}
          ports:
            - containerPort: {{ glance_api_port }}
              name: glance-api
      volumes:
        - name: glance-config
          configMap:
            name: glance-api-configmap
        - name: glance-persistent-storage
          hostPath:
            path: /var/lib/kolla/glance
        - name: etc-localtime
          hostPath:
            path: /etc/localtime
        - name: kolla-logs
          emptyDir: {}
metadata:
   name: glance-api
