external-secrets.io_clusterpushsecrets.yaml 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  1. apiVersion: apiextensions.k8s.io/v1
  2. kind: CustomResourceDefinition
  3. metadata:
  4. annotations:
  5. controller-gen.kubebuilder.io/version: v0.19.0
  6. labels:
  7. external-secrets.io/component: controller
  8. name: clusterpushsecrets.external-secrets.io
  9. spec:
  10. group: external-secrets.io
  11. names:
  12. categories:
  13. - external-secrets
  14. kind: ClusterPushSecret
  15. listKind: ClusterPushSecretList
  16. plural: clusterpushsecrets
  17. singular: clusterpushsecret
  18. scope: Cluster
  19. versions:
  20. - additionalPrinterColumns:
  21. - jsonPath: .metadata.creationTimestamp
  22. name: AGE
  23. type: date
  24. - jsonPath: .status.conditions[?(@.type=="Ready")].reason
  25. name: Status
  26. type: string
  27. name: v1alpha1
  28. schema:
  29. openAPIV3Schema:
  30. description: ClusterPushSecret is the Schema for the ClusterPushSecrets API
  31. that enables cluster-wide management of pushing Kubernetes secrets to external
  32. providers.
  33. properties:
  34. apiVersion:
  35. description: |-
  36. APIVersion defines the versioned schema of this representation of an object.
  37. Servers should convert recognized schemas to the latest internal value, and
  38. may reject unrecognized values.
  39. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  40. type: string
  41. kind:
  42. description: |-
  43. Kind is a string value representing the REST resource this object represents.
  44. Servers may infer this from the endpoint the client submits requests to.
  45. Cannot be updated.
  46. In CamelCase.
  47. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  48. type: string
  49. metadata:
  50. type: object
  51. spec:
  52. description: ClusterPushSecretSpec defines the configuration for a ClusterPushSecret
  53. resource.
  54. properties:
  55. namespaceSelectors:
  56. description: A list of labels to select by to find the Namespaces
  57. to create the ExternalSecrets in. The selectors are ORed.
  58. items:
  59. description: |-
  60. A label selector is a label query over a set of resources. The result of matchLabels and
  61. matchExpressions are ANDed. An empty label selector matches all objects. A null
  62. label selector matches no objects.
  63. properties:
  64. matchExpressions:
  65. description: matchExpressions is a list of label selector requirements.
  66. The requirements are ANDed.
  67. items:
  68. description: |-
  69. A label selector requirement is a selector that contains values, a key, and an operator that
  70. relates the key and values.
  71. properties:
  72. key:
  73. description: key is the label key that the selector applies
  74. to.
  75. type: string
  76. operator:
  77. description: |-
  78. operator represents a key's relationship to a set of values.
  79. Valid operators are In, NotIn, Exists and DoesNotExist.
  80. type: string
  81. values:
  82. description: |-
  83. values is an array of string values. If the operator is In or NotIn,
  84. the values array must be non-empty. If the operator is Exists or DoesNotExist,
  85. the values array must be empty. This array is replaced during a strategic
  86. merge patch.
  87. items:
  88. type: string
  89. type: array
  90. x-kubernetes-list-type: atomic
  91. required:
  92. - key
  93. - operator
  94. type: object
  95. type: array
  96. x-kubernetes-list-type: atomic
  97. matchLabels:
  98. additionalProperties:
  99. type: string
  100. description: |-
  101. matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
  102. map is equivalent to an element of matchExpressions, whose key field is "key", the
  103. operator is "In", and the values array contains only "value". The requirements are ANDed.
  104. type: object
  105. type: object
  106. x-kubernetes-map-type: atomic
  107. type: array
  108. pushSecretMetadata:
  109. description: The metadata of the external secrets to be created
  110. properties:
  111. annotations:
  112. additionalProperties:
  113. type: string
  114. type: object
  115. labels:
  116. additionalProperties:
  117. type: string
  118. type: object
  119. type: object
  120. pushSecretName:
  121. description: |-
  122. The name of the push secrets to be created.
  123. Defaults to the name of the ClusterPushSecret
  124. maxLength: 253
  125. minLength: 1
  126. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  127. type: string
  128. pushSecretSpec:
  129. description: PushSecretSpec defines what to do with the secrets.
  130. properties:
  131. data:
  132. description: Secret Data that should be pushed to providers
  133. items:
  134. description: PushSecretData defines data to be pushed to the
  135. provider and associated metadata.
  136. properties:
  137. conversionStrategy:
  138. default: None
  139. description: Used to define a conversion Strategy for the
  140. secret keys
  141. enum:
  142. - None
  143. - ReverseUnicode
  144. type: string
  145. match:
  146. description: Match a given Secret Key to be pushed to the
  147. provider.
  148. properties:
  149. remoteRef:
  150. description: Remote Refs to push to providers.
  151. properties:
  152. property:
  153. description: Name of the property in the resulting
  154. secret
  155. type: string
  156. remoteKey:
  157. description: Name of the resulting provider secret.
  158. type: string
  159. required:
  160. - remoteKey
  161. type: object
  162. secretKey:
  163. description: Secret Key to be pushed
  164. type: string
  165. required:
  166. - remoteRef
  167. type: object
  168. metadata:
  169. description: |-
  170. Metadata is metadata attached to the secret.
  171. The structure of metadata is provider specific, please look it up in the provider documentation.
  172. x-kubernetes-preserve-unknown-fields: true
  173. required:
  174. - match
  175. type: object
  176. type: array
  177. dataTo:
  178. description: DataTo defines bulk push rules that expand source
  179. Secret keys into provider entries.
  180. items:
  181. description: PushSecretDataTo defines how to bulk-push secrets
  182. to providers without explicit per-key mappings.
  183. properties:
  184. conversionStrategy:
  185. default: None
  186. description: Used to define a conversion Strategy for the
  187. secret keys
  188. enum:
  189. - None
  190. - ReverseUnicode
  191. type: string
  192. match:
  193. description: |-
  194. Match pattern for selecting keys from the source Secret.
  195. If not specified, all keys are selected.
  196. properties:
  197. regexp:
  198. description: |-
  199. Regexp matches keys by regular expression.
  200. If not specified, all keys are matched.
  201. type: string
  202. type: object
  203. metadata:
  204. description: |-
  205. Metadata is metadata attached to the secret.
  206. The structure of metadata is provider specific, please look it up in the provider documentation.
  207. x-kubernetes-preserve-unknown-fields: true
  208. remoteKey:
  209. description: |-
  210. RemoteKey is the name of the single provider secret that will receive ALL
  211. matched keys bundled as a JSON object (e.g. {"DB_HOST":"...","DB_USER":"..."}).
  212. When set, per-key expansion is skipped and a single push is performed.
  213. The provider's store prefix (if any) is still prepended to this value.
  214. When not set, each matched key is pushed as its own individual provider secret.
  215. type: string
  216. rewrite:
  217. description: |-
  218. Rewrite operations to transform keys before pushing to the provider.
  219. Operations are applied sequentially.
  220. items:
  221. description: PushSecretRewrite defines how to transform
  222. secret keys before pushing.
  223. properties:
  224. regexp:
  225. description: Used to rewrite with regular expressions.
  226. properties:
  227. source:
  228. description: Used to define the regular expression
  229. of a re.Compiler.
  230. type: string
  231. target:
  232. description: Used to define the target pattern
  233. of a ReplaceAll operation.
  234. type: string
  235. required:
  236. - source
  237. - target
  238. type: object
  239. transform:
  240. description: Used to apply string transformation on
  241. the secrets.
  242. properties:
  243. template:
  244. description: |-
  245. Used to define the template to apply on the secret name.
  246. `.value ` will specify the secret name in the template.
  247. type: string
  248. required:
  249. - template
  250. type: object
  251. type: object
  252. x-kubernetes-validations:
  253. - message: exactly one of regexp or transform must be
  254. set
  255. rule: (has(self.regexp) && !has(self.transform)) ||
  256. (!has(self.regexp) && has(self.transform))
  257. type: array
  258. storeRef:
  259. description: StoreRef specifies which SecretStore to push
  260. to. Required.
  261. properties:
  262. kind:
  263. default: SecretStore
  264. description: Kind of the SecretStore resource (SecretStore
  265. or ClusterSecretStore)
  266. enum:
  267. - SecretStore
  268. - ClusterSecretStore
  269. type: string
  270. labelSelector:
  271. description: Optionally, sync to secret stores with
  272. label selector
  273. properties:
  274. matchExpressions:
  275. description: matchExpressions is a list of label
  276. selector requirements. The requirements are ANDed.
  277. items:
  278. description: |-
  279. A label selector requirement is a selector that contains values, a key, and an operator that
  280. relates the key and values.
  281. properties:
  282. key:
  283. description: key is the label key that the
  284. selector applies to.
  285. type: string
  286. operator:
  287. description: |-
  288. operator represents a key's relationship to a set of values.
  289. Valid operators are In, NotIn, Exists and DoesNotExist.
  290. type: string
  291. values:
  292. description: |-
  293. values is an array of string values. If the operator is In or NotIn,
  294. the values array must be non-empty. If the operator is Exists or DoesNotExist,
  295. the values array must be empty. This array is replaced during a strategic
  296. merge patch.
  297. items:
  298. type: string
  299. type: array
  300. x-kubernetes-list-type: atomic
  301. required:
  302. - key
  303. - operator
  304. type: object
  305. type: array
  306. x-kubernetes-list-type: atomic
  307. matchLabels:
  308. additionalProperties:
  309. type: string
  310. description: |-
  311. matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
  312. map is equivalent to an element of matchExpressions, whose key field is "key", the
  313. operator is "In", and the values array contains only "value". The requirements are ANDed.
  314. type: object
  315. type: object
  316. x-kubernetes-map-type: atomic
  317. name:
  318. description: Optionally, sync to the SecretStore of
  319. the given name
  320. maxLength: 253
  321. minLength: 1
  322. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  323. type: string
  324. type: object
  325. type: object
  326. x-kubernetes-validations:
  327. - message: storeRef must specify either name or labelSelector
  328. rule: has(self.storeRef) && (has(self.storeRef.name) || has(self.storeRef.labelSelector))
  329. - message: 'remoteKey and rewrite are mutually exclusive: rewrite
  330. is only supported in per-key mode (without remoteKey)'
  331. rule: '!has(self.remoteKey) || !has(self.rewrite) || size(self.rewrite)
  332. == 0'
  333. type: array
  334. deletionPolicy:
  335. default: None
  336. description: Deletion Policy to handle Secrets in the provider.
  337. enum:
  338. - Delete
  339. - None
  340. type: string
  341. refreshInterval:
  342. default: 1h0m0s
  343. description: The Interval to which External Secrets will try to
  344. push a secret definition
  345. type: string
  346. secretStoreRefs:
  347. items:
  348. description: PushSecretStoreRef contains a reference on how
  349. to sync to a SecretStore.
  350. properties:
  351. kind:
  352. default: SecretStore
  353. description: Kind of the SecretStore resource (SecretStore
  354. or ClusterSecretStore)
  355. enum:
  356. - SecretStore
  357. - ClusterSecretStore
  358. type: string
  359. labelSelector:
  360. description: Optionally, sync to secret stores with label
  361. selector
  362. properties:
  363. matchExpressions:
  364. description: matchExpressions is a list of label selector
  365. requirements. The requirements are ANDed.
  366. items:
  367. description: |-
  368. A label selector requirement is a selector that contains values, a key, and an operator that
  369. relates the key and values.
  370. properties:
  371. key:
  372. description: key is the label key that the selector
  373. applies to.
  374. type: string
  375. operator:
  376. description: |-
  377. operator represents a key's relationship to a set of values.
  378. Valid operators are In, NotIn, Exists and DoesNotExist.
  379. type: string
  380. values:
  381. description: |-
  382. values is an array of string values. If the operator is In or NotIn,
  383. the values array must be non-empty. If the operator is Exists or DoesNotExist,
  384. the values array must be empty. This array is replaced during a strategic
  385. merge patch.
  386. items:
  387. type: string
  388. type: array
  389. x-kubernetes-list-type: atomic
  390. required:
  391. - key
  392. - operator
  393. type: object
  394. type: array
  395. x-kubernetes-list-type: atomic
  396. matchLabels:
  397. additionalProperties:
  398. type: string
  399. description: |-
  400. matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
  401. map is equivalent to an element of matchExpressions, whose key field is "key", the
  402. operator is "In", and the values array contains only "value". The requirements are ANDed.
  403. type: object
  404. type: object
  405. x-kubernetes-map-type: atomic
  406. name:
  407. description: Optionally, sync to the SecretStore of the
  408. given name
  409. maxLength: 253
  410. minLength: 1
  411. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  412. type: string
  413. type: object
  414. type: array
  415. selector:
  416. description: The Secret Selector (k8s source) for the Push Secret
  417. maxProperties: 1
  418. minProperties: 1
  419. properties:
  420. generatorRef:
  421. description: Point to a generator to create a Secret.
  422. properties:
  423. apiVersion:
  424. default: generators.external-secrets.io/v1alpha1
  425. description: Specify the apiVersion of the generator resource
  426. type: string
  427. kind:
  428. description: Specify the Kind of the generator resource
  429. enum:
  430. - ACRAccessToken
  431. - BeyondtrustWorkloadCredentialsDynamicSecret
  432. - ClusterGenerator
  433. - CloudsmithAccessToken
  434. - ECRAuthorizationToken
  435. - Fake
  436. - GCRAccessToken
  437. - GithubAccessToken
  438. - QuayAccessToken
  439. - Password
  440. - SSHKey
  441. - STSSessionToken
  442. - UUID
  443. - VaultDynamicSecret
  444. - Webhook
  445. - Grafana
  446. - MFA
  447. type: string
  448. name:
  449. description: Specify the name of the generator resource
  450. maxLength: 253
  451. minLength: 1
  452. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  453. type: string
  454. required:
  455. - kind
  456. - name
  457. type: object
  458. secret:
  459. description: Select a Secret to Push.
  460. properties:
  461. name:
  462. description: |-
  463. Name of the Secret.
  464. The Secret must exist in the same namespace as the PushSecret manifest.
  465. maxLength: 253
  466. minLength: 1
  467. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  468. type: string
  469. selector:
  470. description: Selector chooses secrets using a labelSelector.
  471. properties:
  472. matchExpressions:
  473. description: matchExpressions is a list of label selector
  474. requirements. The requirements are ANDed.
  475. items:
  476. description: |-
  477. A label selector requirement is a selector that contains values, a key, and an operator that
  478. relates the key and values.
  479. properties:
  480. key:
  481. description: key is the label key that the selector
  482. applies to.
  483. type: string
  484. operator:
  485. description: |-
  486. operator represents a key's relationship to a set of values.
  487. Valid operators are In, NotIn, Exists and DoesNotExist.
  488. type: string
  489. values:
  490. description: |-
  491. values is an array of string values. If the operator is In or NotIn,
  492. the values array must be non-empty. If the operator is Exists or DoesNotExist,
  493. the values array must be empty. This array is replaced during a strategic
  494. merge patch.
  495. items:
  496. type: string
  497. type: array
  498. x-kubernetes-list-type: atomic
  499. required:
  500. - key
  501. - operator
  502. type: object
  503. type: array
  504. x-kubernetes-list-type: atomic
  505. matchLabels:
  506. additionalProperties:
  507. type: string
  508. description: |-
  509. matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
  510. map is equivalent to an element of matchExpressions, whose key field is "key", the
  511. operator is "In", and the values array contains only "value". The requirements are ANDed.
  512. type: object
  513. type: object
  514. x-kubernetes-map-type: atomic
  515. type: object
  516. type: object
  517. template:
  518. description: Template defines a blueprint for the created Secret
  519. resource.
  520. properties:
  521. data:
  522. additionalProperties:
  523. type: string
  524. type: object
  525. engineVersion:
  526. default: v2
  527. description: |-
  528. EngineVersion specifies the template engine version
  529. that should be used to compile/execute the
  530. template specified in .data and .templateFrom[].
  531. enum:
  532. - v2
  533. type: string
  534. mergePolicy:
  535. default: Replace
  536. description: TemplateMergePolicy defines how the rendered
  537. template should be merged with the existing Secret data.
  538. enum:
  539. - Replace
  540. - Merge
  541. type: string
  542. metadata:
  543. description: ExternalSecretTemplateMetadata defines metadata
  544. fields for the Secret blueprint.
  545. properties:
  546. annotations:
  547. additionalProperties:
  548. type: string
  549. type: object
  550. finalizers:
  551. items:
  552. type: string
  553. type: array
  554. labels:
  555. additionalProperties:
  556. type: string
  557. type: object
  558. type: object
  559. templateFrom:
  560. items:
  561. description: |-
  562. TemplateFrom specifies a source for templates.
  563. Each item in the list can either reference a ConfigMap or a Secret resource.
  564. properties:
  565. configMap:
  566. description: TemplateRef specifies a reference to either
  567. a ConfigMap or a Secret resource.
  568. properties:
  569. items:
  570. description: A list of keys in the ConfigMap/Secret
  571. to use as templates for Secret data
  572. items:
  573. description: TemplateRefItem specifies a key in
  574. the ConfigMap/Secret to use as a template for
  575. Secret data.
  576. properties:
  577. key:
  578. description: A key in the ConfigMap/Secret
  579. maxLength: 253
  580. minLength: 1
  581. pattern: ^[-._a-zA-Z0-9]+$
  582. type: string
  583. templateAs:
  584. default: Values
  585. description: TemplateScope specifies how the
  586. template keys should be interpreted.
  587. enum:
  588. - Values
  589. - KeysAndValues
  590. type: string
  591. required:
  592. - key
  593. type: object
  594. type: array
  595. name:
  596. description: The name of the ConfigMap/Secret resource
  597. maxLength: 253
  598. minLength: 1
  599. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  600. type: string
  601. required:
  602. - items
  603. - name
  604. type: object
  605. literal:
  606. type: string
  607. secret:
  608. description: TemplateRef specifies a reference to either
  609. a ConfigMap or a Secret resource.
  610. properties:
  611. items:
  612. description: A list of keys in the ConfigMap/Secret
  613. to use as templates for Secret data
  614. items:
  615. description: TemplateRefItem specifies a key in
  616. the ConfigMap/Secret to use as a template for
  617. Secret data.
  618. properties:
  619. key:
  620. description: A key in the ConfigMap/Secret
  621. maxLength: 253
  622. minLength: 1
  623. pattern: ^[-._a-zA-Z0-9]+$
  624. type: string
  625. templateAs:
  626. default: Values
  627. description: TemplateScope specifies how the
  628. template keys should be interpreted.
  629. enum:
  630. - Values
  631. - KeysAndValues
  632. type: string
  633. required:
  634. - key
  635. type: object
  636. type: array
  637. name:
  638. description: The name of the ConfigMap/Secret resource
  639. maxLength: 253
  640. minLength: 1
  641. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  642. type: string
  643. required:
  644. - items
  645. - name
  646. type: object
  647. target:
  648. default: Data
  649. description: |-
  650. Target specifies where to place the template result.
  651. For Secret resources, common values are: "Data", "Annotations", "Labels".
  652. For custom resources (when spec.target.manifest is set), this supports
  653. nested paths like "spec.database.config" or "data".
  654. type: string
  655. valuesDecodingStrategy:
  656. default: None
  657. description: Used to define a decoding Strategy for
  658. the rendered template values.
  659. enum:
  660. - Auto
  661. - Base64
  662. - Base64URL
  663. - None
  664. type: string
  665. type: object
  666. type: array
  667. type:
  668. type: string
  669. type: object
  670. updatePolicy:
  671. default: Replace
  672. description: UpdatePolicy to handle Secrets in the provider.
  673. enum:
  674. - Replace
  675. - IfNotExists
  676. type: string
  677. required:
  678. - secretStoreRefs
  679. - selector
  680. type: object
  681. refreshTime:
  682. description: The time in which the controller should reconcile its
  683. objects and recheck namespaces for labels.
  684. type: string
  685. required:
  686. - pushSecretSpec
  687. type: object
  688. status:
  689. description: ClusterPushSecretStatus contains the status information for
  690. the ClusterPushSecret resource.
  691. properties:
  692. conditions:
  693. items:
  694. description: PushSecretStatusCondition indicates the status of the
  695. PushSecret.
  696. properties:
  697. lastTransitionTime:
  698. format: date-time
  699. type: string
  700. message:
  701. type: string
  702. reason:
  703. type: string
  704. status:
  705. type: string
  706. type:
  707. description: PushSecretConditionType indicates the condition
  708. of the PushSecret.
  709. type: string
  710. required:
  711. - status
  712. - type
  713. type: object
  714. type: array
  715. failedNamespaces:
  716. description: Failed namespaces are the namespaces that failed to apply
  717. an PushSecret
  718. items:
  719. description: ClusterPushSecretNamespaceFailure represents a failed
  720. namespace deployment and it's reason.
  721. properties:
  722. namespace:
  723. description: Namespace is the namespace that failed when trying
  724. to apply an PushSecret
  725. type: string
  726. reason:
  727. description: Reason is why the PushSecret failed to apply to
  728. the namespace
  729. type: string
  730. required:
  731. - namespace
  732. type: object
  733. type: array
  734. provisionedNamespaces:
  735. description: ProvisionedNamespaces are the namespaces where the ClusterPushSecret
  736. has secrets
  737. items:
  738. type: string
  739. type: array
  740. pushSecretName:
  741. type: string
  742. type: object
  743. type: object
  744. served: true
  745. storage: true
  746. subresources:
  747. status: {}