-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
enhancementNew feature or requestNew feature or request
Description
When writing automation for kubernetes, we often need the ability to grab the value of a field in a resource and use that value in another resource. Applier should support this. Here are a few examples I can think of:
Grab Cluster ID to feed into resources.
cluster_id=$(oc get machinesets -n openshift-machine-api -o jsonpath='{.items[0].metadata.labels.machine\.openshift\.io\/cluster-api-cluster}')
oc process -f machineautoscaler-template.yaml -p CLUSTER_ID=${cluster_id} | oc apply -f -
Copy a token between clusters
token=$(oc get secret $(oc get sa builder -o jsonpath='{.secrets[0].name}') -o jsonpath='{.data.token}')
oc process -f secret-template.yaml -p TOKEN=${token} | oc apply -f-
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request