full-cluster-secret-store.yaml 6.6 KB

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