{%- set resourceName = kolla_kubernetes.cli.args.resource_name %}

{%- if storage_provider != "ceph" %}
  # NO-OP for Non-Ceph storage providers

{%- else %}

  {%- if storage_ceph.secretName is defined and storage_ceph.secretName|length>0 and storage_ceph.key is defined and storage_ceph.key|length>0 %}
apiVersion: v1
kind: Secret
metadata:
  name: {{ storage_ceph.secretName }}
data:
  {#- Create base64-encoded key:
      ssh ceph-mon cat /etc/ceph/path/to/ceph.client.keyring | grep key | awk '{print $3}' | base64 #}
  key: {{ storage_ceph.key }}

  {%- else %}
  # NO-OP since either storage_ceph.secretName or storage_ceph.key are undefined

  {%- endif %}

{%- endif %}
