full-cluster-secret-store.yaml 6.5 KB

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