external-secrets.io_pushsecrets.yaml 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  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. - BeyondtrustWorkloadCredentialsDynamicSecret
  355. - ClusterGenerator
  356. - CloudsmithAccessToken
  357. - ECRAuthorizationToken
  358. - Fake
  359. - GCRAccessToken
  360. - GithubAccessToken
  361. - QuayAccessToken
  362. - Password
  363. - SSHKey
  364. - STSSessionToken
  365. - UUID
  366. - VaultDynamicSecret
  367. - Webhook
  368. - Grafana
  369. - MFA
  370. type: string
  371. name:
  372. description: Specify the name of the generator resource
  373. maxLength: 253
  374. minLength: 1
  375. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  376. type: string
  377. required:
  378. - kind
  379. - name
  380. type: object
  381. secret:
  382. description: Select a Secret to Push.
  383. properties:
  384. name:
  385. description: |-
  386. Name of the Secret.
  387. The Secret must exist in the same namespace as the PushSecret manifest.
  388. maxLength: 253
  389. minLength: 1
  390. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  391. type: string
  392. selector:
  393. description: Selector chooses secrets using a labelSelector.
  394. properties:
  395. matchExpressions:
  396. description: matchExpressions is a list of label selector
  397. requirements. The requirements are ANDed.
  398. items:
  399. description: |-
  400. A label selector requirement is a selector that contains values, a key, and an operator that
  401. relates the key and values.
  402. properties:
  403. key:
  404. description: key is the label key that the selector
  405. applies to.
  406. type: string
  407. operator:
  408. description: |-
  409. operator represents a key's relationship to a set of values.
  410. Valid operators are In, NotIn, Exists and DoesNotExist.
  411. type: string
  412. values:
  413. description: |-
  414. values is an array of string values. If the operator is In or NotIn,
  415. the values array must be non-empty. If the operator is Exists or DoesNotExist,
  416. the values array must be empty. This array is replaced during a strategic
  417. merge patch.
  418. items:
  419. type: string
  420. type: array
  421. x-kubernetes-list-type: atomic
  422. required:
  423. - key
  424. - operator
  425. type: object
  426. type: array
  427. x-kubernetes-list-type: atomic
  428. matchLabels:
  429. additionalProperties:
  430. type: string
  431. description: |-
  432. matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
  433. map is equivalent to an element of matchExpressions, whose key field is "key", the
  434. operator is "In", and the values array contains only "value". The requirements are ANDed.
  435. type: object
  436. type: object
  437. x-kubernetes-map-type: atomic
  438. type: object
  439. type: object
  440. template:
  441. description: Template defines a blueprint for the created Secret resource.
  442. properties:
  443. data:
  444. additionalProperties:
  445. type: string
  446. type: object
  447. engineVersion:
  448. default: v2
  449. description: |-
  450. EngineVersion specifies the template engine version
  451. that should be used to compile/execute the
  452. template specified in .data and .templateFrom[].
  453. enum:
  454. - v2
  455. type: string
  456. mergePolicy:
  457. default: Replace
  458. description: TemplateMergePolicy defines how the rendered template
  459. should be merged with the existing Secret data.
  460. enum:
  461. - Replace
  462. - Merge
  463. type: string
  464. metadata:
  465. description: ExternalSecretTemplateMetadata defines metadata fields
  466. for the Secret blueprint.
  467. properties:
  468. annotations:
  469. additionalProperties:
  470. type: string
  471. type: object
  472. finalizers:
  473. items:
  474. type: string
  475. type: array
  476. labels:
  477. additionalProperties:
  478. type: string
  479. type: object
  480. type: object
  481. templateFrom:
  482. items:
  483. description: |-
  484. TemplateFrom specifies a source for templates.
  485. Each item in the list can either reference a ConfigMap or a Secret resource.
  486. properties:
  487. configMap:
  488. description: TemplateRef specifies a reference to either
  489. a ConfigMap or a Secret resource.
  490. properties:
  491. items:
  492. description: A list of keys in the ConfigMap/Secret
  493. to use as templates for Secret data
  494. items:
  495. description: TemplateRefItem specifies a key in the
  496. ConfigMap/Secret to use as a template for Secret
  497. data.
  498. properties:
  499. key:
  500. description: A key in the ConfigMap/Secret
  501. maxLength: 253
  502. minLength: 1
  503. pattern: ^[-._a-zA-Z0-9]+$
  504. type: string
  505. templateAs:
  506. default: Values
  507. description: TemplateScope specifies how the template
  508. keys should be interpreted.
  509. enum:
  510. - Values
  511. - KeysAndValues
  512. type: string
  513. required:
  514. - key
  515. type: object
  516. type: array
  517. name:
  518. description: The name of the ConfigMap/Secret resource
  519. maxLength: 253
  520. minLength: 1
  521. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  522. type: string
  523. required:
  524. - items
  525. - name
  526. type: object
  527. literal:
  528. type: string
  529. secret:
  530. description: TemplateRef specifies a reference to either
  531. a ConfigMap or a Secret resource.
  532. properties:
  533. items:
  534. description: A list of keys in the ConfigMap/Secret
  535. to use as templates for Secret data
  536. items:
  537. description: TemplateRefItem specifies a key in the
  538. ConfigMap/Secret to use as a template for Secret
  539. data.
  540. properties:
  541. key:
  542. description: A key in the ConfigMap/Secret
  543. maxLength: 253
  544. minLength: 1
  545. pattern: ^[-._a-zA-Z0-9]+$
  546. type: string
  547. templateAs:
  548. default: Values
  549. description: TemplateScope specifies how the template
  550. keys should be interpreted.
  551. enum:
  552. - Values
  553. - KeysAndValues
  554. type: string
  555. required:
  556. - key
  557. type: object
  558. type: array
  559. name:
  560. description: The name of the ConfigMap/Secret resource
  561. maxLength: 253
  562. minLength: 1
  563. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  564. type: string
  565. required:
  566. - items
  567. - name
  568. type: object
  569. target:
  570. default: Data
  571. description: |-
  572. Target specifies where to place the template result.
  573. For Secret resources, common values are: "Data", "Annotations", "Labels".
  574. For custom resources (when spec.target.manifest is set), this supports
  575. nested paths like "spec.database.config" or "data".
  576. type: string
  577. valuesDecodingStrategy:
  578. default: None
  579. description: Used to define a decoding Strategy for the
  580. rendered template values.
  581. enum:
  582. - Auto
  583. - Base64
  584. - Base64URL
  585. - None
  586. type: string
  587. type: object
  588. type: array
  589. type:
  590. type: string
  591. type: object
  592. updatePolicy:
  593. default: Replace
  594. description: UpdatePolicy to handle Secrets in the provider.
  595. enum:
  596. - Replace
  597. - IfNotExists
  598. type: string
  599. required:
  600. - secretStoreRefs
  601. - selector
  602. type: object
  603. status:
  604. description: PushSecretStatus indicates the history of the status of PushSecret.
  605. properties:
  606. conditions:
  607. items:
  608. description: PushSecretStatusCondition indicates the status of the
  609. PushSecret.
  610. properties:
  611. lastTransitionTime:
  612. format: date-time
  613. type: string
  614. message:
  615. type: string
  616. reason:
  617. type: string
  618. status:
  619. type: string
  620. type:
  621. description: PushSecretConditionType indicates the condition
  622. of the PushSecret.
  623. type: string
  624. required:
  625. - status
  626. - type
  627. type: object
  628. type: array
  629. refreshTime:
  630. description: |-
  631. refreshTime is the time and date the external secret was fetched and
  632. the target secret updated
  633. format: date-time
  634. nullable: true
  635. type: string
  636. syncedPushSecrets:
  637. additionalProperties:
  638. additionalProperties:
  639. description: PushSecretData defines data to be pushed to the provider
  640. and associated metadata.
  641. properties:
  642. conversionStrategy:
  643. default: None
  644. description: Used to define a conversion Strategy for the
  645. secret keys
  646. enum:
  647. - None
  648. - ReverseUnicode
  649. type: string
  650. match:
  651. description: Match a given Secret Key to be pushed to the
  652. provider.
  653. properties:
  654. remoteRef:
  655. description: Remote Refs to push to providers.
  656. properties:
  657. property:
  658. description: Name of the property in the resulting
  659. secret
  660. type: string
  661. remoteKey:
  662. description: Name of the resulting provider secret.
  663. type: string
  664. required:
  665. - remoteKey
  666. type: object
  667. secretKey:
  668. description: Secret Key to be pushed
  669. type: string
  670. required:
  671. - remoteRef
  672. type: object
  673. metadata:
  674. description: |-
  675. Metadata is metadata attached to the secret.
  676. The structure of metadata is provider specific, please look it up in the provider documentation.
  677. x-kubernetes-preserve-unknown-fields: true
  678. required:
  679. - match
  680. type: object
  681. type: object
  682. description: |-
  683. Synced PushSecrets, including secrets that already exist in provider.
  684. Matches secret stores to PushSecretData that was stored to that secret store.
  685. type: object
  686. syncedResourceVersion:
  687. description: SyncedResourceVersion keeps track of the last synced
  688. version.
  689. type: string
  690. type: object
  691. type: object
  692. served: true
  693. storage: true
  694. subresources:
  695. status: {}