full-cluster-secret-store.yaml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. apiVersion: external-secrets.io/v1beta1
  2. kind: ClusterSecretStore
  3. metadata:
  4. name: example
  5. spec:
  6. # Used to select the correct ESO controller (think: ingress.ingressClassName)
  7. # The ESO controller is instantiated with a specific controller name
  8. # and filters ES based on this property
  9. # Optional
  10. controller: dev
  11. # provider field contains the configuration to access the provider
  12. # which contains the secret exactly one provider must be configured.
  13. provider:
  14. # (1): AWS Secrets Manager
  15. # aws configures this store to sync secrets using AWS Secret Manager provider
  16. aws:
  17. service: SecretsManager
  18. # Role is a Role ARN which the SecretManager provider will assume
  19. role: iam-role
  20. # AWS Region to be used for the provider
  21. region: eu-central-1
  22. # Auth defines the information necessary to authenticate against AWS
  23. auth:
  24. # Getting the accessKeyID and secretAccessKey from an already created Kubernetes Secret
  25. secretRef:
  26. accessKeyIDSecretRef:
  27. name: awssm-secret
  28. key: access-key
  29. secretAccessKeySecretRef:
  30. name: awssm-secret
  31. key: secret-access-key
  32. # IAM roles for service accounts
  33. # https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts-technical-overview.html
  34. jwt:
  35. serviceAccountRef:
  36. name: my-serviceaccount
  37. namespace: sa-namespace
  38. vault:
  39. server: "https://vault.acme.org"
  40. # Path is the mount path of the Vault KV backend endpoint
  41. path: "secret"
  42. # Version is the Vault KV secret engine version.
  43. # This can be either "v1" or "v2", defaults to "v2"
  44. version: "v2"
  45. # vault enterprise namespace: https://www.vaultproject.io/docs/enterprise/namespaces
  46. namespace: "a-team"
  47. # base64 encoded string of certificate
  48. caBundle: "..."
  49. # Instead of caBundle you can also specify a caProvider
  50. # this will retrieve the cert from a Secret or ConfigMap
  51. caProvider:
  52. # Can be Secret or ConfigMap
  53. type: "Secret"
  54. # This is mandatory for ClusterSecretStore and not relevant for SecretStore
  55. namespace: "my-cert-secret-namespace"
  56. name: "my-cert-secret"
  57. key: "cert-key"
  58. auth:
  59. # static token: https://www.vaultproject.io/docs/auth/token
  60. tokenSecretRef:
  61. name: "my-secret"
  62. namespace: "secret-admin"
  63. key: "vault-token"
  64. # AppRole auth: https://www.vaultproject.io/docs/auth/approle
  65. appRole:
  66. path: "approle"
  67. roleId: "db02de05-fa39-4855-059b-67221c5c2f63"
  68. secretRef:
  69. name: "my-secret"
  70. namespace: "secret-admin"
  71. key: "vault-token"
  72. # Kubernetes auth: https://www.vaultproject.io/docs/auth/kubernetes
  73. kubernetes:
  74. mountPath: "kubernetes"
  75. role: "demo"
  76. # Optional service account reference
  77. serviceAccountRef:
  78. name: "my-sa"
  79. namespace: "secret-admin"
  80. # Optional secret field containing a Kubernetes ServiceAccount JWT
  81. # used for authenticating with Vault
  82. secretRef:
  83. name: "my-secret"
  84. namespace: "secret-admin"
  85. key: "vault"
  86. # (2): GCP Secret Manager
  87. gcpsm:
  88. # Auth defines the information necessary to authenticate against GCP by getting
  89. # the credentials from an already created Kubernetes Secret.
  90. auth:
  91. secretRef:
  92. secretAccessKeySecretRef:
  93. name: gcpsm-secret
  94. key: secret-access-credentials
  95. namespace: example
  96. projectID: myproject
  97. # (3): Kubernetes provider
  98. kubernetes:
  99. server:
  100. url: "https://myapiserver.tld"
  101. caProvider:
  102. type: Secret
  103. name: my-cluster-secrets
  104. namespace: example
  105. key: ca.crt
  106. auth:
  107. serviceAccount:
  108. name: "example-sa"
  109. namespace: "example"
  110. # (4): Oracle provider
  111. oracle:
  112. # The vault OCID
  113. vault: ocid1.vault.oc1.eu-frankfurt-1.aaa1aaaaaaaaa.aaaaaaaaaaaaaa1aaaaaaa111aaaaaaaaaaaaaaaa
  114. # The vault region
  115. region: eu-frankfurt-1
  116. auth:
  117. # The user OCID
  118. user: ocid1.user.oc1..aaa1aaaaaaaaa.aaaaaaaaaaaaaa1aaaaaaa111aaaaaaaaaaaaaaaa
  119. # The tenancy OCID
  120. tenancy: ocid1.tenancy.oc1..aaa1aaaaaaaaa.aaaaaaaaaaaaaa1aaaaaaa111aaaaaaaaaaaaaaaa
  121. secretRef:
  122. privatekey:
  123. # The secret that contains your privatekey
  124. name: oci-secret-name
  125. key: privateKey
  126. fingerprint:
  127. # The secret that contains your fingerprint
  128. name: oci-secret-name
  129. key: fingerprint
  130. # (TODO): add more provider examples here
  131. # Conditions about namespaces in which the ClusterSecretStore is usable for ExternalSecrets
  132. conditions:
  133. # Options are namespaceSelector, or namespaces
  134. - namespaceSelector:
  135. matchLabels:
  136. my.namespace.io/some-label: "value" # Only namespaces with that label will work
  137. - namespaces:
  138. - "namespace-a"
  139. - "namespace-b"
  140. # conditions needs only one of the conditions to meet for the CSS to be usable in the namespace.
  141. status:
  142. # Standard condition schema
  143. conditions:
  144. # SecretStore ready condition indicates the given store is in ready
  145. # state and able to referenced by ExternalSecrets
  146. # If the `status` of this condition is `False`, ExternalSecret controllers
  147. # should prevent attempts to fetch secrets
  148. - type: Ready
  149. status: "False"
  150. reason: "ConfigError"
  151. message: "SecretStore validation failed"
  152. lastTransitionTime: "2019-08-12T12:33:02Z"