5.2.2. 默认存储位置
如果存在 storagelocation.metering.openshift.io/is-default 注解,且该注解在 StorageLocation 资源上被设置为 true,则该资源将成为默认存储资源。任何组件在存储配置选项中没有指定存储位置时,都将使用默认存储资源。只能有一个默认存储资源。如果多个资源都存在注解,则会记录一个错误,因为 Reporting Operator 无法确定默认值。
默认存储示例
apiVersion: metering.openshift.io/v1
kind: StorageLocation
metadata:
name: example-s3-storage
labels:
operator-metering: "true"
annotations:
storagelocation.metering.openshift.io/is-default: "true"
spec:
hive:
databaseName: example_s3_storage
unmanagedDatabase: false
location: "s3a://bucket-name/path/within/bucket"