Merge pull request #21265 from stevekuznetsov/skuznets/new-sa

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot
2016-03-01 01:14:06 -08:00
13 changed files with 613 additions and 1 deletions

View File

@@ -883,6 +883,28 @@ __EOF__
kubectl delete configmap test-configmap --namespace=test-configmaps
kubectl delete namespace test-configmaps
####################
# Service Accounts #
####################
### Create a new namespace
# Pre-condition: the test-service-accounts namespace does not exist
kube::test::get_object_assert 'namespaces' '{{range.items}}{{ if eq $id_field \"test-service-accounts\" }}found{{end}}{{end}}:' ':'
# Command
kubectl create namespace test-service-accounts
# Post-condition: namespace 'test-service-accounts' is created.
kube::test::get_object_assert 'namespaces/test-service-accounts' "{{$id_field}}" 'test-service-accounts'
### Create a service account in a specific namespace
# Command
kubectl create serviceaccount test-service-account --namespace=test-service-accounts
# Post-condition: secret exists and has expected values
kube::test::get_object_assert 'serviceaccount/test-service-account --namespace=test-service-accounts' "{{$id_field}}" 'test-service-account'
# Clean-up
kubectl delete serviceaccount test-service-account --namespace=test-service-accounts
# Clean up
kubectl delete namespace test-service-accounts
#################
# Pod templates #
#################