Secret
Bases: DuploResourceV3
Kubernetes Secrets
This class provides methods to manage Kubernetes Secrets in DuploCloud.
See more details at: https://docs.duplocloud.com/docs/kubernetes-overview/configs-and-secrets/setting-kubernetes-secrets
Commands
apply
Apply a Secret
Create or Update a Secret resource with Duplocloud cli.
CLI Usage
Contents of thesecret.yaml file
Returns:
| Name | Type | Description |
|---|---|---|
message |
dict
|
Success message. |
Parameters:
--file, -f, --cli-input
--wait, -w
--patches, --add, --remove, --copy, --replace, --test, --move
create
Create a Secret
Create a new Kubernetes secret managed through DuploCloud.
CLI Usage
Contents of thesecret.yaml file
Create a secret using a one-liner.
Create a secret by specifying key-value pairs as literals.
Returns:
| Name | Type | Description |
|---|---|---|
message |
dict
|
The updated secret or a success message. |
Raises:
| Type | Description |
|---|---|
DuploError
|
If the secret create fails. |
Model: DuploK8Secret
{
"description": "DuploK8Secret",
"properties": {
"IsDuploManaged": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Isduplomanaged"
},
"SecretName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Secretname"
},
"SecretType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Secrettype"
},
"SecretData": {
"anyOf": [
{
"additionalProperties": {
"additionalProperties": true,
"type": "object"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Secretdata"
},
"SecretVersion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Secretversion"
},
"SecretAnnotations": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Secretannotations"
},
"SecretLabels": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Secretlabels"
},
"SkipBase64Encoding": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Skipbase64Encoding"
}
},
"title": "DuploK8Secret",
"type": "object"
}
Parameters:
name
positional
--file, -f, --cli-input
--fromfile, --from-file, --from-literal
--dryrun, --dry-run
delete
find
list
update
Updates a secret resource.
Updates an existing Kubernetes Secret resource with new or modified data.
CLI Usage
Contents of thesecret.yaml file
Update secret using a one-liner.
Add new keys in the secret.
Update existing keys from the secret.
Delete existing keys from the secret.
Update a secret by specifying key-value pairs as literals.
Adds labels and annotations to an existing Secret resource.
Since annotations and labels do have dots and tildes, there is some special syntax here.
Returns:
| Name | Type | Description |
|---|---|---|
message |
dict
|
The updated secret or a success message. |
Raises:
| Type | Description |
|---|---|
DuploError
|
If the secret update fails. |
Model: DuploK8Secret
{
"description": "DuploK8Secret",
"properties": {
"IsDuploManaged": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Isduplomanaged"
},
"SecretName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Secretname"
},
"SecretType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Secrettype"
},
"SecretData": {
"anyOf": [
{
"additionalProperties": {
"additionalProperties": true,
"type": "object"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Secretdata"
},
"SecretVersion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Secretversion"
},
"SecretAnnotations": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Secretannotations"
},
"SecretLabels": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Secretlabels"
},
"SkipBase64Encoding": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Skipbase64Encoding"
}
},
"title": "DuploK8Secret",
"type": "object"
}
Parameters:
name
positional
--file, -f, --cli-input
--fromfile, --from-file, --from-literal
--patches, --add, --remove, --copy, --replace, --test, --move
--dryrun, --dry-run