c12s-kubespray/extra_playbooks/files/get_cinder_pvs.sh
Hugo Blom 833794feef
[Openstack] Cleanup the old in-tree openstack cloud provider (#5742)
* Added playbook to migrate openstack cloud provider

* remove old cloud provider config

* Rewrite provisioned-by annotation on Cinder PVs

* update indents

Co-authored-by: Jonathan Süssemilch Poulain <jonathan@sofiero.net>
2020-03-11 05:13:36 -07:00

2 lines
282 B
Bash

#!/bin/sh
kubectl get pv -o go-template --template='{{ range .items }}{{ $metadata := .metadata }}{{ with $value := index .metadata.annotations "pv.kubernetes.io/provisioned-by" }}{{ if eq $value "kubernetes.io/cinder" }}{{printf "%s\n" $metadata.name}}{{ end }}{{ end }}{{ end }}'