feat: change to crossplane cli & add crossplane-watch (#2985)

mine
Guilherme Bravi 2024-11-28 17:42:36 +00:00 committed by GitHub
parent fd439bd8de
commit afa27f3899
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 29 additions and 13 deletions

View File

@ -1,21 +1,37 @@
plugins: plugins:
# List all the resources managed by a Composite Resource # crossplane-trace list all the relationships with a resource (Claim, Composite, or Managed Resource)
kube-lineage: # Requires 'crossplane' cli binary installed
shortCut: Ctrl-U crossplane-trace:
shortCut: t
confirm: false confirm: false
description: "Kube Lineage" description: "Crossplane Trace"
scopes: scopes:
- all - all
command: sh command: sh
background: false background: false
args: args:
- -c - -c
- >- - |
kubectl lineage if [ -n "$NAMESPACE" ]; then
-d 6 crossplane beta trace --context $CONTEXT -n $NAMESPACE $RESOURCE_NAME.$RESOURCE_GROUP $NAME -owide | less -K
--exclude-types Event,ProviderConfigUsage.aws.upbound.io,ProviderConfigUsage.kubernetes.crossplane.io else
--show-group crossplane beta trace --context $CONTEXT $RESOURCE_NAME.$RESOURCE_GROUP $NAME -owide | less -K
--context $CONTEXT fi
$RESOURCE_NAME # crossplane-watch requires 'crossplane' cli and 'viddy' binaries installed
$NAME # 'viddy' is a modern implementation of 'watch' command written in rust. Read more on https://github.com/sachaos/viddy.
| less -K crossplane-watch:
shortCut: w
confirm: false
description: "Crossplane Watch"
scopes:
- all
command: sh
background: false
args:
- -c
- |
if [ -n "$NAMESPACE" ]; then
viddy -pw 'crossplane beta trace --context $CONTEXT -n $NAMESPACE $RESOURCE_NAME.$RESOURCE_GROUP $NAME -owide'
else
viddy -pw 'crossplane beta trace --context $CONTEXT $RESOURCE_NAME.$RESOURCE_GROUP $NAME -owide'
fi