Skip to content

Latest commit

 

History

History
48 lines (41 loc) · 1.35 KB

metering-store-data-in-azure.adoc

File metadata and controls

48 lines (41 loc) · 1.35 KB

Storing data in Microsoft Azure

To store data in Azure blob storage you must use an existing container. Edit the spec.storage section in the example azure-blob-storage.yaml file below.

apiVersion: metering.openshift.io/v1
kind: MeteringConfig
metadata:
  name: "operator-metering"
spec:
  storage:
    type: "hive"
    hive:
      type: "azure"
      azure:
        container: "bucket1" (1)
        secretName: "my-azure-secret" (2)
        rootDirectory: "/testDir" (3)
  1. Specify the container name.

  2. Specify a secret in the metering namespace. See the examples that follow for more details.

  3. You can optionally specify the directory where you would like to store your data.

Use the example secret below as a template.

apiVersion: v1
kind: Secret
metadata:
  name: your-azure-secret
data:
  azure-storage-account-name: "dGVzdAo="
  azure-secret-access-key: "c2VjcmV0Cg=="

You can use the following command to create the secret.

oc create secret -n openshift-metering generic your-azure-secret --from-literal=azure-storage-account-name=your-storage-account-name --from-literal=azure-secret-access-key-your-secret-key