Skip to content

Conversation

@sprt
Copy link

@sprt sprt commented Apr 17, 2024

Merge Checklist
  • Followed patch format from upstream recommendation: https://github.com/kata-containers/community/blob/main/CONTRIBUTING.md#patch-format
    • Included a single commit in a given PR - at least unless there are related commits and each makes sense as a change on its own.
  • Aware about the PR to be merged using "create a merge commit" rather than "squash and merge" (or similar)
  • genPolicy only: Ensured the tool still builds on Windows
  • genPolicy only: Updated sample YAMLs' policy annotations, if applicable
  • The upstream-missing label (or upstream-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: {}

@sprt sprt added the upstream/missing PRs that are yet to be upstreamed label Apr 17, 2024
@sprt sprt marked this pull request as ready for review April 17, 2024 20:46
@sprt sprt requested review from a team as code owners April 17, 2024 20:46
@Redent0r
Copy link

Redent0r commented Apr 17, 2024

I just verified Windows build. I would ask for one geen pipeline test run before merging. I forgot to ask last PR. I can help debug failures, if any: https://dev.azure.com/mariner-org/mariner/_build/results?buildId=552509&view=ms.vss-test-web.build-test-results-tab

@sprt sprt merged commit f467a04 into microsoft:msft-main Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream/missing PRs that are yet to be upstreamed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants