Skip to content
Snippets Groups Projects
Verified Commit 3f5d2362 authored by David Hoese's avatar David Hoese
Browse files

Add stdin version of kubectl docker command

parent 58b0d4f2
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ gs deploy rabbit:
- cp ${kubekorner_k3s_config} .
- kubeconfig=$(basename ${kubekorner_k3s_config})
- |-
kubectl get secret --kubeconfig "${kubeconfig}" geosphere-rabbit-rabbitmq --namespace=geosphere -oyaml | grep -v '^\s*namespace:\s' | grep -v "[Hh]elm" | grep -v "[tT]ime" | grep -v "selfLink" | grep -v "uid" | grep -v "resourceVersion" | sed 's/ name: .*/ name: geosphere-rabbit-rabbitmq-production/' | kubectl_noattach apply --kubeconfig "${kubeconfig}" --namespace=geosphere-test -f -
kubectl get secret --kubeconfig "${kubeconfig}" geosphere-rabbit-rabbitmq --namespace=geosphere -oyaml | grep -v '^\s*namespace:\s' | grep -v "[Hh]elm" | grep -v "[tT]ime" | grep -v "selfLink" | grep -v "uid" | grep -v "resourceVersion" | sed 's/ name: .*/ name: geosphere-rabbit-rabbitmq-production/' | kubectl_stdin apply --kubeconfig "${kubeconfig}" --namespace=geosphere-test -f -
# this job doesn't actually need any artifacts from previous jobs
dependencies: []
rules:
......
......@@ -16,3 +16,8 @@ kubectl_noattach() {
docker run --rm -v $(pwd):/apps -w /apps alpine/k8s:1.18.2 kubectl "$@"
}
export -f kubectl_noattach
kubectl_stdin() {
docker run -a stdin --rm -v $(pwd):/apps -w /apps alpine/k8s:1.18.2 kubectl "$@"
}
export -f kubectl_stdin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment