Edit multi-file Kubernetes configmaps by downloading them into a folder, let you edit in an interactive shell and uploads them after.
Project description
Konfigmapedit
Edit multi-file Kubernetes configmaps by downloading them into a folder, let you edit in a shell and uploads them.
Installation
You can install the Konfigmapedit from PyPi:
pip install konfigmapedit
The konfigmapedit is supported on Python 3.6 and above on Linux/MacOS.
How to use
# This creates a temp dir on a local machine and downloads a kubernetes configmap into it and invokes a shell in the temp dir.
# The -n flag is the namespace and the configmap1 is the name of the configmap.
$ konfigmapedit -n app1 configmap1
configmap/configmap1 in namespace app1:
You are now in an interactive shell. Edit the configmap files and exit the shell to upload the changes.
$ konfigmapedit-g6r00xk9
# here you can use shell commands, like ls, vim, nano, etc. or just open it in any editor.
# after you finished the editing you can exit the shell (ctrl+D or exit command) and the konfigmapedit will display the changes and if you accept them it will upload the changes.
k9s plugin
You can use it as a k9s plugin too, where Ctrl-F on configmaps will invoke this tool.
Install instructions: https://k9scli.io/topics/plugins/
plugin:
editConfigMap:
shortCut: Ctrl-F
description: Edit as files
scopes:
- cm
command: konfigmapedit
background: false
args:
- '-n'
- $NAMESPACE
- $NAME
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
konfigmapedit-0.1.0.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for konfigmapedit-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60572dfcec910bc8923c4b1a01ae3af01ea9aa1fc5522c832175abea62514dc2 |
|
MD5 | fc35beb30c067cb36d14f5001e5aad22 |
|
BLAKE2b-256 | 6b4a37d6cbd97d5f1f0fadee8981d67dd66da31df542dddb97e7fd715cf6eb2c |