cloudcoil.models.sealed-secrets 0.28.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ # Generated by cloudcoil-model-codegen v0.4.3
2
+ # DO NOT EDIT
3
+
4
+ from . import v1alpha1 as v1alpha1
File without changes
@@ -0,0 +1,657 @@
1
+ # Generated by cloudcoil-model-codegen v0.4.3
2
+ # DO NOT EDIT
3
+
4
+ from __future__ import annotations
5
+
6
+ from datetime import datetime
7
+ from typing import (
8
+ Annotated,
9
+ Callable,
10
+ Dict,
11
+ List,
12
+ Literal,
13
+ Optional,
14
+ Type,
15
+ overload,
16
+ )
17
+
18
+ from pydantic import Field
19
+
20
+ from cloudcoil import apimachinery
21
+ from cloudcoil.pydantic import (
22
+ BaseModel,
23
+ BaseModelBuilder,
24
+ BuilderContextBase,
25
+ GenericListBuilder,
26
+ ListBuilderContext,
27
+ Never,
28
+ Self,
29
+ )
30
+ from cloudcoil.resources import Resource
31
+
32
+
33
+ class Metadata(BaseModel):
34
+ class Builder(BaseModelBuilder):
35
+ @property
36
+ def cls(self) -> Type["Metadata"]:
37
+ return Metadata
38
+
39
+ def build(self) -> "Metadata":
40
+ return Metadata(**self._attrs)
41
+
42
+ def annotations(self, value: Optional[Dict[str, str]], /) -> Self:
43
+ return self._set("annotations", value)
44
+
45
+ def finalizers(self, value: Optional[List[str]], /) -> Self:
46
+ return self._set("finalizers", value)
47
+
48
+ def labels(self, value: Optional[Dict[str, str]], /) -> Self:
49
+ return self._set("labels", value)
50
+
51
+ def name(self, value: Optional[str], /) -> Self:
52
+ return self._set("name", value)
53
+
54
+ def namespace(self, value: Optional[str], /) -> Self:
55
+ return self._set("namespace", value)
56
+
57
+ class BuilderContext(BuilderContextBase["Metadata.Builder"]):
58
+ def model_post_init(self, __context) -> None:
59
+ self._builder = Metadata.Builder()
60
+ self._builder._in_context = True
61
+ self._parent_builder = None
62
+ self._field_name = None
63
+
64
+ @classmethod
65
+ def builder(cls) -> Builder:
66
+ return cls.Builder()
67
+
68
+ @classmethod
69
+ def new(cls) -> BuilderContext:
70
+ """Creates a new context manager builder for Metadata."""
71
+ return cls.BuilderContext()
72
+
73
+ class ListBuilder(GenericListBuilder["Metadata", Builder]):
74
+ def __init__(self):
75
+ raise NotImplementedError(
76
+ "This class is not meant to be instantiated. Use Metadata.list_builder() instead."
77
+ )
78
+
79
+ @classmethod
80
+ def list_builder(cls) -> ListBuilder:
81
+ return GenericListBuilder[cls, cls.Builder]() # type: ignore
82
+
83
+ annotations: Optional[Dict[str, str]] = None
84
+ finalizers: Optional[List[str]] = None
85
+ labels: Optional[Dict[str, str]] = None
86
+ name: Optional[str] = None
87
+ namespace: Optional[str] = None
88
+
89
+
90
+ class Template(BaseModel):
91
+ class Builder(BaseModelBuilder):
92
+ @property
93
+ def cls(self) -> Type["Template"]:
94
+ return Template
95
+
96
+ def build(self) -> "Template":
97
+ return Template(**self._attrs)
98
+
99
+ def data(self, value: Optional[Dict[str, str]], /) -> Self:
100
+ """
101
+ Keys that should be templated using decrypted data.
102
+ """
103
+ return self._set("data", value)
104
+
105
+ def immutable(self, value: Optional[bool], /) -> Self:
106
+ """
107
+ Immutable, if set to true, ensures that data stored in the Secret cannot
108
+ be updated (only object metadata can be modified).
109
+ If not set to true, the field can be modified at any time.
110
+ Defaulted to nil.
111
+ """
112
+ return self._set("immutable", value)
113
+
114
+ @overload
115
+ def metadata(self, value_or_callback: Optional[Metadata], /) -> "Template.Builder": ...
116
+
117
+ @overload
118
+ def metadata(
119
+ self,
120
+ value_or_callback: Callable[[Metadata.Builder], Metadata.Builder | Metadata],
121
+ /,
122
+ ) -> "Template.Builder": ...
123
+
124
+ @overload
125
+ def metadata(self, value_or_callback: Never = ...) -> "Metadata.BuilderContext": ...
126
+
127
+ def metadata(self, value_or_callback=None, /):
128
+ """
129
+ Standard object's metadata.
130
+ More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
131
+ """
132
+ if self._in_context and value_or_callback is None:
133
+ context = Metadata.BuilderContext()
134
+ context._parent_builder = self
135
+ context._field_name = "metadata"
136
+ return context
137
+
138
+ value = value_or_callback
139
+ if callable(value_or_callback):
140
+ output = value_or_callback(Metadata.builder())
141
+ if isinstance(output, Metadata.Builder):
142
+ value = output.build()
143
+ else:
144
+ value = output
145
+ return self._set("metadata", value)
146
+
147
+ def type(self, value: Optional[str], /) -> Self:
148
+ """
149
+ Used to facilitate programmatic handling of secret data.
150
+ """
151
+ return self._set("type", value)
152
+
153
+ class BuilderContext(BuilderContextBase["Template.Builder"]):
154
+ def model_post_init(self, __context) -> None:
155
+ self._builder = Template.Builder()
156
+ self._builder._in_context = True
157
+ self._parent_builder = None
158
+ self._field_name = None
159
+
160
+ @classmethod
161
+ def builder(cls) -> Builder:
162
+ return cls.Builder()
163
+
164
+ @classmethod
165
+ def new(cls) -> BuilderContext:
166
+ """Creates a new context manager builder for Template."""
167
+ return cls.BuilderContext()
168
+
169
+ class ListBuilder(GenericListBuilder["Template", Builder]):
170
+ def __init__(self):
171
+ raise NotImplementedError(
172
+ "This class is not meant to be instantiated. Use Template.list_builder() instead."
173
+ )
174
+
175
+ @classmethod
176
+ def list_builder(cls) -> ListBuilder:
177
+ return GenericListBuilder[cls, cls.Builder]() # type: ignore
178
+
179
+ data: Optional[Dict[str, str]] = None
180
+ """
181
+ Keys that should be templated using decrypted data.
182
+ """
183
+ immutable: Optional[bool] = None
184
+ """
185
+ Immutable, if set to true, ensures that data stored in the Secret cannot
186
+ be updated (only object metadata can be modified).
187
+ If not set to true, the field can be modified at any time.
188
+ Defaulted to nil.
189
+ """
190
+ metadata: Optional[Metadata] = None
191
+ """
192
+ Standard object's metadata.
193
+ More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
194
+ """
195
+ type: Optional[str] = None
196
+ """
197
+ Used to facilitate programmatic handling of secret data.
198
+ """
199
+
200
+
201
+ class SealedSecretSpec(BaseModel):
202
+ class Builder(BaseModelBuilder):
203
+ @property
204
+ def cls(self) -> Type["SealedSecretSpec"]:
205
+ return SealedSecretSpec
206
+
207
+ def build(self) -> "SealedSecretSpec":
208
+ return SealedSecretSpec(**self._attrs)
209
+
210
+ def data(self, value: Optional[str], /) -> Self:
211
+ """
212
+ Data is deprecated and will be removed eventually. Use per-value EncryptedData instead.
213
+ """
214
+ return self._set("data", value)
215
+
216
+ def encrypted_data(self, value: Dict[str, str], /) -> Self:
217
+ return self._set("encrypted_data", value)
218
+
219
+ @overload
220
+ def template(
221
+ self, value_or_callback: Optional[Template], /
222
+ ) -> "SealedSecretSpec.Builder": ...
223
+
224
+ @overload
225
+ def template(
226
+ self,
227
+ value_or_callback: Callable[[Template.Builder], Template.Builder | Template],
228
+ /,
229
+ ) -> "SealedSecretSpec.Builder": ...
230
+
231
+ @overload
232
+ def template(self, value_or_callback: Never = ...) -> "Template.BuilderContext": ...
233
+
234
+ def template(self, value_or_callback=None, /):
235
+ """
236
+ Template defines the structure of the Secret that will be
237
+ created from this sealed secret.
238
+ """
239
+ if self._in_context and value_or_callback is None:
240
+ context = Template.BuilderContext()
241
+ context._parent_builder = self
242
+ context._field_name = "template"
243
+ return context
244
+
245
+ value = value_or_callback
246
+ if callable(value_or_callback):
247
+ output = value_or_callback(Template.builder())
248
+ if isinstance(output, Template.Builder):
249
+ value = output.build()
250
+ else:
251
+ value = output
252
+ return self._set("template", value)
253
+
254
+ class BuilderContext(BuilderContextBase["SealedSecretSpec.Builder"]):
255
+ def model_post_init(self, __context) -> None:
256
+ self._builder = SealedSecretSpec.Builder()
257
+ self._builder._in_context = True
258
+ self._parent_builder = None
259
+ self._field_name = None
260
+
261
+ @classmethod
262
+ def builder(cls) -> Builder:
263
+ return cls.Builder()
264
+
265
+ @classmethod
266
+ def new(cls) -> BuilderContext:
267
+ """Creates a new context manager builder for SealedSecretSpec."""
268
+ return cls.BuilderContext()
269
+
270
+ class ListBuilder(GenericListBuilder["SealedSecretSpec", Builder]):
271
+ def __init__(self):
272
+ raise NotImplementedError(
273
+ "This class is not meant to be instantiated. Use SealedSecretSpec.list_builder() instead."
274
+ )
275
+
276
+ @classmethod
277
+ def list_builder(cls) -> ListBuilder:
278
+ return GenericListBuilder[cls, cls.Builder]() # type: ignore
279
+
280
+ data: Optional[str] = None
281
+ """
282
+ Data is deprecated and will be removed eventually. Use per-value EncryptedData instead.
283
+ """
284
+ encrypted_data: Annotated[Dict[str, str], Field(alias="encryptedData")]
285
+ template: Optional[Template] = None
286
+ """
287
+ Template defines the structure of the Secret that will be
288
+ created from this sealed secret.
289
+ """
290
+
291
+
292
+ class Condition(BaseModel):
293
+ class Builder(BaseModelBuilder):
294
+ @property
295
+ def cls(self) -> Type["Condition"]:
296
+ return Condition
297
+
298
+ def build(self) -> "Condition":
299
+ return Condition(**self._attrs)
300
+
301
+ def last_transition_time(self, value: Optional[datetime], /) -> Self:
302
+ """
303
+ Last time the condition transitioned from one status to another.
304
+ """
305
+ return self._set("last_transition_time", value)
306
+
307
+ def last_update_time(self, value: Optional[datetime], /) -> Self:
308
+ """
309
+ The last time this condition was updated.
310
+ """
311
+ return self._set("last_update_time", value)
312
+
313
+ def message(self, value: Optional[str], /) -> Self:
314
+ """
315
+ A human readable message indicating details about the transition.
316
+ """
317
+ return self._set("message", value)
318
+
319
+ def reason(self, value: Optional[str], /) -> Self:
320
+ """
321
+ The reason for the condition's last transition.
322
+ """
323
+ return self._set("reason", value)
324
+
325
+ def status(self, value: str, /) -> Self:
326
+ """
327
+ Status of the condition for a sealed secret.
328
+ Valid values for "Synced": "True", "False", or "Unknown".
329
+ """
330
+ return self._set("status", value)
331
+
332
+ def type(self, value: str, /) -> Self:
333
+ """
334
+ Type of condition for a sealed secret.
335
+ Valid value: "Synced"
336
+ """
337
+ return self._set("type", value)
338
+
339
+ class BuilderContext(BuilderContextBase["Condition.Builder"]):
340
+ def model_post_init(self, __context) -> None:
341
+ self._builder = Condition.Builder()
342
+ self._builder._in_context = True
343
+ self._parent_builder = None
344
+ self._field_name = None
345
+
346
+ @classmethod
347
+ def builder(cls) -> Builder:
348
+ return cls.Builder()
349
+
350
+ @classmethod
351
+ def new(cls) -> BuilderContext:
352
+ """Creates a new context manager builder for Condition."""
353
+ return cls.BuilderContext()
354
+
355
+ class ListBuilder(GenericListBuilder["Condition", Builder]):
356
+ def __init__(self):
357
+ raise NotImplementedError(
358
+ "This class is not meant to be instantiated. Use Condition.list_builder() instead."
359
+ )
360
+
361
+ @classmethod
362
+ def list_builder(cls) -> ListBuilder:
363
+ return GenericListBuilder[cls, cls.Builder]() # type: ignore
364
+
365
+ last_transition_time: Annotated[Optional[datetime], Field(alias="lastTransitionTime")] = None
366
+ """
367
+ Last time the condition transitioned from one status to another.
368
+ """
369
+ last_update_time: Annotated[Optional[datetime], Field(alias="lastUpdateTime")] = None
370
+ """
371
+ The last time this condition was updated.
372
+ """
373
+ message: Optional[str] = None
374
+ """
375
+ A human readable message indicating details about the transition.
376
+ """
377
+ reason: Optional[str] = None
378
+ """
379
+ The reason for the condition's last transition.
380
+ """
381
+ status: str
382
+ """
383
+ Status of the condition for a sealed secret.
384
+ Valid values for "Synced": "True", "False", or "Unknown".
385
+ """
386
+ type: str
387
+ """
388
+ Type of condition for a sealed secret.
389
+ Valid value: "Synced"
390
+ """
391
+
392
+
393
+ class SealedSecretStatus(BaseModel):
394
+ class Builder(BaseModelBuilder):
395
+ @property
396
+ def cls(self) -> Type["SealedSecretStatus"]:
397
+ return SealedSecretStatus
398
+
399
+ def build(self) -> "SealedSecretStatus":
400
+ return SealedSecretStatus(**self._attrs)
401
+
402
+ @overload
403
+ def conditions(
404
+ self, value_or_callback: List[Condition], /
405
+ ) -> "SealedSecretStatus.Builder": ...
406
+
407
+ @overload
408
+ def conditions(
409
+ self,
410
+ value_or_callback: Callable[
411
+ [GenericListBuilder[Condition, Condition.Builder]],
412
+ GenericListBuilder[Condition, Condition.Builder] | List[Condition],
413
+ ],
414
+ /,
415
+ ) -> "SealedSecretStatus.Builder": ...
416
+
417
+ @overload
418
+ def conditions(
419
+ self, value_or_callback: Never = ...
420
+ ) -> ListBuilderContext[Condition.Builder]: ...
421
+
422
+ def conditions(self, value_or_callback=None, /):
423
+ """
424
+ Represents the latest available observations of a sealed secret's current state.
425
+ """
426
+ if self._in_context and value_or_callback is None:
427
+ context = ListBuilderContext[Condition.Builder]()
428
+ context._parent_builder = self
429
+ context._field_name = "conditions"
430
+ return context
431
+
432
+ value = value_or_callback
433
+ if callable(value_or_callback):
434
+ output = value_or_callback(Condition.list_builder())
435
+ if isinstance(output, GenericListBuilder):
436
+ value = output.build()
437
+ else:
438
+ value = output
439
+ return self._set("conditions", value)
440
+
441
+ def observed_generation(self, value: Optional[int], /) -> Self:
442
+ """
443
+ ObservedGeneration reflects the generation most recently observed by the sealed-secrets controller.
444
+ """
445
+ return self._set("observed_generation", value)
446
+
447
+ class BuilderContext(BuilderContextBase["SealedSecretStatus.Builder"]):
448
+ def model_post_init(self, __context) -> None:
449
+ self._builder = SealedSecretStatus.Builder()
450
+ self._builder._in_context = True
451
+ self._parent_builder = None
452
+ self._field_name = None
453
+
454
+ @classmethod
455
+ def builder(cls) -> Builder:
456
+ return cls.Builder()
457
+
458
+ @classmethod
459
+ def new(cls) -> BuilderContext:
460
+ """Creates a new context manager builder for SealedSecretStatus."""
461
+ return cls.BuilderContext()
462
+
463
+ class ListBuilder(GenericListBuilder["SealedSecretStatus", Builder]):
464
+ def __init__(self):
465
+ raise NotImplementedError(
466
+ "This class is not meant to be instantiated. Use SealedSecretStatus.list_builder() instead."
467
+ )
468
+
469
+ @classmethod
470
+ def list_builder(cls) -> ListBuilder:
471
+ return GenericListBuilder[cls, cls.Builder]() # type: ignore
472
+
473
+ conditions: Optional[List[Condition]] = None
474
+ """
475
+ Represents the latest available observations of a sealed secret's current state.
476
+ """
477
+ observed_generation: Annotated[Optional[int], Field(alias="observedGeneration")] = None
478
+ """
479
+ ObservedGeneration reflects the generation most recently observed by the sealed-secrets controller.
480
+ """
481
+
482
+
483
+ class SealedSecret(Resource):
484
+ class Builder(BaseModelBuilder):
485
+ @property
486
+ def cls(self) -> Type["SealedSecret"]:
487
+ return SealedSecret
488
+
489
+ def build(self) -> "SealedSecret":
490
+ return SealedSecret(**self._attrs)
491
+
492
+ def api_version(self, value: Optional[Literal["bitnami.com/v1alpha1"]], /) -> Self:
493
+ """
494
+ APIVersion defines the versioned schema of this representation of an object.
495
+ Servers should convert recognized schemas to the latest internal value, and
496
+ may reject unrecognized values.
497
+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
498
+ """
499
+ return self._set("api_version", value)
500
+
501
+ def kind(self, value: Optional[Literal["SealedSecret"]], /) -> Self:
502
+ """
503
+ Kind is a string value representing the REST resource this object represents.
504
+ Servers may infer this from the endpoint the client submits requests to.
505
+ Cannot be updated.
506
+ In CamelCase.
507
+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
508
+ """
509
+ return self._set("kind", value)
510
+
511
+ @overload
512
+ def metadata(
513
+ self, value_or_callback: Optional[apimachinery.ObjectMeta], /
514
+ ) -> "SealedSecret.Builder": ...
515
+
516
+ @overload
517
+ def metadata(
518
+ self,
519
+ value_or_callback: Callable[
520
+ [apimachinery.ObjectMeta.Builder],
521
+ apimachinery.ObjectMeta.Builder | apimachinery.ObjectMeta,
522
+ ],
523
+ /,
524
+ ) -> "SealedSecret.Builder": ...
525
+
526
+ @overload
527
+ def metadata(
528
+ self, value_or_callback: Never = ...
529
+ ) -> "apimachinery.ObjectMeta.BuilderContext": ...
530
+
531
+ def metadata(self, value_or_callback=None, /):
532
+ if self._in_context and value_or_callback is None:
533
+ context = apimachinery.ObjectMeta.BuilderContext()
534
+ context._parent_builder = self
535
+ context._field_name = "metadata"
536
+ return context
537
+
538
+ value = value_or_callback
539
+ if callable(value_or_callback):
540
+ output = value_or_callback(apimachinery.ObjectMeta.builder())
541
+ if isinstance(output, apimachinery.ObjectMeta.Builder):
542
+ value = output.build()
543
+ else:
544
+ value = output
545
+ return self._set("metadata", value)
546
+
547
+ @overload
548
+ def spec(self, value_or_callback: SealedSecretSpec, /) -> "SealedSecret.Builder": ...
549
+
550
+ @overload
551
+ def spec(
552
+ self,
553
+ value_or_callback: Callable[
554
+ [SealedSecretSpec.Builder], SealedSecretSpec.Builder | SealedSecretSpec
555
+ ],
556
+ /,
557
+ ) -> "SealedSecret.Builder": ...
558
+
559
+ @overload
560
+ def spec(self, value_or_callback: Never = ...) -> "SealedSecretSpec.BuilderContext": ...
561
+
562
+ def spec(self, value_or_callback=None, /):
563
+ if self._in_context and value_or_callback is None:
564
+ context = SealedSecretSpec.BuilderContext()
565
+ context._parent_builder = self
566
+ context._field_name = "spec"
567
+ return context
568
+
569
+ value = value_or_callback
570
+ if callable(value_or_callback):
571
+ output = value_or_callback(SealedSecretSpec.builder())
572
+ if isinstance(output, SealedSecretSpec.Builder):
573
+ value = output.build()
574
+ else:
575
+ value = output
576
+ return self._set("spec", value)
577
+
578
+ @overload
579
+ def status(
580
+ self, value_or_callback: Optional[SealedSecretStatus], /
581
+ ) -> "SealedSecret.Builder": ...
582
+
583
+ @overload
584
+ def status(
585
+ self,
586
+ value_or_callback: Callable[
587
+ [SealedSecretStatus.Builder],
588
+ SealedSecretStatus.Builder | SealedSecretStatus,
589
+ ],
590
+ /,
591
+ ) -> "SealedSecret.Builder": ...
592
+
593
+ @overload
594
+ def status(self, value_or_callback: Never = ...) -> "SealedSecretStatus.BuilderContext": ...
595
+
596
+ def status(self, value_or_callback=None, /):
597
+ if self._in_context and value_or_callback is None:
598
+ context = SealedSecretStatus.BuilderContext()
599
+ context._parent_builder = self
600
+ context._field_name = "status"
601
+ return context
602
+
603
+ value = value_or_callback
604
+ if callable(value_or_callback):
605
+ output = value_or_callback(SealedSecretStatus.builder())
606
+ if isinstance(output, SealedSecretStatus.Builder):
607
+ value = output.build()
608
+ else:
609
+ value = output
610
+ return self._set("status", value)
611
+
612
+ class BuilderContext(BuilderContextBase["SealedSecret.Builder"]):
613
+ def model_post_init(self, __context) -> None:
614
+ self._builder = SealedSecret.Builder()
615
+ self._builder._in_context = True
616
+ self._parent_builder = None
617
+ self._field_name = None
618
+
619
+ @classmethod
620
+ def builder(cls) -> Builder:
621
+ return cls.Builder()
622
+
623
+ @classmethod
624
+ def new(cls) -> BuilderContext:
625
+ """Creates a new context manager builder for SealedSecret."""
626
+ return cls.BuilderContext()
627
+
628
+ class ListBuilder(GenericListBuilder["SealedSecret", Builder]):
629
+ def __init__(self):
630
+ raise NotImplementedError(
631
+ "This class is not meant to be instantiated. Use SealedSecret.list_builder() instead."
632
+ )
633
+
634
+ @classmethod
635
+ def list_builder(cls) -> ListBuilder:
636
+ return GenericListBuilder[cls, cls.Builder]() # type: ignore
637
+
638
+ api_version: Annotated[Optional[Literal["bitnami.com/v1alpha1"]], Field(alias="apiVersion")] = (
639
+ "bitnami.com/v1alpha1"
640
+ )
641
+ """
642
+ APIVersion defines the versioned schema of this representation of an object.
643
+ Servers should convert recognized schemas to the latest internal value, and
644
+ may reject unrecognized values.
645
+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
646
+ """
647
+ kind: Optional[Literal["SealedSecret"]] = "SealedSecret"
648
+ """
649
+ Kind is a string value representing the REST resource this object represents.
650
+ Servers may infer this from the endpoint the client submits requests to.
651
+ Cannot be updated.
652
+ In CamelCase.
653
+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
654
+ """
655
+ metadata: Optional[apimachinery.ObjectMeta] = None
656
+ spec: SealedSecretSpec
657
+ status: Optional[SealedSecretStatus] = None
@@ -0,0 +1,134 @@
1
+ Metadata-Version: 2.4
2
+ Name: cloudcoil.models.sealed_secrets
3
+ Version: 0.28.0.0
4
+ Summary: Versioned sealed-secrets models for cloudcoil
5
+ Project-URL: Homepage, https://github.com/cloudcoil/cloudcoil
6
+ Project-URL: Documentation, https://cloudcoil.github.io/cloudcoil
7
+ Project-URL: Repository, https://github.com/cloudcoil/models-sealed-secrets
8
+ Project-URL: Issues, https://github.com/cloudcoil/models-sealed-secrets/issues
9
+ Project-URL: Changelog, https://github.com/cloudcoil/models-sealed-secrets/releases
10
+ Author-email: Sambhav Kothari <sambhavs.email@gmail.com>
11
+ Maintainer-email: Sambhav Kothari <sambhavs.email@gmail.com>
12
+ License: Apache-2.0
13
+ License-File: LICENSE
14
+ Keywords: async,cloud-native,cloudcoil,cloudcoil-models,kubernetes,pydantic,python,sealed-secrets
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Requires-Python: >=3.10
20
+ Requires-Dist: cloudcoil>=0.4.0
21
+ Description-Content-Type: text/markdown
22
+
23
+ # cloudcoil-models-sealed-secrets
24
+
25
+ Versioned sealed-secrets models for cloudcoil.
26
+ > [!WARNING]
27
+ > This repository is auto-generated from the [cloudcoil repository](https://github.com/cloudcoil/cloudcoil/tree/main/models/sealed-secrets). Please do not submit pull requests here. Instead, submit them to the main repository at https://github.com/cloudcoil/cloudcoil.
28
+
29
+ ## 🔧 Installation
30
+
31
+ > [!NOTE]
32
+ > For versioning information and compatibility, see the [Versioning Guide](https://github.com/cloudcoil/cloudcoil/blob/main/VERSIONING.md).
33
+
34
+ Using [uv](https://github.com/astral-sh/uv) (recommended):
35
+
36
+ ```bash
37
+ # Install with Sealed Secrets support
38
+ uv add cloudcoil.models.sealed-secrets
39
+ ```
40
+
41
+ Using pip:
42
+
43
+ ```bash
44
+ pip install cloudcoil.models.sealed-secrets
45
+ ```
46
+
47
+ ## 💡 Examples
48
+
49
+ ### Using Sealed Secrets Models
50
+
51
+ ```python
52
+ from cloudcoil import apimachinery
53
+ import cloudcoil.models.sealed_secrets.v1alpha1 as sealed_secrets
54
+
55
+ # Create a SealedSecret
56
+ sealed_secret = sealed_secrets.SealedSecret(
57
+ metadata=apimachinery.ObjectMeta(name="mysecret"),
58
+ spec=sealed_secrets.SealedSecretSpec(
59
+ encrypted_data={
60
+ "username": "AgBy8hCi8...", # Your encrypted data here
61
+ "password": "AgBy8hCi8..." # Your encrypted data here
62
+ }
63
+ )
64
+ ).create()
65
+
66
+ # List SealedSecrets
67
+ for secret in sealed_secrets.SealedSecret.list():
68
+ print(f"Found SealedSecret: {secret.metadata.name}")
69
+ ```
70
+
71
+ ### Using the Fluent Builder API
72
+
73
+ Cloudcoil provides a powerful fluent builder API for Sealed Secrets resources:
74
+
75
+ ```python
76
+ from cloudcoil.models.sealed_secrets.v1alpha1 import SealedSecret
77
+
78
+ # Create a SealedSecret using the fluent builder
79
+ sealed_secret = (
80
+ SealedSecret.builder()
81
+ .metadata(lambda metadata: metadata
82
+ .name("mysecret")
83
+ .namespace("default")
84
+ .labels({"app": "myapp"})
85
+ )
86
+ .spec(lambda spec: spec
87
+ .encrypted_data({
88
+ "username": "AgBy8hCi8...", # Your encrypted data here
89
+ "password": "AgBy8hCi8..." # Your encrypted data here
90
+ })
91
+ .template(lambda template: template
92
+ .metadata(lambda t_metadata: t_metadata
93
+ .labels({"app": "myapp"})
94
+ )
95
+ .type("Opaque")
96
+ )
97
+ )
98
+ .build()
99
+ )
100
+ ```
101
+
102
+ ### Using the Context Manager Builder API
103
+
104
+ For complex sealed secret configurations, you can use the context manager-based builder:
105
+
106
+ ```python
107
+ from cloudcoil.models.sealed_secrets.v1alpha1 import SealedSecret
108
+
109
+ # Create a SealedSecret using context managers
110
+ with SealedSecret.new() as secret:
111
+ with secret.metadata() as metadata:
112
+ metadata.name("mysecret")
113
+ metadata.namespace("default")
114
+
115
+ with secret.spec() as spec:
116
+ spec.encrypted_data({
117
+ "username": "AgBy8hCi8...", # Your encrypted data here
118
+ "password": "AgBy8hCi8..." # Your encrypted data here
119
+ })
120
+ with spec.template() as template:
121
+ template.type("Opaque")
122
+ with template.metadata() as t_metadata:
123
+ t_metadata.labels({"app": "myapp"})
124
+
125
+ final_secret = secret.build()
126
+ ```
127
+
128
+ ## 📚 Documentation
129
+
130
+ For complete documentation, visit [cloudcoil.github.io/cloudcoil](https://cloudcoil.github.io/cloudcoil)
131
+
132
+ ## 📜 License
133
+
134
+ Apache License, Version 2.0 - see [LICENSE](LICENSE)
@@ -0,0 +1,7 @@
1
+ cloudcoil/models/sealed_secrets/__init__.py,sha256=i7a-QQ7TbqbYGuoJSwVT044pa_-U1hgxd5SAvxn-9CE,96
2
+ cloudcoil/models/sealed_secrets/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ cloudcoil/models/sealed_secrets/v1alpha1.py,sha256=qu5ELhWrK4Vq3di9saWzhGQNv8BR74adZ3VNgjzhgds,22946
4
+ cloudcoil_models_sealed_secrets-0.28.0.0.dist-info/METADATA,sha256=mN_E8bP_jbCez3eBJJs5WGxIXbPtyBY_jqznKTPPF_w,4342
5
+ cloudcoil_models_sealed_secrets-0.28.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
+ cloudcoil_models_sealed_secrets-0.28.0.0.dist-info/licenses/LICENSE,sha256=9mpycVvCCD7ofOehOGlZDoT8wntDVXA9O6MZJv6Hh4E,11345
7
+ cloudcoil_models_sealed_secrets-0.28.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2025 Sambhav Kothari
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.