Samples to cleanup multiple configs across multiple namespaces in Kubernetes using kubectl and GNU parallel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@ load("@ytt:overlay","overlay") | |
#@overlay/match by=overlay.subset({"kind":"StatefulSet"}) | |
--- | |
spec: | |
volumeClaimTemplates: | |
#@overlay/match by=overlay.all, expects="1+" | |
- | |
metadata: | |
#@overlay/match missing_ok=True | |
annotations: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// VMware vRealize Orchestrator action sample | |
// Searches a vCenter or all known vCenters for a Datastore | |
// | |
// ensures the search only matches one Datastore | |
// | |
//Action Inputs: | |
// vCenter - VC:SdkConnection (Optional) | |
// datastoreName - String | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// VMware vRealize Orchestrator action sample | |
// Searches a vCenter or all known vCenters for a StoragePod (Datastore Cluster) | |
// | |
// ensures the search only matches one StoragePod | |
// | |
//Action Inputs: | |
// vCenter - VC:SdkConnection (Optional) | |
// storagePodName - String | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import json | |
import sys | |
import xml.etree.ElementTree as ET | |
parser = argparse.ArgumentParser('Parse strings from exported vRO Configuration Element XML') | |
parser.add_argument('FILE',help='ConfigElement XML file path') | |
group = parser.add_mutually_exclusive_group(required=True) | |
group.add_argument('-n','--name',dest='vroAttribute',help='Attribute Name to parse') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get nodes -o json | jq '.items[] | .status .addresses[] | select(.type=="ExternalIP") | .["address"]' | jq . -s -c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// VMware vRealize Orchestrator action sample | |
// Determines the ComputeResource or ClusterComputeResource of the VM. | |
// Assumes the VM is part of a DRS Cluster and a member of a child resoure pool in the cluster. | |
// | |
// Moves / Migrates the VM to the root ResourcePool of the Cluster. | |
// | |
//Action Inputs: | |
// vm - VC:VirtualMachine | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// VMware vRealize Orchestrator action sample | |
// Upgrades VMtool on a Virtual Machine if needed. | |
// Assumes vm tools .vib is part of ESXi host image profile | |
// | |
// | |
//Action Inputs: | |
// vm - VC:VirtualMachine | |
// | |
//Return type: void |
NewerOlder