From 2a188c90c971affbfafcbdeab7bd55992e058663 Mon Sep 17 00:00:00 2001 From: Ashley Dumaine Date: Wed, 18 Dec 2024 14:38:07 -0500 Subject: [PATCH] add example with lobj and lobjkey --- docs/src/topics/cluster-object-store.md | 55 +++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/docs/src/topics/cluster-object-store.md b/docs/src/topics/cluster-object-store.md index cd9ef36b..91ad96f3 100644 --- a/docs/src/topics/cluster-object-store.md +++ b/docs/src/topics/cluster-object-store.md @@ -37,6 +37,61 @@ data: secret_key: ${SECRET_KEY} ``` +Alternatively, the `LinodeObjectStorageBucket` and `LinodeObjectStorageKey` resources can be used: + +```yaml +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 +kind: LinodeCluster +metadata: +name: ${CLUSTER_NAME} +spec: + objectStore: + credentialsRef: + name: ${CLUSTER_NAME}-object-store-obj-key +--- +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 +kind: LinodeObjectStorageBucket +metadata: + labels: + app.kubernetes.io/name: linodeobjectstoragebucket + app.kubernetes.io/instance: ${CLUSTER_NAME}-object-store + app.kubernetes.io/part-of: cluster-api-provider-linode + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/created-by: cluster-api-provider-linode + cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME} + name: ${CLUSTER_NAME}-object-store +spec: + credentialsRef: + name: ${CLUSTER_NAME}-credentials + region: ${OBJ_BUCKET_REGION:=${LINODE_REGION}} +--- +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2 +kind: LinodeObjectStorageKey +metadata: + labels: + app.kubernetes.io/name: linodeobjectstoragekey + app.kubernetes.io/instance: ${CLUSTER_NAME}-object-store + app.kubernetes.io/part-of: cluster-api-provider-linode + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/created-by: cluster-api-provider-linode + cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME} + name: ${CLUSTER_NAME}-object-store +spec: + credentialsRef: + name: ${CLUSTER_NAME}-credentials + bucketAccess: + - bucketName: ${CLUSTER_NAME}-object-store + permissions: read_write + region: ${OBJ_BUCKET_REGION:=${LINODE_REGION}} + generatedSecret: + type: Opaque + format: + bucket_name: '{{ .BucketName }}' + s3_endpoint: '{{ .S3Endpoint }}' + access_key: '{{ .AccessKey }}' + secret_key: '{{ .SecretKey }}' +``` + ## Capabilities ### Bootstrap Data Limits During Linode Provisioning