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

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

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

示例中hostPath中pathPrefix以/tmp开头,不符合策略实例。

apiVersion: v1kind: Podmetadata:  name: nginx-host-filesystem  labels:    app: nginx-host-filesystem-disallowedspec:  containers:  - name: nginx    image: nginx    volumeMounts:    - mountPath: /cache      name: cache-volume      readOnly: true  volumes:  - name: cache-volume    hostPath:      path: /tmp # directory location on host
support.huaweicloud.com/usermanual-ucs/ucs_01_0224.html