From d8fe49b979b5de32df7705c013d3f12acbc2c05e Mon Sep 17 00:00:00 2001 From: Cindy Bang Date: Fri, 13 Dec 2024 10:55:28 -0500 Subject: [PATCH 1/2] docs: add cloud-init boostrap via cluster object store to mdbook summary --- docs/src/SUMMARY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index fe13d997d..6d904aa39 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -30,6 +30,7 @@ - [VPC](./topics/vpc.md) - [Firewalling](./topics/firewalling.md) - [Placement Groups](./topics/placement-groups.md) + - [Cluster Object Store](./topics/cluster-object-store.md) - [Development](./developers/development.md) - [Releasing](./developers/releasing.md) - [Testing](./developers/testing.md) From 45ad923e83e54856cd9c4bb75aae5ecc96c77b20 Mon Sep 17 00:00:00 2001 From: Ashley Dumaine Date: Wed, 18 Dec 2024 14:38:07 -0500 Subject: [PATCH 2/2] 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 cd9ef36bd..91ad96f3b 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