Working with ConfigMaps
These methods allow you to work with ConfigMaps (configuration maps) of a Kubernetes cluster in the Managed Containers service, which provides the operation of the Cloud Spark cluster. They are used to store configuration data: environment variables, command-line arguments, or configuration files. Using a ConfigMap allows you to separate the configuration of environment-specific data from the application code. This makes it easier to move your Spark applications between code runtime environments.
Create a ConfigMap in the specified namespace based on the provided manifest. The manifest must be in YAML format.
Required token role: Administrator. Learn more about token roles.
Argument | Type | Description |
|---|---|---|
(required) |
| The ID of the Cloud Spark cluster. The list of Cloud Spark clusters and their IDs can be obtained using the get_clusters method |
(required) |
| Path to the YAML file with the manifest to be passed to the Cloud Spark cluster |
(optional) |
| The name of the namespace in which to create the ConfigMap. The namespace must exist, otherwise the ConfigMap will not be created. If the argument is omitted, the default value is used: |
An object of the K8sConfigmap class with information about the created ConfigMap.
Field | Type | Description |
|---|---|---|
|
| ConfigMap data as |
|
| The name of the ConfigMap |
|
| The name of the namespace in which the ConfigMap is created |
Get a list of names of all ConfigMaps in the specified namespace.
To get detailed information about an individual ConfigMap from the list, use the get_configmap_detail method.
Required token role: Administrator or User. Learn more about token roles.
Argument | Type | Description |
|---|---|---|
(required) |
| The ID of the Cloud Spark cluster. The list of Cloud Spark clusters and their IDs can be obtained using the get_clusters method |
(optional) |
| The name of the namespace for which to get the list of all ConfigMaps. If the argument is omitted, the default value is used: |
An object of the K8sObjectNamesList[str] class that contains a list of names of all ConfigMaps in the specified namespace.
Get information about a ConfigMap with the specified name.
Required token role: Administrator or User. Learn more about token roles.
Argument | Type | Description |
|---|---|---|
(required) |
| The ID of the Cloud Spark cluster. The list of Cloud Spark clusters and their IDs can be obtained using the get_clusters method |
(required) |
| The name of the ConfigMap. The list of names of all ConfigMaps can be obtained using the list_configmaps method |
(optional) |
| The name of the namespace in which the ConfigMap is located. If the argument is omitted, the default value is used: |
An object of the K8sConfigmap class with information about the ConfigMap with the specified name.
Field | Type | Description |
|---|---|---|
|
| ConfigMap data as |
|
| The name of the ConfigMap object |
|
| The name of the namespace in which the ConfigMap is located |
Delete a ConfigMap with the specified name.
Required token role: Administrator. Learn more about token roles.
Argument | Type | Description |
|---|---|---|
(required) |
| The ID of the Cloud Spark cluster. The list of Cloud Spark clusters and their IDs can be obtained using the get_clusters method |
(required) |
| The name of the ConfigMap. The list of names of all ConfigMaps can be obtained using the list_configmaps method |
(optional) |
| The name of the namespace in which the ConfigMap is located. If the argument is omitted, the default value is used: |
No return value.