GCP Secret Manager

GCP Secret Manager密钥仓库组件的详细信息

配置

要设置GCP Secret Manager密钥仓库,请创建一个类型为secretstores.gcp.secretmanager的组件。 See this guide on how to create and apply a secretstore configuration. See this guide on referencing secrets to retrieve and use the secret with Dapr components.

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: gcpsecretmanager
  namespace: default
spec:
  type: secretstores.gcp.secretmanager
  version: v1
  metadata:
  - name: type
    value: <replace-with-account-type>
  - name: project_id
    value: <replace-with-project-id>
  - name: private_key_id
    value: <replace-with-private-key-id>
  - name: client_email
    value: <replace-with-email>
  - name: client_id
    value: <replace-with-client-id>
  - name: auth_uri
    value: <replace-with-auth-uri>
  - name: token_uri
    value: <replace-with-token-uri>
  - name: auth_provider_x509_cert_url
    value: <replace-with-auth-provider-cert-url>
  - name: client_x509_cert_url
    value: <replace-with-client-cert-url>
  - name: private_key
    value: <replace-with-private-key>

元数据字段规范

字段必填详情Example
typeY账户类型"serviceAccount"
project_idY与此组件相关联的项目 ID。"project_id"
private_key_idN私钥ID"privatekey"
client_emailY客户端电子邮件地址"client@example.com"
client_idN客户端的 ID"11111111"
auth_uriN认证URI"https://accounts.google.com/o/oauth2/auth"
token_uriN认证token URI"https://oauth2.googleapis.com/token"
auth_provider_x509_cert_urlN认证提供者的证书URL"https://www.googleapis.com/oauth2/v1/certs"
client_x509_cert_urlN客户端的证书 URL"https://www.googleapis.com/robot/v1/metadata/x509/<project-name>.iam.gserviceaccount.com"
private_keyY认证用的私钥"privateKey"

设置GCP Secret Manager实例

参考GCP文档设置 GCP Secret Manager:https://cloud.google.com/secret-manager/docs/quickstart。

相关链接