Update configure-service-account task file to reference pod spec file from examples dir (#13065)
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
5b1b1341cc
commit
da20b139da
@@ -88,6 +88,8 @@ func getCodecForObject(obj runtime.Object) (runtime.Codec, error) {
|
||||
func validateObject(obj runtime.Object) (errors field.ErrorList) {
|
||||
// Enable CustomPodDNS for testing
|
||||
utilfeature.DefaultFeatureGate.Set("CustomPodDNS=true")
|
||||
// Enable TokenRequestProjection for ServiceAccountTokenVolumeProjection testing
|
||||
utilfeature.DefaultFeatureGate.Set("TokenRequestProjection=true")
|
||||
switch t := obj.(type) {
|
||||
case *admissionregistration.InitializerConfiguration:
|
||||
// cluster scope resource
|
||||
@@ -453,6 +455,7 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
"pod-multiple-configmap-env-variable": {&api.Pod{}},
|
||||
"pod-nginx-specific-node": {&api.Pod{}},
|
||||
"pod-nginx": {&api.Pod{}},
|
||||
"pod-projected-svc-token": {&api.Pod{}},
|
||||
"pod-rs": {&api.Pod{}, &api.Pod{}},
|
||||
"pod-single-configmap-env-variable": {&api.Pod{}},
|
||||
"pod-with-node-affinity": {&api.Pod{}},
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
kind: Pod
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: nginx
|
||||
spec:
|
||||
containers:
|
||||
- image: nginx
|
||||
name: nginx
|
||||
volumeMounts:
|
||||
- mountPath: /var/run/secrets/tokens
|
||||
name: vault-token
|
||||
volumes:
|
||||
- name: vault-token
|
||||
projected:
|
||||
sources:
|
||||
- serviceAccountToken:
|
||||
path: vault-token
|
||||
expirationSeconds: 7200
|
||||
audience: vault
|
||||
Reference in New Issue
Block a user