external-secrets.io_pushsecrets.yaml 33 KB

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