full-cluster-external-secret.yaml 3.1 KB

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