ConfigMap
Bases: DuploResourceV3
Kubernetes ConfigMaps
This class offers methods to manage Kubernetes ConfigMaps within DuploCloud.
See more details at: https://docs.duplocloud.com/docs/kubernetes-overview/configs-and-secrets
Commands
apply
Apply a ConfigMap
Create or Update a ConfigMap resource with Duplocloud cli.
CLI Usage
Contents of theconfigmap.yaml file
Returns:
| Name | Type | Description |
|---|---|---|
message |
dict
|
Success message. |
Parameters:
--file, -f, --cli-input
--patches, --add, --remove, --copy, --replace, --test, --move
create
Create a Configmap resource.
Creates a new kubernetes ConfigMap resource with the specified metadata and data entries.
CLI Usage
Contents of theconfigmap.yaml file
Create a ConfigMap using a one-liner.
Create a ConfigMap by specifying key-value pairs as literals.
Create a ConfigMap from a file.
Returns:
| Name | Type | Description |
|---|---|---|
message |
dict
|
The created resource or success message. |
Raises:
| Type | Description |
|---|---|
DuploError
|
If the Configmap could not be created. |
Model: V1ConfigMap
{
"$defs": {
"V1ManagedFieldsEntry": {
"description": "V1ManagedFieldsEntry",
"properties": {
"apiVersion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Apiversion"
},
"fieldsType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fieldstype"
},
"fieldsV1": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Fieldsv1"
},
"manager": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Manager"
},
"operation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Operation"
},
"time": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Time"
}
},
"title": "V1ManagedFieldsEntry",
"type": "object"
},
"V1ObjectMeta": {
"description": "V1ObjectMeta",
"properties": {
"annotations": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Annotations"
},
"clusterName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Clustername"
},
"creationTimestamp": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Creationtimestamp"
},
"deletionGracePeriodSeconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Deletiongraceperiodseconds"
},
"deletionTimestamp": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Deletiontimestamp"
},
"finalizers": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Finalizers"
},
"generateName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Generatename"
},
"generation": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Generation"
},
"labels": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Labels"
},
"managedFields": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/V1ManagedFieldsEntry"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Managedfields"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"namespace": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Namespace"
},
"ownerReferences": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/V1OwnerReference"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Ownerreferences"
},
"resourceVersion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Resourceversion"
},
"selfLink": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Selflink"
},
"uid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uid"
}
},
"title": "V1ObjectMeta",
"type": "object"
},
"V1OwnerReference": {
"description": "V1OwnerReference",
"properties": {
"apiVersion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Apiversion"
},
"blockOwnerDeletion": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Blockownerdeletion"
},
"controller": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Controller"
},
"kind": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kind"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"uid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uid"
}
},
"title": "V1OwnerReference",
"type": "object"
}
},
"description": "V1ConfigMap",
"properties": {
"apiVersion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Apiversion"
},
"binaryData": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"format": "binary",
"type": "string"
},
{
"type": "string"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Binarydata"
},
"data": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Data"
},
"immutable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Immutable"
},
"kind": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kind"
},
"metadata": {
"anyOf": [
{
"$ref": "#/$defs/V1ObjectMeta"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "V1ConfigMap",
"type": "object"
}
Parameters:
name
positional
--file, -f, --cli-input
--fromfile, --from-file, --from-literal
--dryrun, --dry-run
delete
find
list
Retrieve a List of ConfigMap resources
Returns:
| Name | Type | Description |
|---|---|---|
list |
list
|
A list of ConfigMap. |
update
Updates a ConfigMap resource.
This function allows you to modify the contents of a ConfigMap without deleting or recreating it.
CLI Usage
Contents of theconfigmap.yaml file
Update configmap using a one-liner.
Add new key in the configmap.
Update existing key from the configmap.
Delete existing key from the configmap.
Update a ConfigMap by specifying key-value pairs as literals.
Update a ConfigMap from a file.
Returns:
| Name | Type | Description |
|---|---|---|
message |
dict
|
The updated ConfigMap or a success message. |
Raises:
| Type | Description |
|---|---|
DuploError
|
If the ConfigMap update fails. |
Model: V1ConfigMap
{
"$defs": {
"V1ManagedFieldsEntry": {
"description": "V1ManagedFieldsEntry",
"properties": {
"apiVersion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Apiversion"
},
"fieldsType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fieldstype"
},
"fieldsV1": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Fieldsv1"
},
"manager": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Manager"
},
"operation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Operation"
},
"time": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Time"
}
},
"title": "V1ManagedFieldsEntry",
"type": "object"
},
"V1ObjectMeta": {
"description": "V1ObjectMeta",
"properties": {
"annotations": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Annotations"
},
"clusterName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Clustername"
},
"creationTimestamp": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Creationtimestamp"
},
"deletionGracePeriodSeconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Deletiongraceperiodseconds"
},
"deletionTimestamp": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Deletiontimestamp"
},
"finalizers": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Finalizers"
},
"generateName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Generatename"
},
"generation": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Generation"
},
"labels": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Labels"
},
"managedFields": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/V1ManagedFieldsEntry"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Managedfields"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"namespace": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Namespace"
},
"ownerReferences": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/V1OwnerReference"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Ownerreferences"
},
"resourceVersion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Resourceversion"
},
"selfLink": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Selflink"
},
"uid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uid"
}
},
"title": "V1ObjectMeta",
"type": "object"
},
"V1OwnerReference": {
"description": "V1OwnerReference",
"properties": {
"apiVersion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Apiversion"
},
"blockOwnerDeletion": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Blockownerdeletion"
},
"controller": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Controller"
},
"kind": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kind"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"uid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uid"
}
},
"title": "V1OwnerReference",
"type": "object"
}
},
"description": "V1ConfigMap",
"properties": {
"apiVersion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Apiversion"
},
"binaryData": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"format": "binary",
"type": "string"
},
{
"type": "string"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Binarydata"
},
"data": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Data"
},
"immutable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Immutable"
},
"kind": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kind"
},
"metadata": {
"anyOf": [
{
"$ref": "#/$defs/V1ObjectMeta"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "V1ConfigMap",
"type": "object"
}
Parameters:
name
positional
--file, -f, --cli-input
--fromfile, --from-file, --from-literal
--patches, --add, --remove, --copy, --replace, --test, --move
--dryrun, --dry-run