https://github.com/cloudogu/helm-sudo
A Helm plugin for running commands with the security privileges of another user
https://github.com/cloudogu/helm-sudo
helm helm-plugin helm-plugins kubernetes sudo
Last synced: 10 months ago
JSON representation
A Helm plugin for running commands with the security privileges of another user
- Host: GitHub
- URL: https://github.com/cloudogu/helm-sudo
- Owner: cloudogu
- License: apache-2.0
- Created: 2021-01-21T08:35:28.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-03-09T09:45:05.000Z (about 4 years ago)
- Last Synced: 2025-04-22T10:32:00.793Z (12 months ago)
- Topics: helm, helm-plugin, helm-plugins, kubernetes, sudo
- Language: Shell
- Homepage:
- Size: 20.5 KB
- Stars: 15
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# helm-sudo plugin
A [helm](https://helm.sh) plugin that uses impersonating to execute helm-commands on clusters within the admin context.
For questions or suggestions you are welcome to join us at our myCloudogu [community forum](https://community.cloudogu.com/c/kubernetes/54).
[](https://community.cloudogu.com/c/kubernetes/54)
## Installation
Install the plugin using the built-in plugin manager (see [releases](https://github.com/cloudogu/helm-sudo/releases) for latest version):
```
# Installs latest commit
helm plugin install https://github.com/cloudogu/helm-sudo
# Installs deterministic version
helm plugin install https://github.com/cloudogu/helm-sudo --version=0.0.2
```
---
## Usage
Its usage is pretty simple, just use "sudo" on your helm commands like so:
```
helm sudo list
```
what the plugin does is, it adds the --kube-as-user and --kube-as-group flags with your user ($USER) and system:masters group to the given helm command.
So the plugin executes the following:
```
helm --kube-as-user $USER --kube-as-group system:masters list
```
Flags will just be passed along to the command you are calling.
**CAUTION: Due to the usage of this plugin, you will execute the helm command as admin on your cluster!**
Syntax completion works with helm version 3.8.0 and up.
---
## Configuration
| ENV_VAR | Default | Description |
|--- |--- |--- |
|HELM_SUDO_PROMPT| false | If set to true you will be prompted to acknowledge the usage of the helm-command on the current context as admin |
## Similar projects
* [postfinance/kubectl-sudo](https://github.com/postfinance/kubectl-sudo): Same functionality as helm-sudo for kubectl
* [cloudogu/sudo-kubeconfig](https://github.com/cloudogu/sudo-kubeconfig): Create a sudo kubeconfig for your current kubernetes context.