Trident - Kyverno ポリシーにより、StorageClass の制限によりTrident PV の作成がブロックされる
環境
- トライデント
 - Kubernetes - k8s
 
問題
Kyvernoポリシーによって許可されたストレージクラスが制限されている場合、 TridentはKubernetesでPersistentVolume(PV)を作成できません。その結果、 Azure NetApp Files (ANF)でボリュームが正常に作成されたにもかかわらず、PersistentVolumeClaim(PVC)が保留状態のままになります。
Tridentログ:
1 request.go:1212] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"admission webhook \"validate.kyverno.svc-fail\" denied the request: \n\nresource PersistentVolume//pvc-946f4b1c-fe5f-418f-b178-f066cf73b0b1 was blocked due to the following policies \n\nrestrict-allowed-storageclasses:\n  restrict-pv-storageclass: 'validation error: PVs must use storageClassName ''<sc name>''\n   or ''<sc name>''. rule restrict-pv-storageclass failed at path /spec/storageClassName/'\n","code":400}
 1 volume_store.go:144] error saving volume pvc-946f4b1c-fe5f-418f-b178-f066cf73b0b1: admission webhook"validate.kyverno.svc-fail" denied the request: