华为云UCS-k8spspvolumetypes:不符合策略实例的资源定义

时间:2025-02-12 15:05:17

不符合策略实例的资源定义

示例中volumes中的类型(hostPath)不在上述定义的允许范围内,不符合策略实例。

apiVersion: v1kind: Podmetadata:  name: nginx-volume-types-disallowed  labels:    app: nginx-volume-typesspec:  containers:  - name: nginx    image: nginx    volumeMounts:    - mountPath: /cache      name: cache-volume  - name: nginx2    image: nginx    volumeMounts:    - mountPath: /cache2      name: demo-vol  volumes:  - name: cache-volume    hostPath:      path: /tmp # directory location on host  - name: demo-vol    emptyDir: {}
support.huaweicloud.com/usermanual-ucs/ucs_01_0215.html