From 29b61d1411262c9b51b3114daf4fa842313bcdb9 Mon Sep 17 00:00:00 2001 From: Rana Date: Wed, 6 Mar 2019 03:29:27 +0500 Subject: [PATCH 1/6] Testing Changes --- Gopkg.lock | 567 +++++++++++++++++++++++++++++++++++-- example/deployment.yaml | 2 +- pkg/operator/controller.go | 5 +- pkg/util/k8sutil/vault.go | 5 + 4 files changed, 551 insertions(+), 28 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index a2b2288..d83b4af 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,373 +2,888 @@ [[projects]] + digest = "1:b24249f5a5e6fbe1eddc94b25973172339ccabeadef4779274f3ed0167c18812" name = "cloud.google.com/go" packages = ["compute/metadata"] + pruneopts = "" revision = "2d3a6656c17a60b0815b7e06ab0be04eacb6e613" version = "v0.16.0" [[projects]] + digest = "1:8e47871087b94913898333f37af26732faaab30cdb41571136cf7aec9921dae7" name = "github.com/PuerkitoBio/purell" packages = ["."] + pruneopts = "" revision = "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4" version = "v1.1.0" [[projects]] branch = "master" + digest = "1:331a419049c2be691e5ba1d24342fc77c7e767a80c666a18fd8a9f7b82419c1c" name = "github.com/PuerkitoBio/urlesc" packages = ["."] + pruneopts = "" revision = "de5bf2ad457846296e2031421a34e2568e304e35" [[projects]] + digest = "1:726e320483f479eb3b8990f9c09e5092302cdfce24e05f23d578f4937e1a003d" name = "github.com/aws/aws-sdk-go" - packages = ["aws","aws/awserr","aws/awsutil","aws/client","aws/client/metadata","aws/credentials","aws/endpoints","aws/request","aws/signer/v4","internal/shareddefaults","private/protocol","private/protocol/query","private/protocol/query/queryutil","private/protocol/rest","private/protocol/restxml","private/protocol/xml/xmlutil","service/s3"] + packages = [ + "aws", + "aws/awserr", + "aws/awsutil", + "aws/client", + "aws/client/metadata", + "aws/credentials", + "aws/endpoints", + "aws/request", + "aws/signer/v4", + "internal/shareddefaults", + "private/protocol", + "private/protocol/query", + "private/protocol/query/queryutil", + "private/protocol/rest", + "private/protocol/restxml", + "private/protocol/xml/xmlutil", + "service/s3", + ] + pruneopts = "" revision = "b0e76431638de15ec1e6be51b6f745e1f2134fde" version = "v1.12.63" [[projects]] + digest = "1:6811ad355c0a0a602c8ae0bef0d999bdcbeedf05604ba7db382722182139f2fc" + name = "github.com/coreos-inc/vault-operator" + packages = [ + "pkg/apis/vault/v1alpha1", + "pkg/client", + "pkg/generated/clientset/versioned", + "pkg/generated/clientset/versioned/scheme", + "pkg/generated/clientset/versioned/typed/vault/v1alpha1", + "pkg/generated/informers/externalversions/internalinterfaces", + "pkg/generated/informers/externalversions/vault/v1alpha1", + "pkg/generated/listers/vault/v1alpha1", + "pkg/util/k8sutil", + "pkg/util/probe", + "pkg/util/tlsutil", + "pkg/util/vaultutil", + "test/e2e/e2eutil", + ] + pruneopts = "" + revision = "43a1dd73183fd9d40b40e6f1e58b465c784d11a5" + version = "0.1.9" + +[[projects]] + digest = "1:0af98a9f37993282a01fbb948a53bcf96053151ba61f9f00b762467099d83727" name = "github.com/coreos/etcd" - packages = ["auth/authpb","clientv3","etcdserver/api/v3rpc/rpctypes","etcdserver/etcdserverpb","mvcc/mvccpb","pkg/tlsutil","pkg/transport"] + packages = [ + "auth/authpb", + "clientv3", + "etcdserver/api/v3rpc/rpctypes", + "etcdserver/etcdserverpb", + "mvcc/mvccpb", + "pkg/tlsutil", + "pkg/transport", + ] + pruneopts = "" revision = "1e1dbb23924672c6cd72c62ee0db2b45f778da71" version = "v3.2.11" [[projects]] + digest = "1:24a4f4fdaff0ea2dc907eb2c12005cb134d3e42e226cb71befabf7990f9b6bf8" name = "github.com/coreos/etcd-operator" - packages = ["pkg/apis/etcd/v1beta2","pkg/client","pkg/generated/clientset/versioned","pkg/generated/clientset/versioned/scheme","pkg/generated/clientset/versioned/typed/etcd/v1beta2","pkg/util","pkg/util/constants","pkg/util/etcdutil","pkg/util/k8sutil","pkg/util/probe","pkg/util/retryutil","test/e2e/e2eutil"] + packages = [ + "pkg/apis/etcd/v1beta2", + "pkg/client", + "pkg/generated/clientset/versioned", + "pkg/generated/clientset/versioned/scheme", + "pkg/generated/clientset/versioned/typed/etcd/v1beta2", + "pkg/util", + "pkg/util/constants", + "pkg/util/etcdutil", + "pkg/util/k8sutil", + "pkg/util/probe", + "pkg/util/retryutil", + "test/e2e/e2eutil", + ] + pruneopts = "" revision = "85c37511b1293a530ab98c0118e117a30ad0fe26" version = "v0.8.3" [[projects]] + digest = "1:6811ad355c0a0a602c8ae0bef0d999bdcbeedf05604ba7db382722182139f2fc" + name = "github.com/coreos/vault-operator" + packages = [ + "pkg/apis/vault/v1alpha1", + "pkg/client", + "pkg/generated/clientset/versioned", + "pkg/generated/clientset/versioned/scheme", + "pkg/generated/clientset/versioned/typed/vault/v1alpha1", + "pkg/generated/clientset/versioned/typed/vault/v1alpha1/fake", + "pkg/generated/informers/externalversions/internalinterfaces", + "pkg/generated/informers/externalversions/vault", + "pkg/generated/informers/externalversions/vault/v1alpha1", + "pkg/generated/listers/vault/v1alpha1", + "pkg/operator", + "pkg/util/k8sutil", + "pkg/util/probe", + "pkg/util/tlsutil", + "pkg/util/vaultutil", + "test/e2e/e2eutil", + "test/e2e/framework", + "test/e2e/upgradetest/framework", + "version", + ] + pruneopts = "" + revision = "43a1dd73183fd9d40b40e6f1e58b465c784d11a5" + version = "0.1.9" + +[[projects]] + digest = "1:56c130d885a4aacae1dd9c7b71cfe39912c7ebc1ff7d2b46083c8812996dc43b" name = "github.com/davecgh/go-spew" packages = ["spew"] + pruneopts = "" revision = "346938d642f2ec3594ed81d874461961cd0faa76" version = "v1.1.0" [[projects]] + digest = "1:f5d7ff39c266d97b0e854e96ac2845f2b55ccc42f92a6ea5ec8c39adb79ef64f" name = "github.com/emicklei/go-restful" - packages = [".","log"] + packages = [ + ".", + "log", + ] + pruneopts = "" revision = "5741799b275a3c4a5a9623a993576d7545cf7b5c" version = "v2.4.0" [[projects]] + digest = "1:cad2dd7061b8dcb4e0014d89e8070f185fb70ac9ba26acf27ff42b9c3eb0ff9b" name = "github.com/emicklei/go-restful-swagger12" packages = ["."] + pruneopts = "" revision = "dcef7f55730566d41eae5db10e7d6981829720f6" version = "1.0.1" [[projects]] + digest = "1:55848e643a99a9dfceb19e090ce67111328fbb1780f34c62a0430994ff85fb90" name = "github.com/fatih/structs" packages = ["."] + pruneopts = "" revision = "a720dfa8df582c51dee1b36feabb906bde1588bd" version = "v1.0" [[projects]] + digest = "1:b13707423743d41665fd23f0c36b2f37bb49c30e94adb813319c44188a51ba22" name = "github.com/ghodss/yaml" packages = ["."] + pruneopts = "" revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7" version = "v1.0.0" [[projects]] + digest = "1:a00483fe4106b86fb1187a92b5cf6915c85f294ed4c129ccbe7cb1f1a06abd46" name = "github.com/go-ini/ini" packages = ["."] + pruneopts = "" revision = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a" version = "v1.32.0" [[projects]] branch = "master" + digest = "1:1287439f7765209116509fffff2b8f853845e4b35572b41a1aadda42cbcffcc2" name = "github.com/go-openapi/jsonpointer" packages = ["."] + pruneopts = "" revision = "779f45308c19820f1a69e9a4cd965f496e0da10f" [[projects]] branch = "master" + digest = "1:07ac8ac445f68b0bc063d11845d479fb7e09c906ead7a8c4165b59777df09d74" name = "github.com/go-openapi/jsonreference" packages = ["."] + pruneopts = "" revision = "36d33bfe519efae5632669801b180bf1a245da3b" [[projects]] branch = "master" + digest = "1:79c79b6e2b94cc67f618b09187232af439adfc5223ccec9ff90c75cd5a005b32" name = "github.com/go-openapi/spec" packages = ["."] + pruneopts = "" revision = "4a3d26106361caf1779728cd8301ad6b9534934b" [[projects]] branch = "master" + digest = "1:a63976aa16b4247876a24d24514ffdce23021f08a605c7a9309b605b38094b1c" name = "github.com/go-openapi/swag" packages = ["."] + pruneopts = "" revision = "cf0bdb963811675a4d7e74901cefc7411a1df939" [[projects]] + digest = "1:70a80170917a15e1ff02faab5f9e716e945e0676e86599ba144d38f96e30c3bf" name = "github.com/gogo/protobuf" - packages = ["proto","sortkeys"] + packages = [ + "proto", + "sortkeys", + ] + pruneopts = "" revision = "342cbe0a04158f6dcb03ca0079991a51a4248c02" version = "v0.5" [[projects]] branch = "master" + digest = "1:107b233e45174dbab5b1324201d092ea9448e58243ab9f039e4c0f332e121e3a" name = "github.com/golang/glog" packages = ["."] + pruneopts = "" revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998" [[projects]] branch = "master" + digest = "1:736952736991249599ad037f945ba3d45f6bc5d72e73d84203560745624552d1" name = "github.com/golang/groupcache" packages = ["lru"] + pruneopts = "" revision = "84a468cf14b4376def5d68c722b139b881c450a4" [[projects]] branch = "master" + digest = "1:3b760d3b93f994df8eb1d9ebfad17d3e9e37edcb7f7efaa15b427c0d7a64f4e4" name = "github.com/golang/protobuf" - packages = ["proto","protoc-gen-go/descriptor","ptypes","ptypes/any","ptypes/duration","ptypes/timestamp"] + packages = [ + "proto", + "protoc-gen-go/descriptor", + "ptypes", + "ptypes/any", + "ptypes/duration", + "ptypes/timestamp", + ] + pruneopts = "" revision = "1e59b77b52bf8e4b449a57e6f79f21226d571845" [[projects]] branch = "master" + digest = "1:09307dfb1aa3f49a2bf869dcfa4c6c06ecd3c207221bd1c1a1141f0e51f209eb" name = "github.com/golang/snappy" packages = ["."] + pruneopts = "" revision = "553a641470496b2327abcac10b36396bd98e45c9" [[projects]] branch = "master" + digest = "1:fb7c7c9c84fb96b4f0fb0acaf33098a0ae5b1361b6d2da59a38e5b9f92b862fb" name = "github.com/google/btree" packages = ["."] + pruneopts = "" revision = "316fb6d3f031ae8f4d457c6c5186b9e3ded70435" [[projects]] branch = "master" + digest = "1:754f77e9c839b24778a4b64422236d38515301d2baeb63113aa3edc42e6af692" name = "github.com/google/gofuzz" packages = ["."] + pruneopts = "" revision = "24818f796faf91cd76ec7bddd72458fbced7a6c1" [[projects]] + digest = "1:2a131706ff80636629ab6373f2944569b8252ecc018cda8040931b05d32e3c16" name = "github.com/googleapis/gnostic" - packages = ["OpenAPIv2","compiler","extensions"] + packages = [ + "OpenAPIv2", + "compiler", + "extensions", + ] + pruneopts = "" revision = "ee43cbb60db7bd22502942cccbc39059117352ab" version = "v0.1.0" [[projects]] branch = "master" + digest = "1:32691a653da0dd17135f37c441abcf965f34898fc99e052fd152587bf7786bd7" name = "github.com/gregjones/httpcache" - packages = [".","diskcache"] + packages = [ + ".", + "diskcache", + ] + pruneopts = "" revision = "2bcd89a1743fd4b373f7370ce8ddc14dfbd18229" [[projects]] branch = "master" + digest = "1:304c322b62533a48ac052ffee80f67087fce1bc07186cd4e610a1b0e77765836" name = "github.com/hashicorp/errwrap" packages = ["."] + pruneopts = "" revision = "7554cd9344cec97297fa6649b055a8c98c2a1e55" [[projects]] branch = "master" + digest = "1:7bb7fdad88218bcb5c9033fbeedb5b4c5de71c232c5ae94beabe611fd2c48172" name = "github.com/hashicorp/go-cleanhttp" packages = ["."] + pruneopts = "" revision = "06c9ea3a335b7443026f8124b22619524420291b" [[projects]] branch = "master" + digest = "1:b46ef59de1f724e8a2b508ea2b329eaf6cac4d71cbd44ad5e3dbd4e8fd49de9b" name = "github.com/hashicorp/go-multierror" packages = ["."] + pruneopts = "" revision = "b7773ae218740a7be65057fc60b366a49b538a44" [[projects]] branch = "master" + digest = "1:ff65bf6fc4d1116f94ac305342725c21b55c16819c2606adc8f527755716937f" name = "github.com/hashicorp/go-rootcerts" packages = ["."] + pruneopts = "" revision = "6bb64b370b90e7ef1fa532be9e591a81c3493e00" [[projects]] branch = "master" + digest = "1:43987212a2f16bfacc1a286e9118f212d60c136ed53c6c9477c18921db53140b" name = "github.com/hashicorp/golang-lru" - packages = [".","simplelru"] + packages = [ + ".", + "simplelru", + ] + pruneopts = "" revision = "0a025b7e63adc15a622f29b0b2c4c3848243bbf6" [[projects]] branch = "master" + digest = "1:147d671753effde6d3bcd58fc74c1d67d740196c84c280c762a5417319499972" name = "github.com/hashicorp/hcl" - packages = [".","hcl/ast","hcl/parser","hcl/scanner","hcl/strconv","hcl/token","json/parser","json/scanner","json/token"] + packages = [ + ".", + "hcl/ast", + "hcl/parser", + "hcl/scanner", + "hcl/strconv", + "hcl/token", + "json/parser", + "json/scanner", + "json/token", + ] + pruneopts = "" revision = "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8" [[projects]] + digest = "1:69c860fa5a20c19e27483da2c148753cf31f146a247942a1ebb4b997e300618f" name = "github.com/hashicorp/vault" - packages = ["api","helper/compressutil","helper/jsonutil","helper/parseutil"] + packages = [ + "api", + "helper/compressutil", + "helper/jsonutil", + "helper/parseutil", + ] + pruneopts = "" revision = "bdac1854478538052ba5b7ec9a9ec688d35a3335" version = "v0.9.0" [[projects]] branch = "master" + digest = "1:f81c8d7354cc0c6340f2f7a48724ee6c2b3db3e918ecd441c985b4d2d97dd3e7" name = "github.com/howeyc/gopass" packages = ["."] + pruneopts = "" revision = "bf9dde6d0d2c004a008c27aaee91170c786f6db8" [[projects]] + digest = "1:012684836b98fe30c53f8536c01325c52622f420fa27c1fb3ca8a1471c469606" name = "github.com/imdario/mergo" packages = ["."] + pruneopts = "" revision = "7fe0c75c13abdee74b09fcacef5ea1c6bba6a874" version = "0.2.4" [[projects]] + digest = "1:6f49eae0c1e5dab1dafafee34b207aeb7a42303105960944828c2079b92fc88e" name = "github.com/jmespath/go-jmespath" packages = ["."] + pruneopts = "" revision = "0b12d6b5" [[projects]] + digest = "1:416fb7f9304f3cae8e9951aa7dc7b9d5b3e341cc1dc987efd6ca1ed867e0d4f9" name = "github.com/json-iterator/go" packages = ["."] + pruneopts = "" revision = "f7279a603edee96fe7764d3de9c6ff8cf9970994" version = "1.0.4" [[projects]] branch = "master" + digest = "1:d26c006cbf54ca5c040463d5678013169e2bd91fb62c2f960ae283a1723d4278" name = "github.com/juju/ratelimit" packages = ["."] + pruneopts = "" revision = "59fac5042749a5afb9af70e813da1dd5474f0167" [[projects]] branch = "master" + digest = "1:ccc20cacf54eb16464dad02efa1c14fa7c0b9e124639b0d2a51dcc87b0154e4c" name = "github.com/mailru/easyjson" - packages = ["buffer","jlexer","jwriter"] + packages = [ + "buffer", + "jlexer", + "jwriter", + ] + pruneopts = "" revision = "32fa128f234d041f196a9f3e0fea5ac9772c08e1" [[projects]] branch = "master" + digest = "1:59d11e81d6fdd12a771321696bb22abdd9a94d26ac864787e98c9b419e428734" name = "github.com/mitchellh/go-homedir" packages = ["."] + pruneopts = "" revision = "b8bc1bf767474819792c23f32d8286a45736f1c6" [[projects]] branch = "master" + digest = "1:30a2adc78c422ebd23aac9cfece529954d5eacf9ddbe37345f2a17439f8fa849" name = "github.com/mitchellh/mapstructure" packages = ["."] + pruneopts = "" revision = "06020f85339e21b2478f756a78e295255ffa4d6a" [[projects]] + digest = "1:63e142fc50307bcb3c57494913cfc9c12f6061160bdf97a678f78c71615f939b" name = "github.com/pborman/uuid" packages = ["."] + pruneopts = "" revision = "e790cca94e6cc75c7064b1332e63811d4aae1a53" version = "v1.1" [[projects]] branch = "master" + digest = "1:c24598ffeadd2762552269271b3b1510df2d83ee6696c1e543a0ff653af494bc" name = "github.com/petar/GoLLRB" packages = ["llrb"] + pruneopts = "" revision = "53be0d36a84c2a886ca057d34b6aa4468df9ccb4" [[projects]] + digest = "1:b46305723171710475f2dd37547edd57b67b9de9f2a6267cafdd98331fd6897f" name = "github.com/peterbourgon/diskv" packages = ["."] + pruneopts = "" revision = "5f041e8faa004a95c88a202771f4cc3e991971e6" version = "v2.0.1" [[projects]] branch = "master" + digest = "1:0bbb3483b2d9386cca8af0d101b636aec54d6f425b8bb1037c69c427c83c4b42" name = "github.com/sethgrid/pester" packages = ["."] + pruneopts = "" revision = "760f8913c0483b776294e1bee43f1d687527127b" [[projects]] + digest = "1:42a42c4bc67bed17f40fddf0f24d4403e25e7b96488456cf4248e6d16659d370" name = "github.com/sirupsen/logrus" packages = ["."] + pruneopts = "" revision = "d682213848ed68c0a260ca37d6dd5ace8423f5ba" version = "v1.0.4" [[projects]] + digest = "1:261bc565833ef4f02121450d74eb88d5ae4bd74bfe5d0e862cddb8550ec35000" name = "github.com/spf13/pflag" packages = ["."] + pruneopts = "" revision = "e57e3eeb33f795204c1ca35f56c44f83227c6e66" version = "v1.0.0" [[projects]] branch = "master" + digest = "1:c3415eeb330bf30a2d8181e516ec79804c198f3d171ab9c9364f29dbe76c05d9" name = "golang.org/x/crypto" packages = ["ssh/terminal"] + pruneopts = "" revision = "94eea52f7b742c7cbe0b03b22f0c4c8631ece122" [[projects]] branch = "master" + digest = "1:447831205e1c85dbf1e6f97cb8ca54931452c6aff79c630ea091ecbbdc2e921e" name = "golang.org/x/net" - packages = ["context","context/ctxhttp","http2","http2/hpack","idna","internal/timeseries","lex/httplex","trace"] + packages = [ + "context", + "context/ctxhttp", + "http2", + "http2/hpack", + "idna", + "internal/timeseries", + "lex/httplex", + "trace", + ] + pruneopts = "" revision = "a8b9294777976932365dabb6640cf1468d95c70f" [[projects]] branch = "master" + digest = "1:c12b53b9584c4f2a8a28e8482fcc419b00ca7d35655390bfe8d6a6f90cb93e86" name = "golang.org/x/oauth2" - packages = [".","google","internal","jws","jwt"] + packages = [ + ".", + "google", + "internal", + "jws", + "jwt", + ] + pruneopts = "" revision = "ea8c6730ed5beeff685fcd20d17423a8546daf6c" [[projects]] branch = "master" + digest = "1:a52cd7f8c2bbc247318084baffb4ea34754945c4f85fbf42c0bfcebf27704c52" name = "golang.org/x/sys" - packages = ["unix","windows"] + packages = [ + "unix", + "windows", + ] + pruneopts = "" revision = "8b4580aae2a0dd0c231a45d3ccb8434ff533b840" [[projects]] branch = "master" + digest = "1:f327aaa70ddb1a01208c3b1e655e79374662c1abc77053484b5cf1cd0d46ca03" name = "golang.org/x/text" - packages = ["collate","collate/build","internal/colltab","internal/gen","internal/tag","internal/triegen","internal/ucd","language","secure/bidirule","transform","unicode/bidi","unicode/cldr","unicode/norm","unicode/rangetable","width"] + packages = [ + "collate", + "collate/build", + "internal/colltab", + "internal/gen", + "internal/tag", + "internal/triegen", + "internal/ucd", + "language", + "secure/bidirule", + "transform", + "unicode/bidi", + "unicode/cldr", + "unicode/norm", + "unicode/rangetable", + "width", + ] + pruneopts = "" revision = "57961680700a5336d15015c8c50686ca5ba362a4" [[projects]] + digest = "1:934fb8966f303ede63aa405e2c8d7f0a427a05ea8df335dfdc1833dd4d40756f" name = "google.golang.org/appengine" - packages = [".","internal","internal/app_identity","internal/base","internal/datastore","internal/log","internal/modules","internal/remote_api","internal/urlfetch","urlfetch"] + packages = [ + ".", + "internal", + "internal/app_identity", + "internal/base", + "internal/datastore", + "internal/log", + "internal/modules", + "internal/remote_api", + "internal/urlfetch", + "urlfetch", + ] + pruneopts = "" revision = "150dc57a1b433e64154302bdc40b6bb8aefa313a" version = "v1.0.0" [[projects]] branch = "master" + digest = "1:6c15114fafeac4c833544476dec4207a3476799d50ab5165af79eb97806884cf" name = "google.golang.org/genproto" - packages = ["googleapis/api/annotations","googleapis/rpc/status"] + packages = [ + "googleapis/api/annotations", + "googleapis/rpc/status", + ] + pruneopts = "" revision = "7f0da29060c682909f650ad8ed4e515bd74fa12a" [[projects]] + digest = "1:6c00b4702c146631d30396090d40bfc0486f8b3af5c976d6f0daf2bc737cd7b2" name = "google.golang.org/grpc" - packages = [".","balancer","balancer/roundrobin","codes","connectivity","credentials","encoding","grpclb/grpc_lb_v1/messages","grpclog","health/grpc_health_v1","internal","keepalive","metadata","naming","peer","resolver","resolver/dns","resolver/manual","resolver/passthrough","stats","status","tap","transport"] + packages = [ + ".", + "balancer", + "balancer/roundrobin", + "codes", + "connectivity", + "credentials", + "encoding", + "grpclb/grpc_lb_v1/messages", + "grpclog", + "health/grpc_health_v1", + "internal", + "keepalive", + "metadata", + "naming", + "peer", + "resolver", + "resolver/dns", + "resolver/manual", + "resolver/passthrough", + "stats", + "status", + "tap", + "transport", + ] + pruneopts = "" revision = "be077907e29fdb945d351e4284eb5361e7f8924e" version = "v1.8.1" [[projects]] + digest = "1:e5d1fb981765b6f7513f793a3fcaac7158408cca77f75f7311ac82cc88e9c445" name = "gopkg.in/inf.v0" packages = ["."] + pruneopts = "" revision = "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4" version = "v0.9.0" [[projects]] branch = "v2" + digest = "1:f769ed60e075e4221612c2f4162fccc9d3795ef358fa463425e3b3d7a5debb27" name = "gopkg.in/yaml.v2" packages = ["."] + pruneopts = "" revision = "287cf08546ab5e7e37d55a84f7ed3fd1db036de5" [[projects]] - branch = "release-1.8" + digest = "1:9f1b48973389df359b2a2b3f16b3ad94ccd81f85475d8460986542cb32c60d93" name = "k8s.io/api" - packages = ["admissionregistration/v1alpha1","apps/v1beta1","apps/v1beta2","authentication/v1","authentication/v1beta1","authorization/v1","authorization/v1beta1","autoscaling/v1","autoscaling/v2beta1","batch/v1","batch/v1beta1","batch/v2alpha1","certificates/v1beta1","core/v1","extensions/v1beta1","networking/v1","policy/v1beta1","rbac/v1","rbac/v1alpha1","rbac/v1beta1","scheduling/v1alpha1","settings/v1alpha1","storage/v1","storage/v1beta1"] + packages = [ + "admissionregistration/v1alpha1", + "apps/v1beta1", + "apps/v1beta2", + "authentication/v1", + "authentication/v1beta1", + "authorization/v1", + "authorization/v1beta1", + "autoscaling/v1", + "autoscaling/v2beta1", + "batch/v1", + "batch/v1beta1", + "batch/v2alpha1", + "certificates/v1beta1", + "core/v1", + "extensions/v1beta1", + "networking/v1", + "policy/v1beta1", + "rbac/v1", + "rbac/v1alpha1", + "rbac/v1beta1", + "scheduling/v1alpha1", + "settings/v1alpha1", + "storage/v1", + "storage/v1beta1", + ] + pruneopts = "" revision = "4df58c811fe2e65feb879227b2b245e4dc26e7ad" + version = "kubernetes-1.8.2" [[projects]] + digest = "1:df69b7ff40d98744f3a1d21ee15b154cb1c2dea02e9a5c447192aebf291a8f7f" name = "k8s.io/apiextensions-apiserver" - packages = ["pkg/apis/apiextensions","pkg/apis/apiextensions/v1beta1","pkg/client/clientset/clientset","pkg/client/clientset/clientset/scheme","pkg/client/clientset/clientset/typed/apiextensions/v1beta1"] + packages = [ + "pkg/apis/apiextensions", + "pkg/apis/apiextensions/v1beta1", + "pkg/client/clientset/clientset", + "pkg/client/clientset/clientset/scheme", + "pkg/client/clientset/clientset/typed/apiextensions/v1beta1", + ] + pruneopts = "" revision = "e509bb64fe1116e12a32273a2032426aa1a5fd26" version = "kubernetes-1.8.2" [[projects]] - branch = "release-1.8" + digest = "1:c3fe502bdb9ff04373ff788583e8d8e581def0ebec4c63ef3311f031a6ce60fc" name = "k8s.io/apimachinery" - packages = ["pkg/api/equality","pkg/api/errors","pkg/api/meta","pkg/api/resource","pkg/apis/meta/internalversion","pkg/apis/meta/v1","pkg/apis/meta/v1/unstructured","pkg/apis/meta/v1alpha1","pkg/conversion","pkg/conversion/queryparams","pkg/conversion/unstructured","pkg/fields","pkg/labels","pkg/runtime","pkg/runtime/schema","pkg/runtime/serializer","pkg/runtime/serializer/json","pkg/runtime/serializer/protobuf","pkg/runtime/serializer/recognizer","pkg/runtime/serializer/streaming","pkg/runtime/serializer/versioning","pkg/selection","pkg/types","pkg/util/cache","pkg/util/clock","pkg/util/diff","pkg/util/errors","pkg/util/framer","pkg/util/intstr","pkg/util/json","pkg/util/mergepatch","pkg/util/net","pkg/util/rand","pkg/util/runtime","pkg/util/sets","pkg/util/strategicpatch","pkg/util/validation","pkg/util/validation/field","pkg/util/wait","pkg/util/yaml","pkg/version","pkg/watch","third_party/forked/golang/json","third_party/forked/golang/reflect"] + packages = [ + "pkg/api/equality", + "pkg/api/errors", + "pkg/api/meta", + "pkg/api/resource", + "pkg/apis/meta/internalversion", + "pkg/apis/meta/v1", + "pkg/apis/meta/v1/unstructured", + "pkg/apis/meta/v1alpha1", + "pkg/conversion", + "pkg/conversion/queryparams", + "pkg/conversion/unstructured", + "pkg/fields", + "pkg/labels", + "pkg/runtime", + "pkg/runtime/schema", + "pkg/runtime/serializer", + "pkg/runtime/serializer/json", + "pkg/runtime/serializer/protobuf", + "pkg/runtime/serializer/recognizer", + "pkg/runtime/serializer/streaming", + "pkg/runtime/serializer/versioning", + "pkg/selection", + "pkg/types", + "pkg/util/cache", + "pkg/util/clock", + "pkg/util/diff", + "pkg/util/errors", + "pkg/util/framer", + "pkg/util/intstr", + "pkg/util/json", + "pkg/util/mergepatch", + "pkg/util/net", + "pkg/util/rand", + "pkg/util/runtime", + "pkg/util/sets", + "pkg/util/strategicpatch", + "pkg/util/validation", + "pkg/util/validation/field", + "pkg/util/wait", + "pkg/util/yaml", + "pkg/version", + "pkg/watch", + "third_party/forked/golang/json", + "third_party/forked/golang/reflect", + ] + pruneopts = "" revision = "019ae5ada31de202164b118aee88ee2d14075c31" + version = "kubernetes-1.8.2" [[projects]] + digest = "1:2a8bca256affa19117c0ed993631e02d66556bd5145ee8a165e208f47942311b" name = "k8s.io/client-go" - packages = ["discovery","discovery/fake","kubernetes","kubernetes/scheme","kubernetes/typed/admissionregistration/v1alpha1","kubernetes/typed/apps/v1beta1","kubernetes/typed/apps/v1beta2","kubernetes/typed/authentication/v1","kubernetes/typed/authentication/v1beta1","kubernetes/typed/authorization/v1","kubernetes/typed/authorization/v1beta1","kubernetes/typed/autoscaling/v1","kubernetes/typed/autoscaling/v2beta1","kubernetes/typed/batch/v1","kubernetes/typed/batch/v1beta1","kubernetes/typed/batch/v2alpha1","kubernetes/typed/certificates/v1beta1","kubernetes/typed/core/v1","kubernetes/typed/extensions/v1beta1","kubernetes/typed/networking/v1","kubernetes/typed/policy/v1beta1","kubernetes/typed/rbac/v1","kubernetes/typed/rbac/v1alpha1","kubernetes/typed/rbac/v1beta1","kubernetes/typed/scheduling/v1alpha1","kubernetes/typed/settings/v1alpha1","kubernetes/typed/storage/v1","kubernetes/typed/storage/v1beta1","pkg/version","plugin/pkg/client/auth/gcp","rest","rest/watch","testing","third_party/forked/golang/template","tools/auth","tools/cache","tools/clientcmd","tools/clientcmd/api","tools/clientcmd/api/latest","tools/clientcmd/api/v1","tools/leaderelection","tools/leaderelection/resourcelock","tools/metrics","tools/pager","tools/record","tools/reference","transport","util/cert","util/flowcontrol","util/homedir","util/integer","util/jsonpath","util/workqueue"] + packages = [ + "discovery", + "discovery/fake", + "kubernetes", + "kubernetes/scheme", + "kubernetes/typed/admissionregistration/v1alpha1", + "kubernetes/typed/apps/v1beta1", + "kubernetes/typed/apps/v1beta2", + "kubernetes/typed/authentication/v1", + "kubernetes/typed/authentication/v1beta1", + "kubernetes/typed/authorization/v1", + "kubernetes/typed/authorization/v1beta1", + "kubernetes/typed/autoscaling/v1", + "kubernetes/typed/autoscaling/v2beta1", + "kubernetes/typed/batch/v1", + "kubernetes/typed/batch/v1beta1", + "kubernetes/typed/batch/v2alpha1", + "kubernetes/typed/certificates/v1beta1", + "kubernetes/typed/core/v1", + "kubernetes/typed/extensions/v1beta1", + "kubernetes/typed/networking/v1", + "kubernetes/typed/policy/v1beta1", + "kubernetes/typed/rbac/v1", + "kubernetes/typed/rbac/v1alpha1", + "kubernetes/typed/rbac/v1beta1", + "kubernetes/typed/scheduling/v1alpha1", + "kubernetes/typed/settings/v1alpha1", + "kubernetes/typed/storage/v1", + "kubernetes/typed/storage/v1beta1", + "pkg/version", + "plugin/pkg/client/auth/gcp", + "rest", + "rest/watch", + "testing", + "third_party/forked/golang/template", + "tools/auth", + "tools/cache", + "tools/clientcmd", + "tools/clientcmd/api", + "tools/clientcmd/api/latest", + "tools/clientcmd/api/v1", + "tools/leaderelection", + "tools/leaderelection/resourcelock", + "tools/metrics", + "tools/pager", + "tools/record", + "tools/reference", + "transport", + "util/cert", + "util/flowcontrol", + "util/homedir", + "util/integer", + "util/jsonpath", + "util/workqueue", + ] + pruneopts = "" revision = "35ccd4336052e7d73018b1382413534936f34eee" version = "kubernetes-1.8.2" [[projects]] branch = "master" + digest = "1:a9d105f5efd3ef790d2dc2d3e13b70aff474003b811dcf3cd792ca78c0339c1b" name = "k8s.io/kube-openapi" packages = ["pkg/common"] + pruneopts = "" revision = "c4fd2f0a5bff91647fd75e77ea52a8722264b0ce" [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "fe829f2cdb7732914b0e23710d1aa01a8416cad3d1b7f39cc1e628b71d1bde9a" + input-imports = [ + "github.com/coreos/etcd-operator/pkg/apis/etcd/v1beta2", + "github.com/coreos/etcd-operator/pkg/client", + "github.com/coreos/etcd-operator/pkg/generated/clientset/versioned", + "github.com/coreos/etcd-operator/pkg/util/etcdutil", + "github.com/coreos/etcd-operator/pkg/util/k8sutil", + "github.com/coreos/etcd-operator/pkg/util/probe", + "github.com/coreos/etcd-operator/pkg/util/retryutil", + "github.com/coreos/etcd-operator/test/e2e/e2eutil", + "github.com/coreos/vault-operator/pkg/apis/vault/v1alpha1", + "github.com/coreos/vault-operator/pkg/client", + "github.com/coreos/vault-operator/pkg/generated/clientset/versioned", + "github.com/coreos/vault-operator/pkg/generated/clientset/versioned/scheme", + "github.com/coreos/vault-operator/pkg/generated/clientset/versioned/typed/vault/v1alpha1", + "github.com/coreos/vault-operator/pkg/generated/clientset/versioned/typed/vault/v1alpha1/fake", + "github.com/coreos/vault-operator/pkg/generated/informers/externalversions/internalinterfaces", + "github.com/coreos/vault-operator/pkg/generated/informers/externalversions/vault", + "github.com/coreos/vault-operator/pkg/generated/informers/externalversions/vault/v1alpha1", + "github.com/coreos/vault-operator/pkg/generated/listers/vault/v1alpha1", + "github.com/coreos/vault-operator/pkg/operator", + "github.com/coreos/vault-operator/pkg/util/k8sutil", + "github.com/coreos/vault-operator/pkg/util/probe", + "github.com/coreos/vault-operator/pkg/util/tlsutil", + "github.com/coreos/vault-operator/pkg/util/vaultutil", + "github.com/coreos/vault-operator/test/e2e/e2eutil", + "github.com/coreos/vault-operator/test/e2e/framework", + "github.com/coreos/vault-operator/test/e2e/upgradetest/framework", + "github.com/coreos/vault-operator/version", + "github.com/golang/glog", + "github.com/hashicorp/vault/api", + "github.com/sirupsen/logrus", + "k8s.io/api/apps/v1beta1", + "k8s.io/api/core/v1", + "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset", + "k8s.io/apimachinery/pkg/api/errors", + "k8s.io/apimachinery/pkg/apis/meta/v1", + "k8s.io/apimachinery/pkg/conversion", + "k8s.io/apimachinery/pkg/fields", + "k8s.io/apimachinery/pkg/labels", + "k8s.io/apimachinery/pkg/runtime", + "k8s.io/apimachinery/pkg/runtime/schema", + "k8s.io/apimachinery/pkg/runtime/serializer", + "k8s.io/apimachinery/pkg/types", + "k8s.io/apimachinery/pkg/util/intstr", + "k8s.io/apimachinery/pkg/util/wait", + "k8s.io/apimachinery/pkg/watch", + "k8s.io/client-go/discovery", + "k8s.io/client-go/discovery/fake", + "k8s.io/client-go/kubernetes", + "k8s.io/client-go/kubernetes/scheme", + "k8s.io/client-go/kubernetes/typed/core/v1", + "k8s.io/client-go/rest", + "k8s.io/client-go/testing", + "k8s.io/client-go/tools/cache", + "k8s.io/client-go/tools/clientcmd", + "k8s.io/client-go/tools/leaderelection", + "k8s.io/client-go/tools/leaderelection/resourcelock", + "k8s.io/client-go/tools/record", + "k8s.io/client-go/util/flowcontrol", + "k8s.io/client-go/util/workqueue", + ] solver-name = "gps-cdcl" solver-version = 1 diff --git a/example/deployment.yaml b/example/deployment.yaml index 8cc239a..794bf04 100644 --- a/example/deployment.yaml +++ b/example/deployment.yaml @@ -11,7 +11,7 @@ spec: spec: containers: - name: vault-operator - image: quay.io/coreos/vault-operator:latest + image: 239226036377.dkr.ecr.us-east-1.amazonaws.com/vault-operator:latest env: - name: MY_POD_NAMESPACE valueFrom: diff --git a/pkg/operator/controller.go b/pkg/operator/controller.go index 1b2956a..f01c60a 100644 --- a/pkg/operator/controller.go +++ b/pkg/operator/controller.go @@ -66,11 +66,14 @@ func (v *Vaults) run(ctx context.Context) { func (v *Vaults) onAddVault(obj interface{}) { key, err := cache.MetaNamespaceKeyFunc(obj) + annotations := api.GetAnnotations() if err != nil { panic(err) } v.queue.Add(key) - logrus.Infof("Vault CR (%s) is created", key) + logrus.Infof("Vault CR (%s) is created", annotations) + //annotations := api.GetAnnotations() + //logrus.Infof("Annotations: %s", annotations) } func (v *Vaults) onUpdateVault(oldObj, newObj interface{}) { diff --git a/pkg/util/k8sutil/vault.go b/pkg/util/k8sutil/vault.go index 44c6cb8..b3009df 100644 --- a/pkg/util/k8sutil/vault.go +++ b/pkg/util/k8sutil/vault.go @@ -22,6 +22,7 @@ import ( api "github.com/coreos/vault-operator/pkg/apis/vault/v1alpha1" "github.com/coreos/vault-operator/pkg/util/vaultutil" + "github.com/golang/glog" etcdCRAPI "github.com/coreos/etcd-operator/pkg/apis/etcd/v1beta2" etcdCRClient "github.com/coreos/etcd-operator/pkg/generated/clientset/versioned" @@ -235,11 +236,15 @@ func statsdExporterContainer() v1.Container { // it and return no error. It is safe to retry on this function. func DeployVault(kubecli kubernetes.Interface, v *api.VaultService) error { selector := LabelsForVault(v.GetName()) + annotations := v.GetAnnotations() + glog.Warnf(annotations) + fmt.Printf(annotations) podTempl := v1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Name: v.GetName(), Labels: selector, + // Annotations: v.GetAnnotations() }, Spec: v1.PodSpec{ Containers: []v1.Container{vaultContainer(v), statsdExporterContainer()}, From 7cdd5f6c4d32b090e67e6a68ff54c7981b28983c Mon Sep 17 00:00:00 2001 From: Saad Rana Date: Mon, 11 Mar 2019 15:55:33 -0700 Subject: [PATCH 2/6] pkg/util: add annotations support --- Gopkg.lock | 69 -------------------------------------- pkg/operator/controller.go | 5 +-- pkg/util/k8sutil/vault.go | 6 +--- 3 files changed, 2 insertions(+), 78 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index d83b4af..39fd7aa 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -51,28 +51,6 @@ revision = "b0e76431638de15ec1e6be51b6f745e1f2134fde" version = "v1.12.63" -[[projects]] - digest = "1:6811ad355c0a0a602c8ae0bef0d999bdcbeedf05604ba7db382722182139f2fc" - name = "github.com/coreos-inc/vault-operator" - packages = [ - "pkg/apis/vault/v1alpha1", - "pkg/client", - "pkg/generated/clientset/versioned", - "pkg/generated/clientset/versioned/scheme", - "pkg/generated/clientset/versioned/typed/vault/v1alpha1", - "pkg/generated/informers/externalversions/internalinterfaces", - "pkg/generated/informers/externalversions/vault/v1alpha1", - "pkg/generated/listers/vault/v1alpha1", - "pkg/util/k8sutil", - "pkg/util/probe", - "pkg/util/tlsutil", - "pkg/util/vaultutil", - "test/e2e/e2eutil", - ] - pruneopts = "" - revision = "43a1dd73183fd9d40b40e6f1e58b465c784d11a5" - version = "0.1.9" - [[projects]] digest = "1:0af98a9f37993282a01fbb948a53bcf96053151ba61f9f00b762467099d83727" name = "github.com/coreos/etcd" @@ -110,34 +88,6 @@ revision = "85c37511b1293a530ab98c0118e117a30ad0fe26" version = "v0.8.3" -[[projects]] - digest = "1:6811ad355c0a0a602c8ae0bef0d999bdcbeedf05604ba7db382722182139f2fc" - name = "github.com/coreos/vault-operator" - packages = [ - "pkg/apis/vault/v1alpha1", - "pkg/client", - "pkg/generated/clientset/versioned", - "pkg/generated/clientset/versioned/scheme", - "pkg/generated/clientset/versioned/typed/vault/v1alpha1", - "pkg/generated/clientset/versioned/typed/vault/v1alpha1/fake", - "pkg/generated/informers/externalversions/internalinterfaces", - "pkg/generated/informers/externalversions/vault", - "pkg/generated/informers/externalversions/vault/v1alpha1", - "pkg/generated/listers/vault/v1alpha1", - "pkg/operator", - "pkg/util/k8sutil", - "pkg/util/probe", - "pkg/util/tlsutil", - "pkg/util/vaultutil", - "test/e2e/e2eutil", - "test/e2e/framework", - "test/e2e/upgradetest/framework", - "version", - ] - pruneopts = "" - revision = "43a1dd73183fd9d40b40e6f1e58b465c784d11a5" - version = "0.1.9" - [[projects]] digest = "1:56c130d885a4aacae1dd9c7b71cfe39912c7ebc1ff7d2b46083c8812996dc43b" name = "github.com/davecgh/go-spew" @@ -833,25 +783,6 @@ "github.com/coreos/etcd-operator/pkg/util/probe", "github.com/coreos/etcd-operator/pkg/util/retryutil", "github.com/coreos/etcd-operator/test/e2e/e2eutil", - "github.com/coreos/vault-operator/pkg/apis/vault/v1alpha1", - "github.com/coreos/vault-operator/pkg/client", - "github.com/coreos/vault-operator/pkg/generated/clientset/versioned", - "github.com/coreos/vault-operator/pkg/generated/clientset/versioned/scheme", - "github.com/coreos/vault-operator/pkg/generated/clientset/versioned/typed/vault/v1alpha1", - "github.com/coreos/vault-operator/pkg/generated/clientset/versioned/typed/vault/v1alpha1/fake", - "github.com/coreos/vault-operator/pkg/generated/informers/externalversions/internalinterfaces", - "github.com/coreos/vault-operator/pkg/generated/informers/externalversions/vault", - "github.com/coreos/vault-operator/pkg/generated/informers/externalversions/vault/v1alpha1", - "github.com/coreos/vault-operator/pkg/generated/listers/vault/v1alpha1", - "github.com/coreos/vault-operator/pkg/operator", - "github.com/coreos/vault-operator/pkg/util/k8sutil", - "github.com/coreos/vault-operator/pkg/util/probe", - "github.com/coreos/vault-operator/pkg/util/tlsutil", - "github.com/coreos/vault-operator/pkg/util/vaultutil", - "github.com/coreos/vault-operator/test/e2e/e2eutil", - "github.com/coreos/vault-operator/test/e2e/framework", - "github.com/coreos/vault-operator/test/e2e/upgradetest/framework", - "github.com/coreos/vault-operator/version", "github.com/golang/glog", "github.com/hashicorp/vault/api", "github.com/sirupsen/logrus", diff --git a/pkg/operator/controller.go b/pkg/operator/controller.go index f01c60a..1b2956a 100644 --- a/pkg/operator/controller.go +++ b/pkg/operator/controller.go @@ -66,14 +66,11 @@ func (v *Vaults) run(ctx context.Context) { func (v *Vaults) onAddVault(obj interface{}) { key, err := cache.MetaNamespaceKeyFunc(obj) - annotations := api.GetAnnotations() if err != nil { panic(err) } v.queue.Add(key) - logrus.Infof("Vault CR (%s) is created", annotations) - //annotations := api.GetAnnotations() - //logrus.Infof("Annotations: %s", annotations) + logrus.Infof("Vault CR (%s) is created", key) } func (v *Vaults) onUpdateVault(oldObj, newObj interface{}) { diff --git a/pkg/util/k8sutil/vault.go b/pkg/util/k8sutil/vault.go index b3009df..f3e0a0b 100644 --- a/pkg/util/k8sutil/vault.go +++ b/pkg/util/k8sutil/vault.go @@ -22,7 +22,6 @@ import ( api "github.com/coreos/vault-operator/pkg/apis/vault/v1alpha1" "github.com/coreos/vault-operator/pkg/util/vaultutil" - "github.com/golang/glog" etcdCRAPI "github.com/coreos/etcd-operator/pkg/apis/etcd/v1beta2" etcdCRClient "github.com/coreos/etcd-operator/pkg/generated/clientset/versioned" @@ -236,15 +235,12 @@ func statsdExporterContainer() v1.Container { // it and return no error. It is safe to retry on this function. func DeployVault(kubecli kubernetes.Interface, v *api.VaultService) error { selector := LabelsForVault(v.GetName()) - annotations := v.GetAnnotations() - glog.Warnf(annotations) - fmt.Printf(annotations) podTempl := v1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Name: v.GetName(), Labels: selector, - // Annotations: v.GetAnnotations() + Annotations: v.GetAnnotations(), }, Spec: v1.PodSpec{ Containers: []v1.Container{vaultContainer(v), statsdExporterContainer()}, From a0b878aa7470b7c3351b421f3f670f0fffd4dfec Mon Sep 17 00:00:00 2001 From: Saad Rana Date: Mon, 11 Mar 2019 16:36:05 -0700 Subject: [PATCH 3/6] removed temporary examplee change --- example/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/deployment.yaml b/example/deployment.yaml index 794bf04..8cc239a 100644 --- a/example/deployment.yaml +++ b/example/deployment.yaml @@ -11,7 +11,7 @@ spec: spec: containers: - name: vault-operator - image: 239226036377.dkr.ecr.us-east-1.amazonaws.com/vault-operator:latest + image: quay.io/coreos/vault-operator:latest env: - name: MY_POD_NAMESPACE valueFrom: From aa34065b7cf81e249d3d93fbb1cd863e9e1c4545 Mon Sep 17 00:00:00 2001 From: Saad Rana Date: Fri, 15 Mar 2019 18:37:12 -0700 Subject: [PATCH 4/6] pkg/util: updated run cmd for official image Signed-off-by: Saad Rana --- pkg/util/k8sutil/vault.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/util/k8sutil/vault.go b/pkg/util/k8sutil/vault.go index f3e0a0b..d3e7480 100644 --- a/pkg/util/k8sutil/vault.go +++ b/pkg/util/k8sutil/vault.go @@ -146,9 +146,9 @@ func vaultContainer(v *api.VaultService) v1.Container { Name: "vault", Image: fmt.Sprintf("%s:%s", v.Spec.BaseImage, v.Spec.Version), Command: []string{ - "/bin/vault", - "server", - "-config=" + VaultConfigPath, + "sh", + "-c", + "apk --no-cache add curl && setcap cap_ipc_lock=+ep $(readlink -f $(which vault)) && exec /bin/vault server -config=" + VaultConfigPath, }, Env: []v1.EnvVar{ { From b70f08e3d1db22eeb91477e44fec454cf67a7e6a Mon Sep 17 00:00:00 2001 From: Saad Rana Date: Thu, 18 Apr 2019 13:16:42 -0700 Subject: [PATCH 5/6] Envar support for annotationns. --- pkg/util/k8sutil/vault.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/util/k8sutil/vault.go b/pkg/util/k8sutil/vault.go index d3e7480..d673e4e 100644 --- a/pkg/util/k8sutil/vault.go +++ b/pkg/util/k8sutil/vault.go @@ -43,6 +43,7 @@ var ( vaultConfigVolName = "vault-config" evnVaultRedirectAddr = "VAULT_API_ADDR" evnVaultClusterAddr = "VAULT_CLUSTER_ADDR" + evnAnnotationHash = "CONFIG_MAP_HASH" ) const ( @@ -142,6 +143,9 @@ func DeleteEtcdCluster(etcdCRCli etcdCRClient.Interface, v *api.VaultService) er } func vaultContainer(v *api.VaultService) v1.Container { + annotations := v.GetAnnotations() + configMapHash := annotations["hash"] + return v1.Container{ Name: "vault", Image: fmt.Sprintf("%s:%s", v.Spec.BaseImage, v.Spec.Version), @@ -159,6 +163,10 @@ func vaultContainer(v *api.VaultService) v1.Container { Name: evnVaultClusterAddr, Value: VaultServiceURL(v.GetName(), v.GetNamespace(), vaultClusterPort), }, + { + Name: evnAnnotationHash, + Value: configMapHash, + }, }, VolumeMounts: []v1.VolumeMount{{ Name: vaultConfigVolName, From aa7710bb536da5e36fbb207811793fee1c1755ba Mon Sep 17 00:00:00 2001 From: Saad Rana Date: Tue, 23 Apr 2019 18:11:58 -0700 Subject: [PATCH 6/6] updated operator with env spec. --- pkg/apis/vault/v1alpha1/types.go | 8 ++++++++ pkg/util/k8sutil/vault.go | 5 +---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pkg/apis/vault/v1alpha1/types.go b/pkg/apis/vault/v1alpha1/types.go index 87128b7..0f50d6c 100644 --- a/pkg/apis/vault/v1alpha1/types.go +++ b/pkg/apis/vault/v1alpha1/types.go @@ -23,6 +23,7 @@ const ( defaultBaseImage = "quay.io/coreos/vault" // version format is "-" defaultVersion = "0.9.1-0" + defaultConfigMapHash = "QC4hpsVMtN/vk+w2Htu6+eyxslwD0QITxA5SNGW6CrPb8gtLwRGEsJ0wBl9F4Gg0x569GV" ) type ClusterPhase string @@ -61,6 +62,9 @@ type VaultServiceSpec struct { // Version of Vault to be deployed. Version string `json:"version"` + // configMapHash of Vault configmap. + ConfigMapHash string `json:"configMapHash"` + // Pod defines the policy for pods owned by vault operator. // This field cannot be updated once the CR is created. Pod *PodPolicy `json:"pod,omitempty"` @@ -97,6 +101,10 @@ func (v *VaultService) SetDefaults() bool { vs.Version = defaultVersion changed = true } + if len(vs.ConfigMapHash) == 0 { + vs.ConfigMapHash = defaultConfigMapHash + changed = true + } if vs.TLS == nil { vs.TLS = &TLSPolicy{Static: &StaticTLS{ ServerSecret: DefaultVaultServerTLSSecretName(v.Name), diff --git a/pkg/util/k8sutil/vault.go b/pkg/util/k8sutil/vault.go index d673e4e..8a1d696 100644 --- a/pkg/util/k8sutil/vault.go +++ b/pkg/util/k8sutil/vault.go @@ -143,9 +143,6 @@ func DeleteEtcdCluster(etcdCRCli etcdCRClient.Interface, v *api.VaultService) er } func vaultContainer(v *api.VaultService) v1.Container { - annotations := v.GetAnnotations() - configMapHash := annotations["hash"] - return v1.Container{ Name: "vault", Image: fmt.Sprintf("%s:%s", v.Spec.BaseImage, v.Spec.Version), @@ -165,7 +162,7 @@ func vaultContainer(v *api.VaultService) v1.Container { }, { Name: evnAnnotationHash, - Value: configMapHash, + Value: v.Spec.ConfigMapHash, }, }, VolumeMounts: []v1.VolumeMount{{