full-cluster-external-secret.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. {% raw %}
  2. apiVersion: external-secrets.io/v1beta1
  3. kind: ClusterExternalSecret
  4. metadata:
  5. name: "hello-world"
  6. spec:
  7. # The name to be used on the ExternalSecrets
  8. externalSecretName: "hello-world-es"
  9. # This is a basic label selector to select the namespaces to deploy ExternalSecrets to.
  10. # you can read more about them here https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements
  11. namespaceSelector:
  12. matchLabels:
  13. cool: label
  14. # How often the ClusterExternalSecret should reconcile itself
  15. # This will decide how often to check and make sure that the ExternalSecrets exist in the matching namespaces
  16. refreshTime: "1m"
  17. # This is the spec of the ExternalSecrets to be created
  18. # The content of this was taken from our ExternalSecret example
  19. externalSecretSpec:
  20. secretStoreRef:
  21. name: secret-store-name
  22. kind: SecretStore
  23. refreshInterval: "1h"
  24. target:
  25. name: my-secret
  26. creationPolicy: 'Merge'
  27. template:
  28. type: kubernetes.io/dockerconfigjson
  29. metadata:
  30. annotations: {}
  31. labels: {}
  32. data:
  33. config.yml: |
  34. endpoints:
  35. - https://{{ .data.user }}:{{ .data.password }}@api.exmaple.com
  36. templateFrom:
  37. - configMap:
  38. name: alertmanager
  39. items:
  40. - key: alertmanager.yaml
  41. data:
  42. - secretKey: secret-key-to-be-managed
  43. remoteRef:
  44. key: provider-key
  45. version: provider-key-version
  46. property: provider-key-property
  47. dataFrom:
  48. - key: provider-key
  49. version: provider-key-version
  50. property: provider-key-property
  51. status:
  52. # This will list any namespaces where the creation of the ExternalSecret failed
  53. # This will not list any issues with the ExternalSecrets, you will have to check the
  54. # ExternalSecrets to see any issues with them.
  55. failedNamespaces:
  56. - namespace: "matching-ns-1"
  57. # This is one of the possible messages, and likely the most common
  58. reason: "external secret already exists in namespace"
  59. # You can find all matching and successfully deployed namespaces here
  60. provisionedNamespaces:
  61. - "matching-ns-3"
  62. - "matching-ns-2"
  63. # The condition can be Ready, PartiallyReady, or NotReady
  64. # PartiallyReady would indicate an error in 1 or more namespaces
  65. # NotReady would indicate errors in all namespaces meaning all ExternalSecrets resulted in errors
  66. conditions:
  67. - type: PartiallyReady
  68. status: "True"
  69. lastTransitionTime: "2022-01-12T12:33:02Z"
  70. {% endraw %}