-
Notifications
You must be signed in to change notification settings - Fork 4
BYOVPC support for secrets and Iceberg REST catalogs #313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
547d721
dae6a7e
90c1e59
218a80b
2ae27dc
416ea75
7f4448e
2639787
e9a8658
46e6e47
110e14a
8c3a3db
2e3e9bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ content: | |
| - url: . | ||
| branches: HEAD | ||
| - url: https://github.com/redpanda-data/documentation | ||
| branches: [main, v/*, api, shared, site-search] | ||
| branches: ['DOC-1222-iceberg-byovpc-updates', v/*, api, shared, site-search] | ||
|
||
| - url: https://github.com/redpanda-data/redpanda-labs | ||
| branches: main | ||
| start_paths: [docs,'*/docs'] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,13 @@ When you create a BYOCVPC cluster, you specify your VPC and service account. The | |
|
|
||
| The https://github.com/redpanda-data/cloud-examples/tree/main/customer-managed/aws[Redpanda Cloud Examples repository^] contains https://developer.hashicorp.com/terraform[Terraform^] code that deploys the resources required for a BYOVPC cluster on AWS. You'll need to create these resources in advance and give them to Redpanda during cluster creation. Variables are provided in the code so you can exclude resources that already exist in your environment, such as the VPC. | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| Secrets management is enabled by default with the Terraform code in the example repository. It allows you to store and read secrets in your cluster, for example to integrate a REST catalog with Iceberg-enabled topics. | ||
|
|
||
| For existing BYOVPC clusters, contact https://support.redpanda.com/hc/en-us/requests/new[Redpanda Support^] to enable secrets management. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @wzzzrd86 just a heads up that per @tomasz-sadura , existing AWS BYOVPC clusters will need assistance from Support to enable secrets management. |
||
| ==== | ||
|
|
||
| == Prerequisites | ||
|
|
||
| * Access to an AWS project in which you create your cluster. | ||
|
|
@@ -58,7 +65,7 @@ You can update the example configuration to customize your setup: | |
|
|
||
| - Enable PrivateLink (`"enable_private_link": true`). | ||
| - Preserve cluster data when deleting the cluster (`"force_destroy_cloud_storage": false`). | ||
| - Redpanda Connect is enabled by default. To disable Redpanda Connect, set `"enable_redpanda_connect": false` in the `byoc.auto.tfvars.json` file, and remove the additional security groups and node instance profiles that are required for Redpanda Connect. | ||
| - Redpanda Connect is enabled by default. To disable Redpanda Connect, set `"enable_redpanda_connect": false` in the `byoc.auto.tfvars.json` file, and remove the additional security groups and node instance profiles that are required for Redpanda Connect. | ||
| - Use https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html[condition tags^] to control resource modifications based on AWS tags. For example: | ||
| + | ||
| ```json | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| = Enable Secrets Management on an Existing BYOVPC Cluster on GCP | ||
| :description: Store and read secrets in your existing BYOVPC cluster. | ||
| :page-beta: true | ||
|
|
||
| [IMPORTANT] | ||
| ==== | ||
| BYOVPC is an add-on feature that may require an additional purchase. To unlock this feature for your account, contact your Redpanda account team or https://www.redpanda.com/price-estimator[Redpanda Sales^]. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So it may or may not require purchase? Or does it absolutely require purchase to unlock? The word "may" here makes me think, maybe/maybe not, which doesn't give me clarity on this.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @david-yu would you be able to clarify or give guidance on the language for BYOVPC access? |
||
| ==== | ||
|
|
||
| Storing secrets in your cluster allows you to keep your cloud infrastructure secure as you integrate your data across different systems, for example, REST catalogs with your Iceberg-enabled topics. If you do not have secrets management enabled on an existing BYOVPC cluster, you can do so by following the steps on this page to update your cluster configuration. You can also create xref:get-started:cluster-types/byoc/gcp/vpc-byo-gcp.adoc[a new BYOVPC cluster] with secrets management already enabled. | ||
|
|
||
| Replace all `<placeholders>` with your own values. | ||
|
|
||
| . Create one new service account with the necessary permissions and roles. | ||
| + | ||
| .Show commands | ||
| [%collapsible] | ||
| ==== | ||
| ```bash | ||
| # Account used to check for and read secrets | ||
|
|
||
| gcloud iam service-accounts create redpanda-operator \ | ||
| --display-name="Redpanda Operator Service Account" | ||
|
|
||
| cat << EOT > redpanda-operator.role | ||
| { | ||
| "name": "redpanda_operator_role", | ||
| "title": "Redpanda Operator Role", | ||
| "description": "Redpanda Operator Role", | ||
| "includedPermissions": [ | ||
| "resourcemanager.projects.get", | ||
| "secretmanager.secrets.get", | ||
| "secretmanager.versions.access" | ||
| ], | ||
| } | ||
| EOT | ||
|
|
||
| gcloud iam roles create redpanda_operator_role --project=<service-project-id> --file redpanda-operator.role | ||
|
|
||
| gcloud projects add-iam-policy-binding <service-project-id> \ | ||
| --member="serviceAccount:redpanda-operator@<service-project-id>.iam.gserviceaccount.com" \ | ||
| --role="projects/<service-project-id>/roles/redpanda_operator_role" | ||
| ``` | ||
| ==== | ||
|
|
||
| . Update the existing Redpanda cluster service account with the necessary permissions to read secrets. | ||
| + | ||
| .Show commands | ||
| [%collapsible] | ||
| ==== | ||
| ```bash | ||
| cat << EOT > redpanda-cluster.role | ||
| { | ||
| "name": "redpanda_cluster_role", | ||
| "title": "Redpanda Cluster Role", | ||
| "description": "Redpanda Cluster Role", | ||
| "includedPermissions": [ | ||
| "resourcemanager.projects.get", | ||
| "secretmanager.secrets.get", | ||
| "secretmanager.versions.access" | ||
| ], | ||
| } | ||
| EOT | ||
|
|
||
| gcloud iam roles create redpanda_cluster_role --project=<service-project-id> --file redpanda-cluster.role | ||
|
|
||
| gcloud projects add-iam-policy-binding <service-project-id> \ | ||
| --member="serviceAccount:redpanda-cluster@<service-project-id>.iam.gserviceaccount.com" \ | ||
| --role="projects/<service-project-id>/roles/redpanda_cluster_role" | ||
| ``` | ||
| ==== | ||
|
|
||
| . Bind the new service account. | ||
| + | ||
| The account ID of the GCP service account is used to configure service account bindings. This account ID is the local part of the email address for the GCP service account. For example, if the GCP service account is `[email protected]`, then the account ID is `my-gcp-sa`. | ||
kbatuigas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| + | ||
| .Show commands | ||
| [%collapsible] | ||
| ==== | ||
| ``` | ||
| gcloud iam service-accounts add-iam-policy-binding <redpanda_operator-gcp-sa-account-id>@<service-project-id>.iam.gserviceaccount.com \ | ||
| --role roles/iam.workloadIdentityUser \ | ||
| --member "serviceAccount:<service-project-id>.svc.id.goog[redpanda-system/<redpanda_operator-gcp-sa-account-id>]" | ||
| ``` | ||
| ==== | ||
|
|
||
| . Make a xref:api:ROOT:cloud-controlplane-api.adoc#patch-/v1/clusters/-cluster.id-[`PATCH /v1/clusters/\{cluster-id}`] request to update the cluster configuration. | ||
| + | ||
| .Show request | ||
| [%collapsible] | ||
| ==== | ||
| ```bash | ||
| export CLUSTER_PATCH_BODY=`cat << EOF | ||
| { | ||
| "customer_managed_resources": { | ||
| "gcp": { | ||
| "redpanda_operator_service_account": { | ||
| "email": "<redpanda_operator-gcp-sa-account-id>@<service-project-id>.iam.gserviceaccount.com" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| EOF` | ||
| curl -v -X PATCH \ | ||
| -H "Content-Type: application/json" \ | ||
| -H "Authorization: Bearer $AUTH_TOKEN" \ | ||
| -d "$CLUSTER_PATCH_BODY" $PUBLIC_API_ENDPOINT/v1/clusters/<cluster-id> | ||
| ``` | ||
| ==== | ||
|
|
||
| [[check-secrets-cloud-ui]] | ||
| . Check secrets management is available in the Cloud UI. | ||
kbatuigas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| .. Log in to https://cloud.redpanda.com[Redpanda Cloud^]. | ||
| .. Go to the **Secrets Store** page of your cluster. You should be able to create a new secret. | ||
|
|
||
| == Next steps | ||
|
|
||
| * xref:manage:cluster-maintenance/config-cluster.adoc#set-cluster-configuration-properties[Reference a secret in a cluster property]. | ||
| * xref:manage:iceberg/use-iceberg-catalogs.adoc[Integrate a catalog] for querying Iceberg topics in your cluster. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,13 @@ For example, to enable data transforms, set xref:reference:properties/cluster-pr | |
| rpk cluster config set data_transforms_enabled true | ||
| ---- | ||
|
|
||
| To set a cluster property with a secret, you must use the following notation: | ||
|
|
||
| [source,bash] | ||
| ---- | ||
| rpk cluster config set iceberg_rest_catalog_client_secret ${secrets.<secret-name>} | ||
| ---- | ||
|
|
||
| NOTE: Some properties require a rolling restart, and it can take several minutes for the update to complete. The `rpk cluster config set` command returns the operation ID. | ||
|
|
||
|
|
||
|
|
@@ -72,6 +79,22 @@ curl -H "Authorization: Bearer ${RP_CLOUD_TOKEN}" -X PATCH \ | |
|
|
||
| The xref:api:ROOT:cloud-controlplane-api.adoc#patch-/v1/clusters/-cluster.id-[`PATCH /clusters/{cluster.id}`] request returns the ID of a long-running operation. You can check the status of the operation by polling the xref:api:ROOT:cloud-controlplane-api.adoc#get-/v1/operations/-id-[`GET /operations/\{id}`] endpoint. | ||
|
|
||
| To set a cluster property with a secret, you must use the following notation with the secret name: | ||
|
|
||
| [source,bash] | ||
| ---- | ||
| curl -H "Authorization: Bearer <token>" -X PATCH \ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's also show how to do it with rpk which is much better UX
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @simon0191 This is the general doc for configuring cluster properties - the rpk instructions are described in the same doc https://github.com/redpanda-data/cloud-docs/pull/313/files#diff-c8fbb49e2369d966902a69910a95b4e432a6931f6efaf898897f416acbd9cd8dR26-R45 (preview here). The example to enable Iceberg should be added in the general Iceberg doc , per https://redpandadata.atlassian.net/browse/DOC-1413. I'll do so in a separate PR. |
||
| "https://api.cloud.redpanda.com/v1/clusters/<cluster-id>" \ | ||
| -H 'accept: application/json'\ | ||
| -H 'content-type: application/json' \ | ||
| -d '{"cluster_configuration": { | ||
| "custom_properties": { | ||
| "iceberg_rest_catalog_client_secret": "${secrets.<secret-name>}" | ||
| } | ||
| } | ||
| }' | ||
| ---- | ||
|
|
||
| NOTE: Some properties require a rolling restart for the update to take effect. This triggers a xref:manage:api/cloud-byoc-controlplane-api.adoc#lro[long-running operation] that can take several minutes to complete. | ||
|
|
||
| -- | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,4 +2,6 @@ | |||||
| :description: Learn how Redpanda can integrate topics with Apache Iceberg. | ||||||
| :page-beta: true | ||||||
|
|
||||||
| NOTE: The Iceberg integration for Redpanda Cloud is a beta feature. It is not supported for production deployments. | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
@simon0191 This note used to be on https://docs.redpanda.com/redpanda-cloud/manage/iceberg/use-iceberg-catalogs/ because of previous lack of support for secrets. Do we still want to add a note about using Iceberg in production while it is in beta for Cloud?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd replace this with the catalog support matrix mentioning that each integration has different maturity level
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @simon0191 Let's address this in a separate PR for https://redpandadata.atlassian.net/browse/DOC-1411 so PM and ideally DevProd can vet it as well. |
||||||
|
|
||||||
| include::ROOT:manage:partial$iceberg/about-iceberg-topics.adoc[] | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -307,7 +307,7 @@ endif::[] | |
|
|
||
| == Update cluster configuration | ||
|
|
||
| To update your cluster configuration properties, make a request to the xref:api:ROOT:cloud-controlplane-api.adoc#patch-/v1/clusters/-id-[`PATCH /v1/clusters/\{id}`] endpoint, passing the cluster ID as a parameter. Include the properties to update in the request body. | ||
| To update your cluster configuration properties, make a request to the xref:api:ROOT:cloud-controlplane-api.adoc#patch-/v1/clusters/-cluster.id-[`PATCH /v1/clusters/\{id}`] endpoint, passing the cluster ID as a parameter. Include the properties to update in the request body. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In here let's also show how to do it with rpk which is much better UX
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @simon0191 This is the page that guides readers on how to do specific tasks with the Control Plane API - we should add the rpk instructions on the general Iceberg doc https://docs.redpanda.com/redpanda-cloud/manage/iceberg/about-iceberg-topics/#enable-iceberg-integration (per https://redpandadata.atlassian.net/browse/DOC-1413) |
||
|
|
||
| ifdef::env-byoc[] | ||
| [,bash] | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.