Versioned sealed-secrets models for cloudcoil.
Warning
This repository is auto-generated from the cloudcoil repository. Please do not submit pull requests here. Instead, submit them to the main repository at https://github.com/cloudcoil/cloudcoil.
Note
For versioning information and compatibility, see the Versioning Guide.
Using uv (recommended):
# Install with Sealed Secrets support
uv add cloudcoil.models.sealed-secretsUsing pip:
pip install cloudcoil.models.sealed-secretsfrom cloudcoil import apimachinery
import cloudcoil.models.sealed_secrets.v1alpha1 as sealed_secrets
# Create a SealedSecret
sealed_secret = sealed_secrets.SealedSecret(
metadata=apimachinery.ObjectMeta(name="mysecret"),
spec=sealed_secrets.SealedSecretSpec(
encrypted_data={
"username": "AgBy8hCi8...", # Your encrypted data here
"password": "AgBy8hCi8..." # Your encrypted data here
}
)
).create()
# List SealedSecrets
for secret in sealed_secrets.SealedSecret.list():
print(f"Found SealedSecret: {secret.metadata.name}")Cloudcoil provides a powerful fluent builder API for Sealed Secrets resources:
from cloudcoil.models.sealed_secrets.v1alpha1 import SealedSecret
# Create a SealedSecret using the fluent builder
sealed_secret = (
SealedSecret.builder()
.metadata(lambda metadata: metadata
.name("mysecret")
.namespace("default")
.labels({"app": "myapp"})
)
.spec(lambda spec: spec
.encrypted_data({
"username": "AgBy8hCi8...", # Your encrypted data here
"password": "AgBy8hCi8..." # Your encrypted data here
})
.template(lambda template: template
.metadata(lambda t_metadata: t_metadata
.labels({"app": "myapp"})
)
.type("Opaque")
)
)
.build()
)For complex sealed secret configurations, you can use the context manager-based builder:
from cloudcoil.models.sealed_secrets.v1alpha1 import SealedSecret
# Create a SealedSecret using context managers
with SealedSecret.new() as secret:
with secret.metadata() as metadata:
metadata.name("mysecret")
metadata.namespace("default")
with secret.spec() as spec:
spec.encrypted_data({
"username": "AgBy8hCi8...", # Your encrypted data here
"password": "AgBy8hCi8..." # Your encrypted data here
})
with spec.template() as template:
template.type("Opaque")
with template.metadata() as t_metadata:
t_metadata.labels({"app": "myapp"})
final_secret = secret.build()For complete documentation, visit cloudcoil.github.io/cloudcoil
Apache License, Version 2.0 - see LICENSE