external-secrets.io_pushsecrets.yaml 33 KB

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