external-secrets.io_clusterpushsecrets.yaml 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  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. - ClusterGenerator
  432. - CloudsmithAccessToken
  433. - ECRAuthorizationToken
  434. - Fake
  435. - GCRAccessToken
  436. - GithubAccessToken
  437. - QuayAccessToken
  438. - Password
  439. - SSHKey
  440. - STSSessionToken
  441. - UUID
  442. - VaultDynamicSecret
  443. - Webhook
  444. - Grafana
  445. - MFA
  446. type: string
  447. name:
  448. description: Specify the name of the generator resource
  449. maxLength: 253
  450. minLength: 1
  451. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  452. type: string
  453. required:
  454. - kind
  455. - name
  456. type: object
  457. secret:
  458. description: Select a Secret to Push.
  459. properties:
  460. name:
  461. description: |-
  462. Name of the Secret.
  463. The Secret must exist in the same namespace as the PushSecret manifest.
  464. maxLength: 253
  465. minLength: 1
  466. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  467. type: string
  468. selector:
  469. description: Selector chooses secrets using a labelSelector.
  470. properties:
  471. matchExpressions:
  472. description: matchExpressions is a list of label selector
  473. requirements. The requirements are ANDed.
  474. items:
  475. description: |-
  476. A label selector requirement is a selector that contains values, a key, and an operator that
  477. relates the key and values.
  478. properties:
  479. key:
  480. description: key is the label key that the selector
  481. applies to.
  482. type: string
  483. operator:
  484. description: |-
  485. operator represents a key's relationship to a set of values.
  486. Valid operators are In, NotIn, Exists and DoesNotExist.
  487. type: string
  488. values:
  489. description: |-
  490. values is an array of string values. If the operator is In or NotIn,
  491. the values array must be non-empty. If the operator is Exists or DoesNotExist,
  492. the values array must be empty. This array is replaced during a strategic
  493. merge patch.
  494. items:
  495. type: string
  496. type: array
  497. x-kubernetes-list-type: atomic
  498. required:
  499. - key
  500. - operator
  501. type: object
  502. type: array
  503. x-kubernetes-list-type: atomic
  504. matchLabels:
  505. additionalProperties:
  506. type: string
  507. description: |-
  508. matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
  509. map is equivalent to an element of matchExpressions, whose key field is "key", the
  510. operator is "In", and the values array contains only "value". The requirements are ANDed.
  511. type: object
  512. type: object
  513. x-kubernetes-map-type: atomic
  514. type: object
  515. type: object
  516. template:
  517. description: Template defines a blueprint for the created Secret
  518. resource.
  519. properties:
  520. data:
  521. additionalProperties:
  522. type: string
  523. type: object
  524. engineVersion:
  525. default: v2
  526. description: |-
  527. EngineVersion specifies the template engine version
  528. that should be used to compile/execute the
  529. template specified in .data and .templateFrom[].
  530. enum:
  531. - v2
  532. type: string
  533. mergePolicy:
  534. default: Replace
  535. description: TemplateMergePolicy defines how the rendered
  536. template should be merged with the existing Secret data.
  537. enum:
  538. - Replace
  539. - Merge
  540. type: string
  541. metadata:
  542. description: ExternalSecretTemplateMetadata defines metadata
  543. fields for the Secret blueprint.
  544. properties:
  545. annotations:
  546. additionalProperties:
  547. type: string
  548. type: object
  549. finalizers:
  550. items:
  551. type: string
  552. type: array
  553. labels:
  554. additionalProperties:
  555. type: string
  556. type: object
  557. type: object
  558. templateFrom:
  559. items:
  560. description: |-
  561. TemplateFrom specifies a source for templates.
  562. Each item in the list can either reference a ConfigMap or a Secret resource.
  563. properties:
  564. configMap:
  565. description: TemplateRef specifies a reference to either
  566. a ConfigMap or a Secret resource.
  567. properties:
  568. items:
  569. description: A list of keys in the ConfigMap/Secret
  570. to use as templates for Secret data
  571. items:
  572. description: TemplateRefItem specifies a key in
  573. the ConfigMap/Secret to use as a template for
  574. Secret data.
  575. properties:
  576. key:
  577. description: A key in the ConfigMap/Secret
  578. maxLength: 253
  579. minLength: 1
  580. pattern: ^[-._a-zA-Z0-9]+$
  581. type: string
  582. templateAs:
  583. default: Values
  584. description: TemplateScope specifies how the
  585. template keys should be interpreted.
  586. enum:
  587. - Values
  588. - KeysAndValues
  589. type: string
  590. required:
  591. - key
  592. type: object
  593. type: array
  594. name:
  595. description: The name of the ConfigMap/Secret resource
  596. maxLength: 253
  597. minLength: 1
  598. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  599. type: string
  600. required:
  601. - items
  602. - name
  603. type: object
  604. literal:
  605. type: string
  606. secret:
  607. description: TemplateRef specifies a reference to either
  608. a ConfigMap or a Secret resource.
  609. properties:
  610. items:
  611. description: A list of keys in the ConfigMap/Secret
  612. to use as templates for Secret data
  613. items:
  614. description: TemplateRefItem specifies a key in
  615. the ConfigMap/Secret to use as a template for
  616. Secret data.
  617. properties:
  618. key:
  619. description: A key in the ConfigMap/Secret
  620. maxLength: 253
  621. minLength: 1
  622. pattern: ^[-._a-zA-Z0-9]+$
  623. type: string
  624. templateAs:
  625. default: Values
  626. description: TemplateScope specifies how the
  627. template keys should be interpreted.
  628. enum:
  629. - Values
  630. - KeysAndValues
  631. type: string
  632. required:
  633. - key
  634. type: object
  635. type: array
  636. name:
  637. description: The name of the ConfigMap/Secret resource
  638. maxLength: 253
  639. minLength: 1
  640. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  641. type: string
  642. required:
  643. - items
  644. - name
  645. type: object
  646. target:
  647. default: Data
  648. description: |-
  649. Target specifies where to place the template result.
  650. For Secret resources, common values are: "Data", "Annotations", "Labels".
  651. For custom resources (when spec.target.manifest is set), this supports
  652. nested paths like "spec.database.config" or "data".
  653. type: string
  654. type: object
  655. type: array
  656. type:
  657. type: string
  658. type: object
  659. updatePolicy:
  660. default: Replace
  661. description: UpdatePolicy to handle Secrets in the provider.
  662. enum:
  663. - Replace
  664. - IfNotExists
  665. type: string
  666. required:
  667. - secretStoreRefs
  668. - selector
  669. type: object
  670. refreshTime:
  671. description: The time in which the controller should reconcile its
  672. objects and recheck namespaces for labels.
  673. type: string
  674. required:
  675. - pushSecretSpec
  676. type: object
  677. status:
  678. description: ClusterPushSecretStatus contains the status information for
  679. the ClusterPushSecret resource.
  680. properties:
  681. conditions:
  682. items:
  683. description: PushSecretStatusCondition indicates the status of the
  684. PushSecret.
  685. properties:
  686. lastTransitionTime:
  687. format: date-time
  688. type: string
  689. message:
  690. type: string
  691. reason:
  692. type: string
  693. status:
  694. type: string
  695. type:
  696. description: PushSecretConditionType indicates the condition
  697. of the PushSecret.
  698. type: string
  699. required:
  700. - status
  701. - type
  702. type: object
  703. type: array
  704. failedNamespaces:
  705. description: Failed namespaces are the namespaces that failed to apply
  706. an PushSecret
  707. items:
  708. description: ClusterPushSecretNamespaceFailure represents a failed
  709. namespace deployment and it's reason.
  710. properties:
  711. namespace:
  712. description: Namespace is the namespace that failed when trying
  713. to apply an PushSecret
  714. type: string
  715. reason:
  716. description: Reason is why the PushSecret failed to apply to
  717. the namespace
  718. type: string
  719. required:
  720. - namespace
  721. type: object
  722. type: array
  723. provisionedNamespaces:
  724. description: ProvisionedNamespaces are the namespaces where the ClusterPushSecret
  725. has secrets
  726. items:
  727. type: string
  728. type: array
  729. pushSecretName:
  730. type: string
  731. type: object
  732. type: object
  733. served: true
  734. storage: true
  735. subresources:
  736. status: {}