{%- set podTypeBootstrap = "yes" %}
{%- set resourceName = kolla_kubernetes.cli.args.resource_name %}
{%- import "services/common/common-lib.yml.j2" as lib with context %}
apiVersion: batch/v1
kind: Job
metadata:
  name: keystone-manage-db
  namespace: {{ kolla_kubernetes_namespace }}
spec:
  template:
    spec:
      nodeSelector:
{%- set selector = kolla_kubernetes_hostlabel_controller %}
          {{ selector.key }}: {{ selector.value }}
      restartPolicy: OnFailure
      containers:
        - image: "{{ keystone_image_full }}"
          name: main
          volumeMounts:
{{ lib.common_volume_mounts(indent=12) }}
            - mountPath: {{ container_config_directory }}
              name: keystone-config
              readOnly: true
          env:
            - name: KOLLA_KUBERNETES
              value: ""
            - name: KOLLA_BOOTSTRAP
              value: ""
            - name: KOLLA_CONFIG_STRATEGY
              value: "{{ config_strategy }}"
      volumes:
{{ lib.common_volumes(indent=8) }}
        - name: keystone-config
          configMap:
            name: keystone
