kelseyhightower / vault-controller

Automate the creation of unique Vault tokens for Kubernetes Pods using init containers.
Apache License 2.0
447 stars 69 forks source link

[replicasets/vault-example] fix syntax for 1.5.x #8

Open ChrisLundquist opened 7 years ago

ChrisLundquist commented 7 years ago

Version info

$ minikube version
minikube version: v0.15.0
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.2", GitCommit:"08e099554f3c31f6e6f07b448ab3ed78d0520507", GitTreeState:"clean", BuildDate:"2017-01-12T07:30:54Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1", GitCommit:"82450d03cb057bab0950214ef122b67c83fb11df", GitTreeState:"clean", BuildDate:"1970-01-01T00:00:00Z", GoVersion:"go1.7.1", Compiler:"gc", Platform:"linux/amd64"}

before

$ kubectl -n vault-controller create -f replicasets/vault-example.yaml
The ReplicaSet "vault-example" is invalid: 
* spec.template.spec.initContainers[0].env[0].valueFrom.fieldRef.apiVersion: Required value
* spec.template.spec.initContainers[0].env[1].valueFrom.fieldRef.apiVersion: Required value

after

$ kubectl -n vault-controller create -f replicasets/vault-example.yaml 
replicaset "vault-example" created
thorix commented 7 years ago

I have minikube version: v0.16.0 and this fix works. Thanks.

modille commented 7 years ago

This fix also worked for me, on

$ minikube version
minikube version: v0.17.1

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.6", GitCommit:"114f8911f9597be669a747ab72787e0bd74c9359", GitTreeState:"clean", BuildDate:"2017-03-28T13:54:20Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.3", GitCommit:"029c3a408176b55c30846f0faedf56aae5992e9b", GitTreeState:"clean", BuildDate:"1970-01-01T00:00:00Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}