Skip to content

Instantly share code, notes, and snippets.

@aliok
Forked from odra/delete-enmasse-crds.sh
Created June 27, 2019 08:55
Show Gist options
  • Save aliok/0dcc37d086276596223c849d3660d79a to your computer and use it in GitHub Desktop.
Save aliok/0dcc37d086276596223c849d3660d79a to your computer and use it in GitHub Desktop.
integreatly commands
#!/bin/bash
for name in `oc get crd -oname | grep enmasse`; do oc delete $name; done
#!/bin/bash
oc get nodes -l 'node-role.kubernetes.io/master=true' -o jsonpath='{.items[0].metadata.name}'
#!/bin/bash
ansible-playbook \
-i inventories/hosts \
-e 'github_client_id=' \
-e 'github_client_secret=' \
playbooks/install.yml
#!/bin/bash
oc get serviceinstances,servicebinding --all-namespaces \
| sed 's/\.servicecatalog\.k8s\.io//g' \
| grep -v Ready \
| awk '{print $1,$2}' \
| while read ns res; do oc patch $(echo $res | sed 's/\// /g') -n $ns -p '{"metadata":{"finalizers": []}}' --type=merge; done
#!/bin/bash
#oneliner
for bname in `oc get build -l 'syndesis.io/type=integration' -o jsonpath='{.items[].metadata.name}' -n fuse`; do oc start-build $bname -n fuse; done
#readable script
builds=`oc get build -l 'syndesis.io/type=integration' -o jsonpath='{.items[].metadata.name}' -n fuse`
for build in $builds
do
oc start-build $build -n fuse
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment