Merge pull request #67713 from liggitt/process-substitution
Automatic merge from submit-queue (batch tested with PRs 59230, 66233, 67483, 67713). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Make kubectl create secret tls work with process substitution Fixes #57909 ```release-note `kubectl create secret tls` can now read certificate and key files from process substitution arguments ```
This commit is contained in:
@@ -751,6 +751,13 @@ run_secrets_test() {
|
||||
# Clean-up
|
||||
kubectl delete secret test-secret --namespace=test-secrets
|
||||
|
||||
# Command with process substitution
|
||||
kubectl create secret tls test-secret --namespace=test-secrets --key <(cat hack/testdata/tls.key) --cert <(cat hack/testdata/tls.crt)
|
||||
kube::test::get_object_assert 'secret/test-secret --namespace=test-secrets' "{{$id_field}}" 'test-secret'
|
||||
kube::test::get_object_assert 'secret/test-secret --namespace=test-secrets' "{{$secret_type}}" 'kubernetes.io/tls'
|
||||
# Clean-up
|
||||
kubectl delete secret test-secret --namespace=test-secrets
|
||||
|
||||
# Create a secret using stringData
|
||||
kubectl create --namespace=test-secrets -f - "${kube_flags[@]}" << __EOF__
|
||||
{
|
||||
|
Reference in New Issue
Block a user