genpolicy: add support for cc-local-csi #178
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merge Checklist
upstream-missinglabel (orupstream-not-needed) has been set on the PR.Summary
Adds support for cc-local-csi to genpolicy, reusing most of the code from my previous PR.
Test Methodology
Manual testing, ensuring we're not regressing on cc-managed-csi/managed-csi/emptyDir, using the YAML below:
YAML test file
--- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: pvc-managed-cc-csi spec: accessModes: - ReadWriteOnce resources: requests: storage: 50Gi storageClassName: cc-managed-premium-csi --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: pvc-managed-csi spec: accessModes: - ReadWriteOnce resources: requests: storage: 50Gi storageClassName: managed-csi --- kind: Pod apiVersion: v1 metadata: name: managed-local spec: runtimeClassName: kata-cc containers: - image: "busybox:latest" name: busybox command: - sleep - "infinity" volumeMounts: - name: cc-managed-csi-vol mountPath: /mnt/persistent-ok - name: managed-csi-vol mountPath: /mnt/persistent-broken - name: cc-local mountPath: /mnt/scratch-ok - name: emptydir mountPath: /mnt/scratch-broken volumes: - name: cc-managed-csi-vol persistentVolumeClaim: claimName: pvc-managed-cc-csi - name: managed-csi-vol persistentVolumeClaim: claimName: pvc-managed-csi - name: cc-local ephemeral: volumeClaimTemplate: spec: accessModes: - ReadWriteOnce storageClassName: cc-local-csi resources: requests: storage: 1Gi - name: emptydir emptyDir: {}