mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-06 07:20:40 +01:00
Compare commits
2 Commits
b52dd1a425
...
b04e01d418
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b04e01d418 | ||
|
|
15bcada010 |
@@ -27,7 +27,7 @@ plugins=(... kubectl)
|
|||||||
| kdel | `kubectl delete` | Delete resources by filenames, stdin, resources and names, or by resources and label selector |
|
| kdel | `kubectl delete` | Delete resources by filenames, stdin, resources and names, or by resources and label selector |
|
||||||
| kdelf | `kubectl delete -f` | Delete a pod using the type and name specified in -f argument |
|
| kdelf | `kubectl delete -f` | Delete a pod using the type and name specified in -f argument |
|
||||||
| kge | `kubectl get events --sort-by=".lastTimestamp"` | Get events (sorted by timestamp) |
|
| kge | `kubectl get events --sort-by=".lastTimestamp"` | Get events (sorted by timestamp) |
|
||||||
| kgew | `kubectl get events --watch --sort-by=".lastTimestamp"` | Get events and watch as they occur (sorted by timestamp) |
|
| kgew | `kubectl get events --watch --sort-by=".lastTimestamp"` | Get events and watch as they occur (sorted by timestamp) |
|
||||||
| | | **Pod management** |
|
| | | **Pod management** |
|
||||||
| kgp | `kubectl get pods` | List all pods in ps output format |
|
| kgp | `kubectl get pods` | List all pods in ps output format |
|
||||||
| kgpl | `kgp -l` | Get pods by label. Example: `kgpl "app=myapp" -n myns` |
|
| kgpl | `kgp -l` | Get pods by label. Example: `kgpl "app=myapp" -n myns` |
|
||||||
@@ -74,6 +74,7 @@ plugins=(... kubectl)
|
|||||||
| kdeld | `kubectl delete deployment` | Delete the deployment |
|
| kdeld | `kubectl delete deployment` | Delete the deployment |
|
||||||
| ksd | `kubectl scale deployment` | Scale a deployment |
|
| ksd | `kubectl scale deployment` | Scale a deployment |
|
||||||
| krsd | `kubectl rollout status deployment` | Check the rollout status of a deployment |
|
| krsd | `kubectl rollout status deployment` | Check the rollout status of a deployment |
|
||||||
|
| krrd | `kubectl rollout restart deployment` | Rollout restart a deployment |
|
||||||
| kres | `kubectl set env $@ REFRESHED_AT=...` | Recreate all pods in deployment with zero-downtime |
|
| kres | `kubectl set env $@ REFRESHED_AT=...` | Recreate all pods in deployment with zero-downtime |
|
||||||
| | | **Rollout management** |
|
| | | **Rollout management** |
|
||||||
| kgrs | `kubectl get replicaset` | List all ReplicaSets `rs` created by the deployment |
|
| kgrs | `kubectl get replicaset` | List all ReplicaSets `rs` created by the deployment |
|
||||||
@@ -112,6 +113,7 @@ plugins=(... kubectl)
|
|||||||
| kdelss | `kubectl delete statefulset` | Delete the statefulset |
|
| kdelss | `kubectl delete statefulset` | Delete the statefulset |
|
||||||
| ksss | `kubectl scale statefulset` | Scale a statefulset |
|
| ksss | `kubectl scale statefulset` | Scale a statefulset |
|
||||||
| krsss | `kubectl rollout status statefulset` | Check the rollout status of a deployment |
|
| krsss | `kubectl rollout status statefulset` | Check the rollout status of a deployment |
|
||||||
|
| krrss | `kubectl rollout restart statefulset` | Rollout restart a statefulset |
|
||||||
| | | **Service Accounts management** |
|
| | | **Service Accounts management** |
|
||||||
| kdsa | `kubectl describe sa` | Describe a service account in details |
|
| kdsa | `kubectl describe sa` | Describe a service account in details |
|
||||||
| kdelsa | `kubectl delete sa` | Delete the service account |
|
| kdelsa | `kubectl delete sa` | Delete the service account |
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ alias kdd='kubectl describe deployment'
|
|||||||
alias kdeld='kubectl delete deployment'
|
alias kdeld='kubectl delete deployment'
|
||||||
alias ksd='kubectl scale deployment'
|
alias ksd='kubectl scale deployment'
|
||||||
alias krsd='kubectl rollout status deployment'
|
alias krsd='kubectl rollout status deployment'
|
||||||
|
alias krrd='kubectl rollout restart deployment'
|
||||||
|
|
||||||
function kres(){
|
function kres(){
|
||||||
kubectl set env $@ REFRESHED_AT=$(date +%Y%m%d%H%M%S)
|
kubectl set env $@ REFRESHED_AT=$(date +%Y%m%d%H%M%S)
|
||||||
@@ -120,6 +121,7 @@ alias kdss='kubectl describe statefulset'
|
|||||||
alias kdelss='kubectl delete statefulset'
|
alias kdelss='kubectl delete statefulset'
|
||||||
alias ksss='kubectl scale statefulset'
|
alias ksss='kubectl scale statefulset'
|
||||||
alias krsss='kubectl rollout status statefulset'
|
alias krsss='kubectl rollout status statefulset'
|
||||||
|
alias krrss='kubectl rollout restart statefulset'
|
||||||
|
|
||||||
# Port forwarding
|
# Port forwarding
|
||||||
alias kpf="kubectl port-forward"
|
alias kpf="kubectl port-forward"
|
||||||
|
|||||||
41
plugins/pulumi/README.md
Normal file
41
plugins/pulumi/README.md
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# Pulumi
|
||||||
|
|
||||||
|
This is an **Oh My Zsh plugin** for the [**Pulumi CLI**](https://www.pulumi.com/docs/iac/cli/),
|
||||||
|
an Infrastructure as Code (IaC) tool for building, deploying and managing cloud infrastucture.
|
||||||
|
|
||||||
|
This plugin provides:
|
||||||
|
|
||||||
|
- 🚀 Short, intuitive aliases for common Pulumi commands
|
||||||
|
- 🎯 Auto-completion support for Pulumi
|
||||||
|
|
||||||
|
To use it, add `pulumi` to the plugins array in your `.zshrc` file:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
plugins=(... pulumi)
|
||||||
|
```
|
||||||
|
|
||||||
|
## ⚡ Aliases
|
||||||
|
|
||||||
|
| Alias | Command | Description |
|
||||||
|
| -------- | ---------------------- | ----------------------------- |
|
||||||
|
| `pul` | `pulumi` | Shortcut for Pulumi CLI |
|
||||||
|
| `pulcs` | `pulumi config set` | Set Pulumi configuration |
|
||||||
|
| `puld` | `pulumi destroy` | Destroy all resources |
|
||||||
|
| `pullog` | `pulumi logs -f` | Tail Pulumi logs in real-time |
|
||||||
|
| `pulp` | `pulumi preview` | Show planned changes |
|
||||||
|
| `pulr` | `pulumi refresh` | Refresh state from cloud |
|
||||||
|
| `puls` | `pulumi stack` | Show stack details |
|
||||||
|
| `pulsh` | `pulumi stack history` | Show stack history |
|
||||||
|
| `pulsi` | `pulumi stack init` | Initialize a new stack |
|
||||||
|
| `pulsl` | `pulumi stack ls` | List available stacks |
|
||||||
|
| `pulso` | `pulumi stack output` | Show stack outputs |
|
||||||
|
| `pulss` | `pulumi stack select` | Switch stack |
|
||||||
|
| `pulu` | `pulumi up` | Deploy infrastructure |
|
||||||
|
|
||||||
|
## 🎯 Autocompletion
|
||||||
|
|
||||||
|
If `pulumi gen-completion zsh` is available, this plugin **automatically loads Pulumi auto-completion**.
|
||||||
|
|
||||||
|
## 🛠️ Contribution
|
||||||
|
|
||||||
|
Feel free to open an issue or PR for improvements! 🚀
|
||||||
28
plugins/pulumi/pulumi.plugin.zsh
Normal file
28
plugins/pulumi/pulumi.plugin.zsh
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
if (( ! $+commands[pulumi] )); then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If the completion file doesn't exist yet, we need to autoload it and
|
||||||
|
# bind it to `pulumi`. Otherwise, compinit will have already done that.
|
||||||
|
if [[ ! -f "$ZSH_CACHE_DIR/completions/_pulumi" ]]; then
|
||||||
|
typeset -g -A _comps
|
||||||
|
autoload -Uz _pulumi
|
||||||
|
_comps[pulumi]=_pulumi
|
||||||
|
fi
|
||||||
|
|
||||||
|
pulumi gen-completion zsh >| "$ZSH_CACHE_DIR/completions/_pulumi" &|
|
||||||
|
|
||||||
|
# Aliases
|
||||||
|
alias pul='pulumi'
|
||||||
|
alias pulcs='pulumi config set'
|
||||||
|
alias puld='pulumi destroy'
|
||||||
|
alias pullog='pulumi logs -f'
|
||||||
|
alias pulp='pulumi preview'
|
||||||
|
alias pulr='pulumi refresh'
|
||||||
|
alias puls='pulumi stack'
|
||||||
|
alias pulsh='pulumi stack history'
|
||||||
|
alias pulsi='pulumi stack init'
|
||||||
|
alias pulsl='pulumi stack ls'
|
||||||
|
alias pulso='pulumi stack output'
|
||||||
|
alias pulss='pulumi stack select'
|
||||||
|
alias pulu='pulumi up'
|
||||||
Reference in New Issue
Block a user