diff --git a/Gopkg.lock b/Gopkg.lock index 405738af6f..8a7b4af157 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -622,6 +622,15 @@ pruneopts = "UT" revision = "9184fe7a2d7c920b8cdd30faa64fe025f609ef20" +[[projects]] + digest = "1:06271c18f99ea67b3ee8bf029ea916fa025f937e5a5fe60fd706681416edbea9" + name = "github.com/fvbommel/sortorder" + packages = ["."] + pruneopts = "UT" + revision = "a1ddee917217bbd0691affdca9c88d24d3f5c27d" + source = "github.com/fvbommel/sortorder" + version = "v1.0.1" + [[projects]] digest = "1:9c7c893401418efb15ee4b037cf37947e68db61288219204624d5174efad6930" name = "github.com/garyburd/redigo" @@ -2649,8 +2658,8 @@ revision = "804254d5600483f35d94e1cab8b10d40310def3d" [[projects]] - branch = "release-2.14" - digest = "1:ab1ade53af179bb25b66f01ad217d383ad80f08419232e417400f25e40c36bd8" + branch = "release-2.15" + digest = "1:40f4320f4c91d25037c57e3d5df0ccd6e0507f9adb44903412266687d7825df8" name = "k8s.io/helm" packages = [ "pkg/chartutil", @@ -2684,7 +2693,7 @@ "pkg/version", ] pruneopts = "UT" - revision = "0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085" + revision = "8dce272473e5f2a7bf58ce79bb5c3691db54c96b" [[projects]] digest = "1:e2999bf1bb6eddc2a6aa03fe5e6629120a53088926520ca3b4765f77d7ff7eab" @@ -2886,14 +2895,6 @@ revision = "fd68e9863619f6ec2fdd8625fe1f02e7c877e480" version = "v1.1.0" -[[projects]] - branch = "master" - digest = "1:9132eacc44d9bd1e03145ea2e9d4888800da7773d6edebb401f8cd34c9fb8380" - name = "vbom.ml/util" - packages = ["sortorder"] - pruneopts = "UT" - revision = "efcd4e0f97874370259c7d93e12aad57911dea81" - [solve-meta] analyzer-name = "dep" analyzer-version = 1 @@ -2951,6 +2952,7 @@ "github.com/fatih/color", "github.com/fsouza/go-dockerclient", "github.com/fsouza/go-dockerclient/testing", + "github.com/fvbommel/sortorder", "github.com/ghodss/yaml", "github.com/gizak/termui", "github.com/gogo/protobuf/gogoproto", diff --git a/Gopkg.toml b/Gopkg.toml index 224ab8b9b0..551167f2d1 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -20,10 +20,15 @@ # name = "github.com/x/y" # version = "2.4.0" +required = [ + "github.com/fvbommel/sortorder" +] + ignored = [ "github.com/Sirupsen/logrus", "github.com/gravitational/gravity/build/*", - "github.com/gravitational/gravity/e/build/*" + "github.com/gravitational/gravity/e/build/*", + "vbom.ml/util/sortorder" ] [prune] @@ -34,6 +39,10 @@ ignored = [ name = "github.com/gravitational/trace" version = "=1.1.11" +[[override]] + name = "github.com/fvbommel/sortorder" + source = "github.com/fvbommel/sortorder" + [[override]] name = "github.com/mitchellh/go-ps" source = "github.com/gravitational/go-ps" @@ -90,7 +99,7 @@ ignored = [ [[constraint]] name = "k8s.io/helm" - branch = "release-2.14" + branch = "release-2.15" [[override]] name = "k8s.io/apimachinery" diff --git a/Makefile b/Makefile index 87702495e1..f30835f395 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ RELEASE_OUT ?= TELEPORT_TAG = 3.2.13 # TELEPORT_REPOTAG adapts TELEPORT_TAG to the teleport tagging scheme TELEPORT_REPOTAG := v$(TELEPORT_TAG) -PLANET_TAG := 6.1.35-$(K8S_VER_SUFFIX) +PLANET_TAG := 6.1.36-$(K8S_VER_SUFFIX) PLANET_BRANCH := $(PLANET_TAG) K8S_APP_TAG := $(GRAVITY_TAG) TELEKUBE_APP_TAG := $(GRAVITY_TAG) @@ -53,8 +53,8 @@ DNS_APP_TAG = 0.4.0 BANDWAGON_TAG ?= 6.0.1 RBAC_APP_TAG := $(GRAVITY_TAG) # IMPORTANT: When updating tiller version, DO NOT FORGET to bump TILLER_APP_TAG as well! -TILLER_VERSION = 2.14.3 -TILLER_APP_TAG = 6.1.0 +TILLER_VERSION = 2.15.2 +TILLER_APP_TAG = 6.1.1 # URI of Wormhole container for default install WORMHOLE_IMG ?= quay.io/gravitational/wormhole:0.3.3 # set this to true if you want to use locally built planet packages @@ -764,6 +764,22 @@ validate-deps: $(eval VENDOR_UNTRACKED := $(shell git status --porcelain vendor)) @test -z "$(VENDOR_UNTRACKED)" || (echo "failed to recreate vendor from scratch and match it to git:\n $(VENDOR_UNTRACKED)" ; exit 1) +# +# this is a temporary target until we upgrade k8s.io packages +# to use fvbommel/sortorder. +# https://github.com/fvbommel/util/issues/6 +# +.PHONY: dep-ensure +dep-ensure: + dep version + dep ensure -v + dep status -v + $(MAKE) fix-sortorder fix-logrus + +.PHONY: fix-sortorder +fix-sortorder: + find vendor -name '*.go' -type f -print0 | xargs -0 sed -i 's/vbom.ml\/util/github.com\/fvbommel/g' + .PHONY: fix-logrus fix-logrus: find vendor -not \( -path vendor/github.com/fsouza -prune \) -name '*.go' -type f -print0 | xargs -0 sed -i 's/Sirupsen/sirupsen/g' diff --git a/vendor/github.com/fvbommel/sortorder/.gitignore b/vendor/github.com/fvbommel/sortorder/.gitignore new file mode 100644 index 0000000000..c021733e25 --- /dev/null +++ b/vendor/github.com/fvbommel/sortorder/.gitignore @@ -0,0 +1,19 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so +# Folders +_obj +_test +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* +_testmain.go +*.exe +*.test +*.prof diff --git a/vendor/vbom.ml/util/LICENSE b/vendor/github.com/fvbommel/sortorder/LICENSE similarity index 100% rename from vendor/vbom.ml/util/LICENSE rename to vendor/github.com/fvbommel/sortorder/LICENSE diff --git a/vendor/github.com/fvbommel/sortorder/README.md b/vendor/github.com/fvbommel/sortorder/README.md new file mode 100644 index 0000000000..7ebcab1d16 --- /dev/null +++ b/vendor/github.com/fvbommel/sortorder/README.md @@ -0,0 +1,5 @@ +# sortorder [![PkgGoDev](https://pkg.go.dev/badge/github.com/fvbommel/sortorder)](https://pkg.go.dev/github.com/fvbommel/sortorder) + + import "github.com/fvbommel/sortorder" + +Sort orders and comparison functions. diff --git a/vendor/vbom.ml/util/sortorder/doc.go b/vendor/github.com/fvbommel/sortorder/doc.go similarity index 78% rename from vendor/vbom.ml/util/sortorder/doc.go rename to vendor/github.com/fvbommel/sortorder/doc.go index 61b37a9374..75d5a2928f 100644 --- a/vendor/vbom.ml/util/sortorder/doc.go +++ b/vendor/github.com/fvbommel/sortorder/doc.go @@ -2,4 +2,4 @@ // // Currently, it only implements so-called "natural order", where integers // embedded in strings are compared by value. -package sortorder // import "vbom.ml/util/sortorder" +package sortorder diff --git a/vendor/github.com/fvbommel/sortorder/go.mod b/vendor/github.com/fvbommel/sortorder/go.mod new file mode 100644 index 0000000000..57c8175e3e --- /dev/null +++ b/vendor/github.com/fvbommel/sortorder/go.mod @@ -0,0 +1,3 @@ +module github.com/fvbommel/sortorder + +go 1.13 diff --git a/vendor/github.com/fvbommel/sortorder/go.sum b/vendor/github.com/fvbommel/sortorder/go.sum new file mode 100644 index 0000000000..e69de29bb2 diff --git a/vendor/vbom.ml/util/sortorder/natsort.go b/vendor/github.com/fvbommel/sortorder/natsort.go similarity index 100% rename from vendor/vbom.ml/util/sortorder/natsort.go rename to vendor/github.com/fvbommel/sortorder/natsort.go diff --git a/vendor/k8s.io/helm/pkg/chartutil/capabilities.go b/vendor/k8s.io/helm/pkg/chartutil/capabilities.go index b4533e417b..a6808c702e 100644 --- a/vendor/k8s.io/helm/pkg/chartutil/capabilities.go +++ b/vendor/k8s.io/helm/pkg/chartutil/capabilities.go @@ -12,6 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +//go:generate go run generator/capabilities_default_versions_generate.go package chartutil @@ -24,14 +25,15 @@ import ( ) var ( - // DefaultVersionSet is the default version set, which includes only Core V1 ("v1"). - DefaultVersionSet = NewVersionSet("v1") + // DefaultVersionSet is the default version set in included in Kubernetes for workloads + // Default versions as of Kubernetes 1.14 + DefaultVersionSet = NewVersionSet(defaultVersions()...) // DefaultKubeVersion is the default kubernetes version DefaultKubeVersion = &version.Info{ Major: "1", - Minor: "9", - GitVersion: "v1.9.0", + Minor: "14", + GitVersion: "v1.14.0", GoVersion: runtime.Version(), Compiler: runtime.Compiler, Platform: fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH), diff --git a/vendor/k8s.io/helm/pkg/chartutil/capabilities_versions_generated.go b/vendor/k8s.io/helm/pkg/chartutil/capabilities_versions_generated.go new file mode 100644 index 0000000000..370ad216cd --- /dev/null +++ b/vendor/k8s.io/helm/pkg/chartutil/capabilities_versions_generated.go @@ -0,0 +1,576 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by capabilities_default_versions_generate.go; DO NOT EDIT. + +package chartutil + +func defaultVersions() []string { + return []string{ + "__internal", + "__internal/WatchEvent", + "admissionregistration.k8s.io/__internal", + "admissionregistration.k8s.io/__internal/WatchEvent", + "admissionregistration.k8s.io/v1beta1", + "admissionregistration.k8s.io/v1beta1/CreateOptions", + "admissionregistration.k8s.io/v1beta1/DeleteOptions", + "admissionregistration.k8s.io/v1beta1/ExportOptions", + "admissionregistration.k8s.io/v1beta1/GetOptions", + "admissionregistration.k8s.io/v1beta1/ListOptions", + "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfiguration", + "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList", + "admissionregistration.k8s.io/v1beta1/PatchOptions", + "admissionregistration.k8s.io/v1beta1/UpdateOptions", + "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfiguration", + "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList", + "admissionregistration.k8s.io/v1beta1/WatchEvent", + "apps/__internal", + "apps/__internal/WatchEvent", + "apps/v1", + "apps/v1/ControllerRevision", + "apps/v1/ControllerRevisionList", + "apps/v1/CreateOptions", + "apps/v1/DaemonSet", + "apps/v1/DaemonSetList", + "apps/v1/DeleteOptions", + "apps/v1/Deployment", + "apps/v1/DeploymentList", + "apps/v1/ExportOptions", + "apps/v1/GetOptions", + "apps/v1/ListOptions", + "apps/v1/PatchOptions", + "apps/v1/ReplicaSet", + "apps/v1/ReplicaSetList", + "apps/v1/StatefulSet", + "apps/v1/StatefulSetList", + "apps/v1/UpdateOptions", + "apps/v1/WatchEvent", + "apps/v1beta1", + "apps/v1beta1/ControllerRevision", + "apps/v1beta1/ControllerRevisionList", + "apps/v1beta1/CreateOptions", + "apps/v1beta1/DeleteOptions", + "apps/v1beta1/Deployment", + "apps/v1beta1/DeploymentList", + "apps/v1beta1/DeploymentRollback", + "apps/v1beta1/ExportOptions", + "apps/v1beta1/GetOptions", + "apps/v1beta1/ListOptions", + "apps/v1beta1/PatchOptions", + "apps/v1beta1/Scale", + "apps/v1beta1/StatefulSet", + "apps/v1beta1/StatefulSetList", + "apps/v1beta1/UpdateOptions", + "apps/v1beta1/WatchEvent", + "apps/v1beta2", + "apps/v1beta2/ControllerRevision", + "apps/v1beta2/ControllerRevisionList", + "apps/v1beta2/CreateOptions", + "apps/v1beta2/DaemonSet", + "apps/v1beta2/DaemonSetList", + "apps/v1beta2/DeleteOptions", + "apps/v1beta2/Deployment", + "apps/v1beta2/DeploymentList", + "apps/v1beta2/ExportOptions", + "apps/v1beta2/GetOptions", + "apps/v1beta2/ListOptions", + "apps/v1beta2/PatchOptions", + "apps/v1beta2/ReplicaSet", + "apps/v1beta2/ReplicaSetList", + "apps/v1beta2/Scale", + "apps/v1beta2/StatefulSet", + "apps/v1beta2/StatefulSetList", + "apps/v1beta2/UpdateOptions", + "apps/v1beta2/WatchEvent", + "auditregistration.k8s.io/__internal", + "auditregistration.k8s.io/__internal/WatchEvent", + "auditregistration.k8s.io/v1alpha1", + "auditregistration.k8s.io/v1alpha1/AuditSink", + "auditregistration.k8s.io/v1alpha1/AuditSinkList", + "auditregistration.k8s.io/v1alpha1/CreateOptions", + "auditregistration.k8s.io/v1alpha1/DeleteOptions", + "auditregistration.k8s.io/v1alpha1/ExportOptions", + "auditregistration.k8s.io/v1alpha1/GetOptions", + "auditregistration.k8s.io/v1alpha1/ListOptions", + "auditregistration.k8s.io/v1alpha1/PatchOptions", + "auditregistration.k8s.io/v1alpha1/UpdateOptions", + "auditregistration.k8s.io/v1alpha1/WatchEvent", + "authentication.k8s.io/__internal", + "authentication.k8s.io/__internal/WatchEvent", + "authentication.k8s.io/v1", + "authentication.k8s.io/v1/CreateOptions", + "authentication.k8s.io/v1/DeleteOptions", + "authentication.k8s.io/v1/ExportOptions", + "authentication.k8s.io/v1/GetOptions", + "authentication.k8s.io/v1/ListOptions", + "authentication.k8s.io/v1/PatchOptions", + "authentication.k8s.io/v1/TokenRequest", + "authentication.k8s.io/v1/TokenReview", + "authentication.k8s.io/v1/UpdateOptions", + "authentication.k8s.io/v1/WatchEvent", + "authentication.k8s.io/v1beta1", + "authentication.k8s.io/v1beta1/CreateOptions", + "authentication.k8s.io/v1beta1/DeleteOptions", + "authentication.k8s.io/v1beta1/ExportOptions", + "authentication.k8s.io/v1beta1/GetOptions", + "authentication.k8s.io/v1beta1/ListOptions", + "authentication.k8s.io/v1beta1/PatchOptions", + "authentication.k8s.io/v1beta1/TokenReview", + "authentication.k8s.io/v1beta1/UpdateOptions", + "authentication.k8s.io/v1beta1/WatchEvent", + "authorization.k8s.io/__internal", + "authorization.k8s.io/__internal/WatchEvent", + "authorization.k8s.io/v1", + "authorization.k8s.io/v1/CreateOptions", + "authorization.k8s.io/v1/DeleteOptions", + "authorization.k8s.io/v1/ExportOptions", + "authorization.k8s.io/v1/GetOptions", + "authorization.k8s.io/v1/ListOptions", + "authorization.k8s.io/v1/LocalSubjectAccessReview", + "authorization.k8s.io/v1/PatchOptions", + "authorization.k8s.io/v1/SelfSubjectAccessReview", + "authorization.k8s.io/v1/SelfSubjectRulesReview", + "authorization.k8s.io/v1/SubjectAccessReview", + "authorization.k8s.io/v1/UpdateOptions", + "authorization.k8s.io/v1/WatchEvent", + "authorization.k8s.io/v1beta1", + "authorization.k8s.io/v1beta1/CreateOptions", + "authorization.k8s.io/v1beta1/DeleteOptions", + "authorization.k8s.io/v1beta1/ExportOptions", + "authorization.k8s.io/v1beta1/GetOptions", + "authorization.k8s.io/v1beta1/ListOptions", + "authorization.k8s.io/v1beta1/LocalSubjectAccessReview", + "authorization.k8s.io/v1beta1/PatchOptions", + "authorization.k8s.io/v1beta1/SelfSubjectAccessReview", + "authorization.k8s.io/v1beta1/SelfSubjectRulesReview", + "authorization.k8s.io/v1beta1/SubjectAccessReview", + "authorization.k8s.io/v1beta1/UpdateOptions", + "authorization.k8s.io/v1beta1/WatchEvent", + "autoscaling/__internal", + "autoscaling/__internal/WatchEvent", + "autoscaling/v1", + "autoscaling/v1/CreateOptions", + "autoscaling/v1/DeleteOptions", + "autoscaling/v1/ExportOptions", + "autoscaling/v1/GetOptions", + "autoscaling/v1/HorizontalPodAutoscaler", + "autoscaling/v1/HorizontalPodAutoscalerList", + "autoscaling/v1/ListOptions", + "autoscaling/v1/PatchOptions", + "autoscaling/v1/Scale", + "autoscaling/v1/UpdateOptions", + "autoscaling/v1/WatchEvent", + "autoscaling/v2beta1", + "autoscaling/v2beta1/CreateOptions", + "autoscaling/v2beta1/DeleteOptions", + "autoscaling/v2beta1/ExportOptions", + "autoscaling/v2beta1/GetOptions", + "autoscaling/v2beta1/HorizontalPodAutoscaler", + "autoscaling/v2beta1/HorizontalPodAutoscalerList", + "autoscaling/v2beta1/ListOptions", + "autoscaling/v2beta1/PatchOptions", + "autoscaling/v2beta1/UpdateOptions", + "autoscaling/v2beta1/WatchEvent", + "autoscaling/v2beta2", + "autoscaling/v2beta2/CreateOptions", + "autoscaling/v2beta2/DeleteOptions", + "autoscaling/v2beta2/ExportOptions", + "autoscaling/v2beta2/GetOptions", + "autoscaling/v2beta2/HorizontalPodAutoscaler", + "autoscaling/v2beta2/HorizontalPodAutoscalerList", + "autoscaling/v2beta2/ListOptions", + "autoscaling/v2beta2/PatchOptions", + "autoscaling/v2beta2/UpdateOptions", + "autoscaling/v2beta2/WatchEvent", + "batch/__internal", + "batch/__internal/WatchEvent", + "batch/v1", + "batch/v1/CreateOptions", + "batch/v1/DeleteOptions", + "batch/v1/ExportOptions", + "batch/v1/GetOptions", + "batch/v1/Job", + "batch/v1/JobList", + "batch/v1/ListOptions", + "batch/v1/PatchOptions", + "batch/v1/UpdateOptions", + "batch/v1/WatchEvent", + "batch/v1beta1", + "batch/v1beta1/CreateOptions", + "batch/v1beta1/CronJob", + "batch/v1beta1/CronJobList", + "batch/v1beta1/DeleteOptions", + "batch/v1beta1/ExportOptions", + "batch/v1beta1/GetOptions", + "batch/v1beta1/JobTemplate", + "batch/v1beta1/ListOptions", + "batch/v1beta1/PatchOptions", + "batch/v1beta1/UpdateOptions", + "batch/v1beta1/WatchEvent", + "batch/v2alpha1", + "batch/v2alpha1/CreateOptions", + "batch/v2alpha1/CronJob", + "batch/v2alpha1/CronJobList", + "batch/v2alpha1/DeleteOptions", + "batch/v2alpha1/ExportOptions", + "batch/v2alpha1/GetOptions", + "batch/v2alpha1/JobTemplate", + "batch/v2alpha1/ListOptions", + "batch/v2alpha1/PatchOptions", + "batch/v2alpha1/UpdateOptions", + "batch/v2alpha1/WatchEvent", + "certificates.k8s.io/__internal", + "certificates.k8s.io/__internal/WatchEvent", + "certificates.k8s.io/v1beta1", + "certificates.k8s.io/v1beta1/CertificateSigningRequest", + "certificates.k8s.io/v1beta1/CertificateSigningRequestList", + "certificates.k8s.io/v1beta1/CreateOptions", + "certificates.k8s.io/v1beta1/DeleteOptions", + "certificates.k8s.io/v1beta1/ExportOptions", + "certificates.k8s.io/v1beta1/GetOptions", + "certificates.k8s.io/v1beta1/ListOptions", + "certificates.k8s.io/v1beta1/PatchOptions", + "certificates.k8s.io/v1beta1/UpdateOptions", + "certificates.k8s.io/v1beta1/WatchEvent", + "coordination.k8s.io/__internal", + "coordination.k8s.io/__internal/WatchEvent", + "coordination.k8s.io/v1", + "coordination.k8s.io/v1/CreateOptions", + "coordination.k8s.io/v1/DeleteOptions", + "coordination.k8s.io/v1/ExportOptions", + "coordination.k8s.io/v1/GetOptions", + "coordination.k8s.io/v1/Lease", + "coordination.k8s.io/v1/LeaseList", + "coordination.k8s.io/v1/ListOptions", + "coordination.k8s.io/v1/PatchOptions", + "coordination.k8s.io/v1/UpdateOptions", + "coordination.k8s.io/v1/WatchEvent", + "coordination.k8s.io/v1beta1", + "coordination.k8s.io/v1beta1/CreateOptions", + "coordination.k8s.io/v1beta1/DeleteOptions", + "coordination.k8s.io/v1beta1/ExportOptions", + "coordination.k8s.io/v1beta1/GetOptions", + "coordination.k8s.io/v1beta1/Lease", + "coordination.k8s.io/v1beta1/LeaseList", + "coordination.k8s.io/v1beta1/ListOptions", + "coordination.k8s.io/v1beta1/PatchOptions", + "coordination.k8s.io/v1beta1/UpdateOptions", + "coordination.k8s.io/v1beta1/WatchEvent", + "events.k8s.io/__internal", + "events.k8s.io/__internal/WatchEvent", + "events.k8s.io/v1beta1", + "events.k8s.io/v1beta1/CreateOptions", + "events.k8s.io/v1beta1/DeleteOptions", + "events.k8s.io/v1beta1/Event", + "events.k8s.io/v1beta1/EventList", + "events.k8s.io/v1beta1/ExportOptions", + "events.k8s.io/v1beta1/GetOptions", + "events.k8s.io/v1beta1/ListOptions", + "events.k8s.io/v1beta1/PatchOptions", + "events.k8s.io/v1beta1/UpdateOptions", + "events.k8s.io/v1beta1/WatchEvent", + "extensions/__internal", + "extensions/__internal/WatchEvent", + "extensions/v1beta1", + "extensions/v1beta1/CreateOptions", + "extensions/v1beta1/DaemonSet", + "extensions/v1beta1/DaemonSetList", + "extensions/v1beta1/DeleteOptions", + "extensions/v1beta1/Deployment", + "extensions/v1beta1/DeploymentList", + "extensions/v1beta1/DeploymentRollback", + "extensions/v1beta1/ExportOptions", + "extensions/v1beta1/GetOptions", + "extensions/v1beta1/Ingress", + "extensions/v1beta1/IngressList", + "extensions/v1beta1/ListOptions", + "extensions/v1beta1/NetworkPolicy", + "extensions/v1beta1/NetworkPolicyList", + "extensions/v1beta1/PatchOptions", + "extensions/v1beta1/PodSecurityPolicy", + "extensions/v1beta1/PodSecurityPolicyList", + "extensions/v1beta1/ReplicaSet", + "extensions/v1beta1/ReplicaSetList", + "extensions/v1beta1/ReplicationControllerDummy", + "extensions/v1beta1/Scale", + "extensions/v1beta1/UpdateOptions", + "extensions/v1beta1/WatchEvent", + "networking.k8s.io/__internal", + "networking.k8s.io/__internal/WatchEvent", + "networking.k8s.io/v1", + "networking.k8s.io/v1/CreateOptions", + "networking.k8s.io/v1/DeleteOptions", + "networking.k8s.io/v1/ExportOptions", + "networking.k8s.io/v1/GetOptions", + "networking.k8s.io/v1/ListOptions", + "networking.k8s.io/v1/NetworkPolicy", + "networking.k8s.io/v1/NetworkPolicyList", + "networking.k8s.io/v1/PatchOptions", + "networking.k8s.io/v1/UpdateOptions", + "networking.k8s.io/v1/WatchEvent", + "networking.k8s.io/v1beta1", + "networking.k8s.io/v1beta1/CreateOptions", + "networking.k8s.io/v1beta1/DeleteOptions", + "networking.k8s.io/v1beta1/ExportOptions", + "networking.k8s.io/v1beta1/GetOptions", + "networking.k8s.io/v1beta1/Ingress", + "networking.k8s.io/v1beta1/IngressList", + "networking.k8s.io/v1beta1/ListOptions", + "networking.k8s.io/v1beta1/PatchOptions", + "networking.k8s.io/v1beta1/UpdateOptions", + "networking.k8s.io/v1beta1/WatchEvent", + "node.k8s.io/__internal", + "node.k8s.io/__internal/WatchEvent", + "node.k8s.io/v1alpha1", + "node.k8s.io/v1alpha1/CreateOptions", + "node.k8s.io/v1alpha1/DeleteOptions", + "node.k8s.io/v1alpha1/ExportOptions", + "node.k8s.io/v1alpha1/GetOptions", + "node.k8s.io/v1alpha1/ListOptions", + "node.k8s.io/v1alpha1/PatchOptions", + "node.k8s.io/v1alpha1/RuntimeClass", + "node.k8s.io/v1alpha1/RuntimeClassList", + "node.k8s.io/v1alpha1/UpdateOptions", + "node.k8s.io/v1alpha1/WatchEvent", + "node.k8s.io/v1beta1", + "node.k8s.io/v1beta1/CreateOptions", + "node.k8s.io/v1beta1/DeleteOptions", + "node.k8s.io/v1beta1/ExportOptions", + "node.k8s.io/v1beta1/GetOptions", + "node.k8s.io/v1beta1/ListOptions", + "node.k8s.io/v1beta1/PatchOptions", + "node.k8s.io/v1beta1/RuntimeClass", + "node.k8s.io/v1beta1/RuntimeClassList", + "node.k8s.io/v1beta1/UpdateOptions", + "node.k8s.io/v1beta1/WatchEvent", + "policy/__internal", + "policy/__internal/WatchEvent", + "policy/v1beta1", + "policy/v1beta1/CreateOptions", + "policy/v1beta1/DeleteOptions", + "policy/v1beta1/Eviction", + "policy/v1beta1/ExportOptions", + "policy/v1beta1/GetOptions", + "policy/v1beta1/ListOptions", + "policy/v1beta1/PatchOptions", + "policy/v1beta1/PodDisruptionBudget", + "policy/v1beta1/PodDisruptionBudgetList", + "policy/v1beta1/PodSecurityPolicy", + "policy/v1beta1/PodSecurityPolicyList", + "policy/v1beta1/UpdateOptions", + "policy/v1beta1/WatchEvent", + "rbac.authorization.k8s.io/__internal", + "rbac.authorization.k8s.io/__internal/WatchEvent", + "rbac.authorization.k8s.io/v1", + "rbac.authorization.k8s.io/v1/ClusterRole", + "rbac.authorization.k8s.io/v1/ClusterRoleBinding", + "rbac.authorization.k8s.io/v1/ClusterRoleBindingList", + "rbac.authorization.k8s.io/v1/ClusterRoleList", + "rbac.authorization.k8s.io/v1/CreateOptions", + "rbac.authorization.k8s.io/v1/DeleteOptions", + "rbac.authorization.k8s.io/v1/ExportOptions", + "rbac.authorization.k8s.io/v1/GetOptions", + "rbac.authorization.k8s.io/v1/ListOptions", + "rbac.authorization.k8s.io/v1/PatchOptions", + "rbac.authorization.k8s.io/v1/Role", + "rbac.authorization.k8s.io/v1/RoleBinding", + "rbac.authorization.k8s.io/v1/RoleBindingList", + "rbac.authorization.k8s.io/v1/RoleList", + "rbac.authorization.k8s.io/v1/UpdateOptions", + "rbac.authorization.k8s.io/v1/WatchEvent", + "rbac.authorization.k8s.io/v1alpha1", + "rbac.authorization.k8s.io/v1alpha1/ClusterRole", + "rbac.authorization.k8s.io/v1alpha1/ClusterRoleBinding", + "rbac.authorization.k8s.io/v1alpha1/ClusterRoleBindingList", + "rbac.authorization.k8s.io/v1alpha1/ClusterRoleList", + "rbac.authorization.k8s.io/v1alpha1/CreateOptions", + "rbac.authorization.k8s.io/v1alpha1/DeleteOptions", + "rbac.authorization.k8s.io/v1alpha1/ExportOptions", + "rbac.authorization.k8s.io/v1alpha1/GetOptions", + "rbac.authorization.k8s.io/v1alpha1/ListOptions", + "rbac.authorization.k8s.io/v1alpha1/PatchOptions", + "rbac.authorization.k8s.io/v1alpha1/Role", + "rbac.authorization.k8s.io/v1alpha1/RoleBinding", + "rbac.authorization.k8s.io/v1alpha1/RoleBindingList", + "rbac.authorization.k8s.io/v1alpha1/RoleList", + "rbac.authorization.k8s.io/v1alpha1/UpdateOptions", + "rbac.authorization.k8s.io/v1alpha1/WatchEvent", + "rbac.authorization.k8s.io/v1beta1", + "rbac.authorization.k8s.io/v1beta1/ClusterRole", + "rbac.authorization.k8s.io/v1beta1/ClusterRoleBinding", + "rbac.authorization.k8s.io/v1beta1/ClusterRoleBindingList", + "rbac.authorization.k8s.io/v1beta1/ClusterRoleList", + "rbac.authorization.k8s.io/v1beta1/CreateOptions", + "rbac.authorization.k8s.io/v1beta1/DeleteOptions", + "rbac.authorization.k8s.io/v1beta1/ExportOptions", + "rbac.authorization.k8s.io/v1beta1/GetOptions", + "rbac.authorization.k8s.io/v1beta1/ListOptions", + "rbac.authorization.k8s.io/v1beta1/PatchOptions", + "rbac.authorization.k8s.io/v1beta1/Role", + "rbac.authorization.k8s.io/v1beta1/RoleBinding", + "rbac.authorization.k8s.io/v1beta1/RoleBindingList", + "rbac.authorization.k8s.io/v1beta1/RoleList", + "rbac.authorization.k8s.io/v1beta1/UpdateOptions", + "rbac.authorization.k8s.io/v1beta1/WatchEvent", + "scheduling.k8s.io/__internal", + "scheduling.k8s.io/__internal/WatchEvent", + "scheduling.k8s.io/v1", + "scheduling.k8s.io/v1/CreateOptions", + "scheduling.k8s.io/v1/DeleteOptions", + "scheduling.k8s.io/v1/ExportOptions", + "scheduling.k8s.io/v1/GetOptions", + "scheduling.k8s.io/v1/ListOptions", + "scheduling.k8s.io/v1/PatchOptions", + "scheduling.k8s.io/v1/PriorityClass", + "scheduling.k8s.io/v1/PriorityClassList", + "scheduling.k8s.io/v1/UpdateOptions", + "scheduling.k8s.io/v1/WatchEvent", + "scheduling.k8s.io/v1alpha1", + "scheduling.k8s.io/v1alpha1/CreateOptions", + "scheduling.k8s.io/v1alpha1/DeleteOptions", + "scheduling.k8s.io/v1alpha1/ExportOptions", + "scheduling.k8s.io/v1alpha1/GetOptions", + "scheduling.k8s.io/v1alpha1/ListOptions", + "scheduling.k8s.io/v1alpha1/PatchOptions", + "scheduling.k8s.io/v1alpha1/PriorityClass", + "scheduling.k8s.io/v1alpha1/PriorityClassList", + "scheduling.k8s.io/v1alpha1/UpdateOptions", + "scheduling.k8s.io/v1alpha1/WatchEvent", + "scheduling.k8s.io/v1beta1", + "scheduling.k8s.io/v1beta1/CreateOptions", + "scheduling.k8s.io/v1beta1/DeleteOptions", + "scheduling.k8s.io/v1beta1/ExportOptions", + "scheduling.k8s.io/v1beta1/GetOptions", + "scheduling.k8s.io/v1beta1/ListOptions", + "scheduling.k8s.io/v1beta1/PatchOptions", + "scheduling.k8s.io/v1beta1/PriorityClass", + "scheduling.k8s.io/v1beta1/PriorityClassList", + "scheduling.k8s.io/v1beta1/UpdateOptions", + "scheduling.k8s.io/v1beta1/WatchEvent", + "settings.k8s.io/__internal", + "settings.k8s.io/__internal/WatchEvent", + "settings.k8s.io/v1alpha1", + "settings.k8s.io/v1alpha1/CreateOptions", + "settings.k8s.io/v1alpha1/DeleteOptions", + "settings.k8s.io/v1alpha1/ExportOptions", + "settings.k8s.io/v1alpha1/GetOptions", + "settings.k8s.io/v1alpha1/ListOptions", + "settings.k8s.io/v1alpha1/PatchOptions", + "settings.k8s.io/v1alpha1/PodPreset", + "settings.k8s.io/v1alpha1/PodPresetList", + "settings.k8s.io/v1alpha1/UpdateOptions", + "settings.k8s.io/v1alpha1/WatchEvent", + "storage.k8s.io/__internal", + "storage.k8s.io/__internal/WatchEvent", + "storage.k8s.io/v1", + "storage.k8s.io/v1/CreateOptions", + "storage.k8s.io/v1/DeleteOptions", + "storage.k8s.io/v1/ExportOptions", + "storage.k8s.io/v1/GetOptions", + "storage.k8s.io/v1/ListOptions", + "storage.k8s.io/v1/PatchOptions", + "storage.k8s.io/v1/StorageClass", + "storage.k8s.io/v1/StorageClassList", + "storage.k8s.io/v1/UpdateOptions", + "storage.k8s.io/v1/VolumeAttachment", + "storage.k8s.io/v1/VolumeAttachmentList", + "storage.k8s.io/v1/WatchEvent", + "storage.k8s.io/v1alpha1", + "storage.k8s.io/v1alpha1/CreateOptions", + "storage.k8s.io/v1alpha1/DeleteOptions", + "storage.k8s.io/v1alpha1/ExportOptions", + "storage.k8s.io/v1alpha1/GetOptions", + "storage.k8s.io/v1alpha1/ListOptions", + "storage.k8s.io/v1alpha1/PatchOptions", + "storage.k8s.io/v1alpha1/UpdateOptions", + "storage.k8s.io/v1alpha1/VolumeAttachment", + "storage.k8s.io/v1alpha1/VolumeAttachmentList", + "storage.k8s.io/v1alpha1/WatchEvent", + "storage.k8s.io/v1beta1", + "storage.k8s.io/v1beta1/CSIDriver", + "storage.k8s.io/v1beta1/CSIDriverList", + "storage.k8s.io/v1beta1/CSINode", + "storage.k8s.io/v1beta1/CSINodeList", + "storage.k8s.io/v1beta1/CreateOptions", + "storage.k8s.io/v1beta1/DeleteOptions", + "storage.k8s.io/v1beta1/ExportOptions", + "storage.k8s.io/v1beta1/GetOptions", + "storage.k8s.io/v1beta1/ListOptions", + "storage.k8s.io/v1beta1/PatchOptions", + "storage.k8s.io/v1beta1/StorageClass", + "storage.k8s.io/v1beta1/StorageClassList", + "storage.k8s.io/v1beta1/UpdateOptions", + "storage.k8s.io/v1beta1/VolumeAttachment", + "storage.k8s.io/v1beta1/VolumeAttachmentList", + "storage.k8s.io/v1beta1/WatchEvent", + "v1", + "v1/APIGroup", + "v1/APIGroupList", + "v1/APIResourceList", + "v1/APIVersions", + "v1/Binding", + "v1/ComponentStatus", + "v1/ComponentStatusList", + "v1/ConfigMap", + "v1/ConfigMapList", + "v1/CreateOptions", + "v1/DeleteOptions", + "v1/Endpoints", + "v1/EndpointsList", + "v1/Event", + "v1/EventList", + "v1/ExportOptions", + "v1/GetOptions", + "v1/LimitRange", + "v1/LimitRangeList", + "v1/List", + "v1/ListOptions", + "v1/Namespace", + "v1/NamespaceList", + "v1/Node", + "v1/NodeList", + "v1/NodeProxyOptions", + "v1/PatchOptions", + "v1/PersistentVolume", + "v1/PersistentVolumeClaim", + "v1/PersistentVolumeClaimList", + "v1/PersistentVolumeList", + "v1/Pod", + "v1/PodAttachOptions", + "v1/PodExecOptions", + "v1/PodList", + "v1/PodLogOptions", + "v1/PodPortForwardOptions", + "v1/PodProxyOptions", + "v1/PodStatusResult", + "v1/PodTemplate", + "v1/PodTemplateList", + "v1/RangeAllocation", + "v1/ReplicationController", + "v1/ReplicationControllerList", + "v1/ResourceQuota", + "v1/ResourceQuotaList", + "v1/Secret", + "v1/SecretList", + "v1/SerializedReference", + "v1/Service", + "v1/ServiceAccount", + "v1/ServiceAccountList", + "v1/ServiceList", + "v1/ServiceProxyOptions", + "v1/Status", + "v1/UpdateOptions", + "v1/WatchEvent", + } +} diff --git a/vendor/k8s.io/helm/pkg/chartutil/create.go b/vendor/k8s.io/helm/pkg/chartutil/create.go index f8e0356e49..8bab79429c 100644 --- a/vendor/k8s.io/helm/pkg/chartutil/create.go +++ b/vendor/k8s.io/helm/pkg/chartutil/create.go @@ -42,6 +42,8 @@ const ( DeploymentName = "deployment.yaml" // ServiceName is the name of the example service file. ServiceName = "service.yaml" + // ServiceAccountName is the name of the example serviceaccount file. + ServiceAccountName = "serviceaccount.yaml" // NotesName is the name of the example NOTES.txt file. NotesName = "NOTES.txt" // HelpersName is the name of the example helpers file. @@ -67,6 +69,24 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" +serviceAccount: + # Specifies whether a service account should be created + create: true + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + service: type: ClusterIP port: 80 @@ -130,7 +150,12 @@ const defaultIgnore = `# Patterns to ignore when building packages. const defaultIngress = `{{- if .Values.ingress.enabled -}} {{- $fullName := include ".fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} apiVersion: extensions/v1beta1 +{{- end }} kind: Ingress metadata: name: {{ $fullName }} @@ -160,7 +185,7 @@ spec: - path: {{ . }} backend: serviceName: {{ $fullName }} - servicePort: http + servicePort: {{ $svcPort }} {{- end }} {{- end }} {{- end }} @@ -188,8 +213,13 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} + serviceAccountName: {{ template ".serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: @@ -237,6 +267,15 @@ spec: app.kubernetes.io/name: {{ include ".name" . }} app.kubernetes.io/instance: {{ .Release.Name }} ` +const defaultServiceAccount = `{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template ".serviceAccountName" . }} + labels: +{{ include ".labels" . | indent 4 }} +{{- end -}} +` const defaultNotes = `1. Get the application URL by running these commands: {{- if .Values.ingress.enabled }} @@ -252,7 +291,7 @@ const defaultNotes = `1. Get the application URL by running these commands: {{- else if contains "LoadBalancer" .Values.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include ".fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include ".fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include ".fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") echo http://$SERVICE_IP:{{ .Values.service.port }} {{- else if contains "ClusterIP" .Values.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include ".name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") @@ -306,6 +345,17 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define ".serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include ".fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} ` const defaultTestConnection = `apiVersion: v1 @@ -424,6 +474,11 @@ func Create(chartfile *chart.Metadata, dir string) (string, error) { path: filepath.Join(cdir, TemplatesDir, ServiceName), content: Transform(defaultService, "", chartfile.Name), }, + { + // serviceaccount.yaml + path: filepath.Join(cdir, TemplatesDir, ServiceAccountName), + content: Transform(defaultServiceAccount, "", chartfile.Name), + }, { // NOTES.txt path: filepath.Join(cdir, TemplatesDir, NotesName), diff --git a/vendor/k8s.io/helm/pkg/chartutil/doc.go b/vendor/k8s.io/helm/pkg/chartutil/doc.go index a4f6d45158..ad2224f947 100644 --- a/vendor/k8s.io/helm/pkg/chartutil/doc.go +++ b/vendor/k8s.io/helm/pkg/chartutil/doc.go @@ -17,7 +17,7 @@ limitations under the License. /*Package chartutil contains tools for working with charts. Charts are described in the protocol buffer definition (pkg/proto/hapi/charts). -This packe provides utilities for serializing and deserializing charts. +This package provides utilities for serializing and deserializing charts. A chart can be represented on the file system in one of two ways: diff --git a/vendor/k8s.io/helm/pkg/chartutil/load.go b/vendor/k8s.io/helm/pkg/chartutil/load.go index b0927a5cfa..13724671a4 100644 --- a/vendor/k8s.io/helm/pkg/chartutil/load.go +++ b/vendor/k8s.io/helm/pkg/chartutil/load.go @@ -24,6 +24,7 @@ import ( "fmt" "io" "io/ioutil" + "net/http" "os" "path" "path/filepath" @@ -118,7 +119,7 @@ func loadArchiveFiles(in io.Reader) ([]*BufferedFile, error) { n = path.Clean(n) if n == "." { // In this case, the original path was relative when it should have been absolute. - return nil, errors.New("chart illegally contains empty path") + return nil, fmt.Errorf("chart illegally contains content outside the base directory: %q", hd.Name) } if strings.HasPrefix(n, "..") { return nil, errors.New("chart illegally references parent directory") @@ -171,6 +172,10 @@ func LoadFiles(files []*BufferedFile) (*chart.Chart, error) { return c, err } c.Metadata = m + var apiVersion = c.Metadata.ApiVersion + if apiVersion != "" && apiVersion != ApiVersionV1 { + return c, fmt.Errorf("apiVersion '%s' is not valid. The value must be \"v1\"", apiVersion) + } } else if f.Name == "values.toml" { return c, errors.New("values.toml is illegal as of 2.0.0-alpha.2") } else if f.Name == "values.yaml" { @@ -255,7 +260,45 @@ func LoadFile(name string) (*chart.Chart, error) { } defer raw.Close() - return LoadArchive(raw) + err = ensureArchive(name, raw) + if err != nil { + return nil, err + } + + c, err := LoadArchive(raw) + if err != nil { + if err == gzip.ErrHeader { + return nil, fmt.Errorf("file '%s' does not appear to be a valid chart file (details: %s)", name, err) + } + } + return c, err +} + +// ensureArchive's job is to return an informative error if the file does not appear to be a gzipped archive. +// +// Sometimes users will provide a values.yaml for an argument where a chart is expected. One common occurrence +// of this is invoking `helm template values.yaml mychart` which would otherwise produce a confusing error +// if we didn't check for this. +func ensureArchive(name string, raw *os.File) error { + defer raw.Seek(0, 0) // reset read offset to allow archive loading to proceed. + + // Check the file format to give us a chance to provide the user with more actionable feedback. + buffer := make([]byte, 512) + _, err := raw.Read(buffer) + if err != nil && err != io.EOF { + return fmt.Errorf("file '%s' cannot be read: %s", name, err) + } + if contentType := http.DetectContentType(buffer); contentType != "application/x-gzip" { + // TODO: Is there a way to reliably test if a file content is YAML? ghodss/yaml accepts a wide + // variety of content (Makefile, .zshrc) as valid YAML without errors. + + // Wrong content type. Let's check if it's yaml and give an extra hint? + if strings.HasSuffix(name, ".yml") || strings.HasSuffix(name, ".yaml") { + return fmt.Errorf("file '%s' seems to be a YAML file, but I expected a gzipped archive", name) + } + return fmt.Errorf("file '%s' does not appear to be a gzipped archive; got '%s'", name, contentType) + } + return nil } // LoadDir loads from a directory. @@ -312,6 +355,13 @@ func LoadDir(dir string) (*chart.Chart, error) { return nil } + // Irregular files include devices, sockets, and other uses of files that + // are not regular files. In Go they have a file mode type bit set. + // See https://golang.org/pkg/os/#FileMode for examples. + if !fi.Mode().IsRegular() { + return fmt.Errorf("cannot load irregular file %s as it has file mode type bits set", name) + } + data, err := ioutil.ReadFile(name) if err != nil { return fmt.Errorf("error reading %s: %s", n, err) diff --git a/vendor/k8s.io/helm/pkg/chartutil/requirements.go b/vendor/k8s.io/helm/pkg/chartutil/requirements.go index f21a22005c..4c97132332 100644 --- a/vendor/k8s.io/helm/pkg/chartutil/requirements.go +++ b/vendor/k8s.io/helm/pkg/chartutil/requirements.go @@ -124,7 +124,7 @@ func LoadRequirementsLock(c *chart.Chart) (*RequirementsLock, error) { } // ProcessRequirementsConditions disables charts based on condition path value in values -func ProcessRequirementsConditions(reqs *Requirements, cvals Values) { +func ProcessRequirementsConditions(reqs *Requirements, cvals Values, cpath string) { var cond string var conds []string if reqs == nil || len(reqs.Dependencies) == 0 { @@ -143,7 +143,7 @@ func ProcessRequirementsConditions(reqs *Requirements, cvals Values) { for _, c := range conds { if len(c) > 0 { // retrieve value - vv, err := cvals.PathValue(c) + vv, err := cvals.PathValue(cpath + c) if err == nil { // if not bool, warn if bv, ok := vv.(bool); ok { @@ -247,6 +247,10 @@ func getAliasDependency(charts []*chart.Chart, aliasChart *Dependency) *chart.Ch // ProcessRequirementsEnabled removes disabled charts from dependencies func ProcessRequirementsEnabled(c *chart.Chart, v *chart.Config) error { + return doProcessRequirementsEnabled(c, v, "") +} + +func doProcessRequirementsEnabled(c *chart.Chart, v *chart.Config, path string) error { reqs, err := LoadRequirements(c) if err != nil { // if not just missing requirements file, return error @@ -303,7 +307,7 @@ func ProcessRequirementsEnabled(c *chart.Chart, v *chart.Config) error { cc := chart.Config{Raw: yvals} // flag dependencies as enabled/disabled ProcessRequirementsTags(reqs, cvals) - ProcessRequirementsConditions(reqs, cvals) + ProcessRequirementsConditions(reqs, cvals, path) // make a map of charts to remove rm := map[string]bool{} for _, r := range reqs.Dependencies { @@ -323,7 +327,8 @@ func ProcessRequirementsEnabled(c *chart.Chart, v *chart.Config) error { } // recursively call self to process sub dependencies for _, t := range cd { - err := ProcessRequirementsEnabled(t, &cc) + subpath := path + t.Metadata.Name + "." + err := doProcessRequirementsEnabled(t, &cc, subpath) // if its not just missing requirements file, return error if nerr, ok := err.(ErrNoRequirementsFile); !ok && err != nil { return nerr @@ -391,7 +396,7 @@ func processImportValues(c *chart.Chart) error { if err != nil { return err } - b := make(map[string]interface{}, 0) + b := cvals.AsMap() // import values from each dependency if specified in import-values for _, r := range reqs.Dependencies { // only process raw requirement that is found in chart's dependencies (enabled) @@ -428,7 +433,7 @@ func processImportValues(c *chart.Chart) error { } // create value map from child to be merged into parent vm := pathToMap(nm["parent"], vv.AsMap()) - b = coalesceTables(cvals, vm, c.Metadata.Name) + b = coalesceTables(b, vm, c.Metadata.Name) case string: nm := map[string]string{ "child": "exports." + iv, @@ -448,7 +453,6 @@ func processImportValues(c *chart.Chart) error { r.ImportValues = outiv } } - b = coalesceTables(b, cvals, c.Metadata.Name) y, err := yaml.Marshal(b) if err != nil { return err diff --git a/vendor/k8s.io/helm/pkg/chartutil/testdata/bad_symlink/LICENSE b/vendor/k8s.io/helm/pkg/chartutil/testdata/bad_symlink/LICENSE new file mode 100644 index 0000000000..6121943b10 --- /dev/null +++ b/vendor/k8s.io/helm/pkg/chartutil/testdata/bad_symlink/LICENSE @@ -0,0 +1 @@ +LICENSE placeholder. diff --git a/vendor/k8s.io/helm/pkg/chartutil/testdata/bad_symlink/dnull b/vendor/k8s.io/helm/pkg/chartutil/testdata/bad_symlink/dnull new file mode 120000 index 0000000000..dc1dc0cde0 --- /dev/null +++ b/vendor/k8s.io/helm/pkg/chartutil/testdata/bad_symlink/dnull @@ -0,0 +1 @@ +/dev/null \ No newline at end of file diff --git a/vendor/k8s.io/helm/pkg/chartutil/testdata/frobnitz.v2/LICENSE b/vendor/k8s.io/helm/pkg/chartutil/testdata/frobnitz.v2/LICENSE new file mode 100644 index 0000000000..6121943b10 --- /dev/null +++ b/vendor/k8s.io/helm/pkg/chartutil/testdata/frobnitz.v2/LICENSE @@ -0,0 +1 @@ +LICENSE placeholder. diff --git a/vendor/k8s.io/helm/pkg/chartutil/testdata/frobnitz_symlinks/LICENSE b/vendor/k8s.io/helm/pkg/chartutil/testdata/frobnitz_symlinks/LICENSE new file mode 100644 index 0000000000..6121943b10 --- /dev/null +++ b/vendor/k8s.io/helm/pkg/chartutil/testdata/frobnitz_symlinks/LICENSE @@ -0,0 +1 @@ +LICENSE placeholder. diff --git a/vendor/k8s.io/helm/pkg/chartutil/values.go b/vendor/k8s.io/helm/pkg/chartutil/values.go index 6270531d77..9986e642c9 100644 --- a/vendor/k8s.io/helm/pkg/chartutil/values.go +++ b/vendor/k8s.io/helm/pkg/chartutil/values.go @@ -166,15 +166,10 @@ func CoalesceValues(chrt *chart.Chart, vals *chart.Config) (Values, error) { if err != nil { return cvals, err } - cvals, err = coalesce(chrt, evals) - if err != nil { - return cvals, err - } + return coalesce(chrt, evals) } - var err error - cvals, err = coalesceDeps(chrt, cvals) - return cvals, err + return coalesceDeps(chrt, cvals) } // coalesce coalesces the dest values and the chart values, giving priority to the dest values. @@ -186,8 +181,7 @@ func coalesce(ch *chart.Chart, dest map[string]interface{}) (map[string]interfac if err != nil { return dest, err } - coalesceDeps(ch, dest) - return dest, nil + return coalesceDeps(ch, dest) } // coalesceDeps coalesces the dependencies of the given chart. @@ -203,7 +197,7 @@ func coalesceDeps(chrt *chart.Chart, dest map[string]interface{}) (map[string]in dvmap := dv.(map[string]interface{}) // Get globals out of dest and merge them into dvmap. - coalesceGlobals(dvmap, dest, chrt.Metadata.Name) + dvmap = coalesceGlobals(dvmap, dest, chrt.Metadata.Name) var err error // Now coalesce the rest of the values. @@ -236,45 +230,20 @@ func coalesceGlobals(dest, src map[string]interface{}, chartName string) map[str return dg } + rv := make(map[string]interface{}) + for k, v := range dest { + rv[k] = v + } + // EXPERIMENTAL: In the past, we have disallowed globals to test tables. This // reverses that decision. It may somehow be possible to introduce a loop // here, but I haven't found a way. So for the time being, let's allow // tables in globals. - for key, val := range sg { - if istable(val) { - vv := copyMap(val.(map[string]interface{})) - if destv, ok := dg[key]; ok { - if destvmap, ok := destv.(map[string]interface{}); ok { - // Basically, we reverse order of coalesce here to merge - // top-down. - coalesceTables(vv, destvmap, chartName) - dg[key] = vv - continue - } else { - log.Printf("Warning: For chart '%s', cannot merge map onto non-map for key '%q'. Skipping.", chartName, key) - } - } else { - // Here there is no merge. We're just adding. - dg[key] = vv - } - } else if dv, ok := dg[key]; ok && istable(dv) { - // It's not clear if this condition can actually ever trigger. - log.Printf("Warning: For chart '%s', key '%s' is a table. Skipping.", chartName, key) - continue - } - // TODO: Do we need to do any additional checking on the value? - dg[key] = val - } - dest[GlobalKey] = dg - return dest -} -func copyMap(src map[string]interface{}) map[string]interface{} { - dest := make(map[string]interface{}, len(src)) - for k, v := range src { - dest[k] = v - } - return dest + // Basically, we reverse order of coalesce here to merge + // top-down. + rv[GlobalKey] = coalesceTables(sg, dg, chartName) + return rv } // coalesceValues builds up a values map for a particular chart. @@ -294,30 +263,7 @@ func coalesceValues(c *chart.Chart, v map[string]interface{}) (map[string]interf return v, fmt.Errorf("Error: Reading chart '%s' default values (%s): %s", c.Metadata.Name, c.Values.Raw, err) } - for key, val := range nv { - if value, ok := v[key]; ok { - if value == nil { - // When the YAML value is null, we remove the value's key. - // This allows Helm's various sources of values (value files or --set) to - // remove incompatible keys from any previous chart, file, or set values. - delete(v, key) - } else if dest, ok := value.(map[string]interface{}); ok { - // if v[key] is a table, merge nv's val table into v[key]. - src, ok := val.(map[string]interface{}) - if !ok { - log.Printf("Warning: Building values map for chart '%s'. Skipped value (%+v) for '%s', as it is not a table.", c.Metadata.Name, src, key) - continue - } - // Because v has higher precedence than nv, dest values override src - // values. - coalesceTables(dest, src, c.Metadata.Name) - } - } else { - // If the key is not in v, copy it from nv. - v[key] = val - } - } - return v, nil + return coalesceTables(v, nv.AsMap(), c.Metadata.Name), nil } // coalesceTables merges a source map into a destination map. @@ -326,36 +272,49 @@ func coalesceValues(c *chart.Chart, v map[string]interface{}) (map[string]interf func coalesceTables(dst, src map[string]interface{}, chartName string) map[string]interface{} { // Because dest has higher precedence than src, dest values override src // values. + + rv := make(map[string]interface{}) for key, val := range src { dv, ok := dst[key] - if ok && dv == nil { - // skip here, we delete at end + if !ok { // if not in dst, then copy from src + rv[key] = val continue } - if istable(val) { - if !ok { - dst[key] = val - } else if istable(dv) { - coalesceTables(dv.(map[string]interface{}), val.(map[string]interface{}), chartName) - } else { - log.Printf("Warning: Merging destination map for chart '%s'. Cannot overwrite table item '%s', with non table value: %v", chartName, key, val) - } + if dv == nil { // if set to nil in dst, then ignore + // When the YAML value is null, we skip the value's key. + // This allows Helm's various sources of values (value files or --set) to + // remove incompatible keys from any previous chart, file, or set values. continue - } else if ok && istable(dv) { + } + + srcTable, srcIsTable := val.(map[string]interface{}) + dstTable, dstIsTable := dv.(map[string]interface{}) + switch { + case srcIsTable && dstIsTable: // both tables, we coalesce + rv[key] = coalesceTables(dstTable, srcTable, chartName) + case srcIsTable && !dstIsTable: + log.Printf("Warning: Merging destination map for chart '%s'. Overwriting table item '%s', with non table value: %v", chartName, key, dv) + rv[key] = dv + case !srcIsTable && dstIsTable: log.Printf("Warning: Merging destination map for chart '%s'. The destination item '%s' is a table and ignoring the source '%s' as it has a non-table value of: %v", chartName, key, key, val) - continue - } else if !ok { // <- ok is still in scope from preceding conditional. - dst[key] = val - continue + rv[key] = dv + default: // neither are tables, simply take the dst value + rv[key] = dv } } - // never return a nil value, rather delete the key - for k, v := range dst { - if v == nil { - delete(dst, k) + + // do we have anything in dst that wasn't processed already that we need to copy across? + for key, val := range dst { + if val == nil { + continue + } + _, ok := rv[key] + if !ok { + rv[key] = val } } - return dst + + return rv } // ReleaseOptions represents the additional release options needed diff --git a/vendor/k8s.io/helm/pkg/engine/engine.go b/vendor/k8s.io/helm/pkg/engine/engine.go index 9a155de2eb..b4b6475c99 100644 --- a/vendor/k8s.io/helm/pkg/engine/engine.go +++ b/vendor/k8s.io/helm/pkg/engine/engine.go @@ -267,7 +267,7 @@ func (e *Engine) renderWithReferences(tpls map[string]renderable, referenceTpls rendered = make(map[string]string, len(files)) var buf bytes.Buffer for _, file := range files { - // Don't render partials. We don't care out the direct output of partials. + // Don't render partials. We don't care about the direct output of partials. // They are only included from other templates. if strings.HasPrefix(path.Base(file), "_") { continue diff --git a/vendor/k8s.io/helm/pkg/getter/getter.go b/vendor/k8s.io/helm/pkg/getter/getter.go index c595fec699..062c7269ed 100644 --- a/vendor/k8s.io/helm/pkg/getter/getter.go +++ b/vendor/k8s.io/helm/pkg/getter/getter.go @@ -68,7 +68,7 @@ func (p Providers) ByScheme(scheme string) (Constructor, error) { } // All finds all of the registered getters as a list of Provider instances. -// Currently the build-in http/https getter and the discovered +// Currently the built-in http/https getter and the discovered // plugins with downloader notations are collected. func All(settings environment.EnvSettings) Providers { result := Providers{ diff --git a/vendor/k8s.io/helm/pkg/getter/httpgetter.go b/vendor/k8s.io/helm/pkg/getter/httpgetter.go index 66ea828632..bf99b1cfae 100644 --- a/vendor/k8s.io/helm/pkg/getter/httpgetter.go +++ b/vendor/k8s.io/helm/pkg/getter/httpgetter.go @@ -26,7 +26,7 @@ import ( "k8s.io/helm/pkg/version" ) -//HttpGetter is the efault HTTP(/S) backend handler +//HttpGetter is the default HTTP(/S) backend handler // TODO: change the name to HTTPGetter in Helm 3 type HttpGetter struct { //nolint client *http.Client diff --git a/vendor/k8s.io/helm/pkg/getter/plugingetter.go b/vendor/k8s.io/helm/pkg/getter/plugingetter.go index 8f2099de04..c918aa744a 100644 --- a/vendor/k8s.io/helm/pkg/getter/plugingetter.go +++ b/vendor/k8s.io/helm/pkg/getter/plugingetter.go @@ -21,6 +21,7 @@ import ( "os" "os/exec" "path/filepath" + "strings" "k8s.io/helm/pkg/helm/environment" "k8s.io/helm/pkg/plugin" @@ -62,8 +63,9 @@ type pluginGetter struct { // Get runs downloader plugin command func (p *pluginGetter) Get(href string) (*bytes.Buffer, error) { - argv := []string{p.certFile, p.keyFile, p.cAFile, href} - prog := exec.Command(filepath.Join(p.base, p.command), argv...) + commands := strings.Split(p.command, " ") + argv := append(commands[1:], p.certFile, p.keyFile, p.cAFile, href) + prog := exec.Command(filepath.Join(p.base, commands[0]), argv...) plugin.SetupPluginEnv(p.settings, p.name, p.base) prog.Env = os.Environ() buf := bytes.NewBuffer(nil) diff --git a/vendor/k8s.io/helm/pkg/helm/client.go b/vendor/k8s.io/helm/pkg/helm/client.go index fa867c2d30..eb4f1167d5 100644 --- a/vendor/k8s.io/helm/pkg/helm/client.go +++ b/vendor/k8s.io/helm/pkg/helm/client.go @@ -85,8 +85,29 @@ func (h *Client) InstallRelease(chstr, ns string, opts ...InstallOption) (*rls.I return h.InstallReleaseFromChart(chart, ns, opts...) } +// InstallReleaseWithContext loads a chart from chstr, installs it, and returns the release response while accepting a context. +func (h *Client) InstallReleaseWithContext(ctx context.Context, chstr, ns string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) { + // load the chart to install + chart, err := chartutil.Load(chstr) + if err != nil { + return nil, err + } + + return h.installReleaseFromChartWithContext(ctx, chart, ns, opts...) +} + // InstallReleaseFromChart installs a new chart and returns the release response. func (h *Client) InstallReleaseFromChart(chart *chart.Chart, ns string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) { + return h.installReleaseFromChartWithContext(NewContext(), chart, ns, opts...) +} + +// InstallReleaseFromChartWithContext installs a new chart and returns the release response while accepting a context. +func (h *Client) InstallReleaseFromChartWithContext(ctx context.Context, chart *chart.Chart, ns string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) { + return h.installReleaseFromChartWithContext(ctx, chart, ns, opts...) +} + +// InstallReleaseFromChartWithContext installs a new chart and returns the release response while accepting a context. +func (h *Client) installReleaseFromChartWithContext(ctx context.Context, chart *chart.Chart, ns string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) { // apply the install options reqOpts := h.opts for _, opt := range opts { @@ -99,7 +120,7 @@ func (h *Client) InstallReleaseFromChart(chart *chart.Chart, ns string, opts ... req.DisableHooks = reqOpts.disableHooks req.DisableCrdHook = reqOpts.disableCRDHook req.ReuseName = reqOpts.reuseName - ctx := NewContext() + ctx = FromContext(ctx) if reqOpts.before != nil { if err := reqOpts.before(ctx, req); err != nil { @@ -159,8 +180,29 @@ func (h *Client) UpdateRelease(rlsName string, chstr string, opts ...UpdateOptio return h.UpdateReleaseFromChart(rlsName, chart, opts...) } +// UpdateReleaseWithContext loads a chart from chstr and updates a release to a new/different chart while accepting a context. +func (h *Client) UpdateReleaseWithContext(ctx context.Context, rlsName string, chstr string, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) { + // load the chart to update + chart, err := chartutil.Load(chstr) + if err != nil { + return nil, err + } + + return h.updateReleaseFromChartWithContext(ctx, rlsName, chart, opts...) +} + // UpdateReleaseFromChart updates a release to a new/different chart. func (h *Client) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) { + return h.updateReleaseFromChartWithContext(NewContext(), rlsName, chart, opts...) +} + +// UpdateReleaseFromChartWithContext updates a release to a new/different chart while accepting a context. +func (h *Client) UpdateReleaseFromChartWithContext(ctx context.Context, rlsName string, chart *chart.Chart, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) { + return h.updateReleaseFromChartWithContext(ctx, rlsName, chart, opts...) +} + +// updateReleaseFromChartWithContext updates a release to a new/different chart and accepts a context. +func (h *Client) updateReleaseFromChartWithContext(ctx context.Context, rlsName string, chart *chart.Chart, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) { // apply the update options reqOpts := h.opts for _, opt := range opts { @@ -175,7 +217,7 @@ func (h *Client) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts req.Force = reqOpts.force req.ResetValues = reqOpts.resetValues req.ReuseValues = reqOpts.reuseValues - ctx := NewContext() + ctx = FromContext(ctx) if reqOpts.before != nil { if err := reqOpts.before(ctx, req); err != nil { diff --git a/vendor/k8s.io/helm/pkg/helm/environment/environment.go b/vendor/k8s.io/helm/pkg/helm/environment/environment.go index 6d40fb846e..9cfe80a1d2 100644 --- a/vendor/k8s.io/helm/pkg/helm/environment/environment.go +++ b/vendor/k8s.io/helm/pkg/helm/environment/environment.go @@ -80,23 +80,23 @@ type EnvSettings struct { // AddFlags binds flags to the given flagset. func (s *EnvSettings) AddFlags(fs *pflag.FlagSet) { - fs.StringVar((*string)(&s.Home), "home", DefaultHelmHome, "location of your Helm config. Overrides $HELM_HOME") - fs.StringVar(&s.TillerHost, "host", "", "address of Tiller. Overrides $HELM_HOST") - fs.StringVar(&s.KubeContext, "kube-context", "", "name of the kubeconfig context to use") - fs.StringVar(&s.KubeConfig, "kubeconfig", "", "absolute path to the kubeconfig file to use") - fs.BoolVar(&s.Debug, "debug", false, "enable verbose output") - fs.StringVar(&s.TillerNamespace, "tiller-namespace", "kube-system", "namespace of Tiller") - fs.Int64Var(&s.TillerConnectionTimeout, "tiller-connection-timeout", int64(300), "the duration (in seconds) Helm will wait to establish a connection to tiller") + fs.StringVar((*string)(&s.Home), "home", DefaultHelmHome, "Location of your Helm config. Overrides $HELM_HOME") + fs.StringVar(&s.TillerHost, "host", "", "Address of Tiller. Overrides $HELM_HOST") + fs.StringVar(&s.KubeContext, "kube-context", "", "Name of the kubeconfig context to use") + fs.StringVar(&s.KubeConfig, "kubeconfig", "", "Absolute path of the kubeconfig file to be used") + fs.BoolVar(&s.Debug, "debug", false, "Enable verbose output") + fs.StringVar(&s.TillerNamespace, "tiller-namespace", "kube-system", "Namespace of Tiller") + fs.Int64Var(&s.TillerConnectionTimeout, "tiller-connection-timeout", int64(300), "The duration (in seconds) Helm will wait to establish a connection to Tiller") } // AddFlagsTLS adds the flags for supporting client side TLS to the given flagset. func (s *EnvSettings) AddFlagsTLS(fs *pflag.FlagSet) { - fs.StringVar(&s.TLSServerName, "tls-hostname", s.TillerHost, "the server name used to verify the hostname on the returned certificates from the server") - fs.StringVar(&s.TLSCaCertFile, "tls-ca-cert", DefaultTLSCaCert, "path to TLS CA certificate file") - fs.StringVar(&s.TLSCertFile, "tls-cert", DefaultTLSCert, "path to TLS certificate file") - fs.StringVar(&s.TLSKeyFile, "tls-key", DefaultTLSKeyFile, "path to TLS key file") - fs.BoolVar(&s.TLSVerify, "tls-verify", DefaultTLSVerify, "enable TLS for request and verify remote") - fs.BoolVar(&s.TLSEnable, "tls", DefaultTLSEnable, "enable TLS for request") + fs.StringVar(&s.TLSServerName, "tls-hostname", s.TillerHost, "The server name used to verify the hostname on the returned certificates from the server") + fs.StringVar(&s.TLSCaCertFile, "tls-ca-cert", DefaultTLSCaCert, "Path to TLS CA certificate file") + fs.StringVar(&s.TLSCertFile, "tls-cert", DefaultTLSCert, "Path to TLS certificate file") + fs.StringVar(&s.TLSKeyFile, "tls-key", DefaultTLSKeyFile, "Path to TLS key file") + fs.BoolVar(&s.TLSVerify, "tls-verify", DefaultTLSVerify, "Enable TLS for request and verify remote") + fs.BoolVar(&s.TLSEnable, "tls", DefaultTLSEnable, "Enable TLS for request") } // Init sets values from the environment. diff --git a/vendor/k8s.io/helm/pkg/helm/fake.go b/vendor/k8s.io/helm/pkg/helm/fake.go index c8ce91f441..46126410d0 100644 --- a/vendor/k8s.io/helm/pkg/helm/fake.go +++ b/vendor/k8s.io/helm/pkg/helm/fake.go @@ -24,6 +24,7 @@ import ( "sync" "github.com/golang/protobuf/ptypes/timestamp" + "golang.org/x/net/context" "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/manifest" "k8s.io/helm/pkg/proto/hapi/chart" @@ -87,6 +88,16 @@ func (c *FakeClient) InstallRelease(chStr, ns string, opts ...InstallOption) (*r return c.InstallReleaseFromChart(chart, ns, opts...) } +// InstallReleaseWithContext creates a new release and returns a InstallReleaseResponse containing that release and accepts a context +func (c *FakeClient) InstallReleaseWithContext(ctx context.Context, chStr, ns string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) { + return c.InstallRelease(chStr, ns, opts...) +} + +// InstallReleaseFromChartWithContext adds a new MockRelease to the fake client and returns a InstallReleaseResponse containing that release and accepts a context +func (c *FakeClient) InstallReleaseFromChartWithContext(ctx context.Context, chart *chart.Chart, ns string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) { + return c.InstallReleaseFromChart(chart, ns, opts...) +} + // InstallReleaseFromChart adds a new MockRelease to the fake client and returns a InstallReleaseResponse containing that release func (c *FakeClient) InstallReleaseFromChart(chart *chart.Chart, ns string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) { for _, opt := range opts { @@ -155,6 +166,16 @@ func (c *FakeClient) UpdateRelease(rlsName string, chStr string, opts ...UpdateO return c.UpdateReleaseFromChart(rlsName, &chart.Chart{}, opts...) } +// UpdateReleaseWithContext returns an UpdateReleaseResponse containing the updated release, if it exists and accepts a context +func (c *FakeClient) UpdateReleaseWithContext(ctx context.Context, rlsName string, chStr string, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) { + return c.UpdateRelease(rlsName, chStr, opts...) +} + +// UpdateReleaseFromChartWithContext returns an UpdateReleaseResponse containing the updated release, if it exists and accepts a context +func (c *FakeClient) UpdateReleaseFromChartWithContext(ctx context.Context, rlsName string, newChart *chart.Chart, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) { + return c.UpdateReleaseFromChart(rlsName, newChart, opts...) +} + // UpdateReleaseFromChart returns an UpdateReleaseResponse containing the updated release, if it exists func (c *FakeClient) UpdateReleaseFromChart(rlsName string, newChart *chart.Chart, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) { for _, opt := range opts { @@ -229,7 +250,22 @@ func (c *FakeClient) ReleaseContent(rlsName string, opts ...ContentOption) (resp // ReleaseHistory returns a release's revision history. func (c *FakeClient) ReleaseHistory(rlsName string, opts ...HistoryOption) (*rls.GetHistoryResponse, error) { - return &rls.GetHistoryResponse{Releases: c.Rels}, nil + reqOpts := c.Opts + for _, opt := range opts { + opt(&reqOpts) + } + maxLen := int(reqOpts.histReq.Max) + + var resp rls.GetHistoryResponse + for _, rel := range c.Rels { + if maxLen > 0 && len(resp.Releases) >= maxLen { + return &resp, nil + } + if rel.Name == rlsName { + resp.Releases = append(resp.Releases, rel) + } + } + return &resp, nil } // RunReleaseTest executes a pre-defined tests on a release diff --git a/vendor/k8s.io/helm/pkg/helm/interface.go b/vendor/k8s.io/helm/pkg/helm/interface.go index d09b6cf8f8..59b1103dbe 100644 --- a/vendor/k8s.io/helm/pkg/helm/interface.go +++ b/vendor/k8s.io/helm/pkg/helm/interface.go @@ -17,6 +17,7 @@ limitations under the License. package helm import ( + "golang.org/x/net/context" "k8s.io/helm/pkg/proto/hapi/chart" rls "k8s.io/helm/pkg/proto/hapi/services" ) @@ -25,11 +26,15 @@ import ( type Interface interface { ListReleases(opts ...ReleaseListOption) (*rls.ListReleasesResponse, error) InstallRelease(chStr, namespace string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) + InstallReleaseWithContext(ctx context.Context, chStr, namespace string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) InstallReleaseFromChart(chart *chart.Chart, namespace string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) + InstallReleaseFromChartWithContext(ctx context.Context, chart *chart.Chart, namespace string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.UninstallReleaseResponse, error) ReleaseStatus(rlsName string, opts ...StatusOption) (*rls.GetReleaseStatusResponse, error) UpdateRelease(rlsName, chStr string, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) + UpdateReleaseWithContext(ctx context.Context, rlsName, chStr string, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) + UpdateReleaseFromChartWithContext(ctx context.Context, rlsName string, chart *chart.Chart, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) RollbackRelease(rlsName string, opts ...RollbackOption) (*rls.RollbackReleaseResponse, error) ReleaseContent(rlsName string, opts ...ContentOption) (*rls.GetReleaseContentResponse, error) ReleaseHistory(rlsName string, opts ...HistoryOption) (*rls.GetHistoryResponse, error) diff --git a/vendor/k8s.io/helm/pkg/helm/option.go b/vendor/k8s.io/helm/pkg/helm/option.go index 930434178e..1eb0f133c6 100644 --- a/vendor/k8s.io/helm/pkg/helm/option.go +++ b/vendor/k8s.io/helm/pkg/helm/option.go @@ -234,6 +234,20 @@ func ReleaseTestParallel(parallel bool) ReleaseTestOption { } } +// ReleaseTestMaxParallel specifies the maximum number of test pods to run in parallel +func ReleaseTestMaxParallel(max uint32) ReleaseTestOption { + return func(opts *options) { + opts.testReq.MaxParallel = max + } +} + +// ReleaseTestLogs is a boolean value representing whether to dump the logs from test pods +func ReleaseTestLogs(logs bool) ReleaseTestOption { + return func(opts *options) { + opts.testReq.Logs = logs + } +} + // RollbackTimeout specifies the number of seconds before kubernetes calls timeout func RollbackTimeout(timeout int64) RollbackOption { return func(opts *options) { @@ -507,8 +521,13 @@ func WithMaxHistory(max int32) HistoryOption { // NewContext creates a versioned context. func NewContext() context.Context { + return FromContext(context.TODO()) +} + +// FromContext returns a versioned context from a parent context +func FromContext(ctx context.Context) context.Context { md := metadata.Pairs("x-helm-api-client", version.GetVersion()) - return metadata.NewOutgoingContext(context.TODO(), md) + return metadata.NewOutgoingContext(ctx, md) } // ReleaseTestOption allows configuring optional request data for diff --git a/vendor/k8s.io/helm/pkg/kube/client.go b/vendor/k8s.io/helm/pkg/kube/client.go index fb9ebba525..79f7eb4bf5 100644 --- a/vendor/k8s.io/helm/pkg/kube/client.go +++ b/vendor/k8s.io/helm/pkg/kube/client.go @@ -26,11 +26,12 @@ import ( "log" "sort" "strings" + "sync" "time" "k8s.io/apimachinery/pkg/api/meta" - "github.com/evanphx/json-patch" + jsonpatch "github.com/evanphx/json-patch" appsv1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" appsv1beta2 "k8s.io/api/apps/v1beta2" @@ -41,6 +42,7 @@ import ( apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -51,6 +53,7 @@ import ( "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/cli-runtime/pkg/resource" "k8s.io/client-go/kubernetes/scheme" + cachetools "k8s.io/client-go/tools/cache" watchtools "k8s.io/client-go/tools/watch" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/core" @@ -215,6 +218,8 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { // Since we don't know what order the objects come in, let's group them by the types and then sort them, so // that when we print them, they come out looking good (headers apply to subgroups, etc.). objs := make(map[string](map[string]runtime.Object)) + mux := &sync.Mutex{} + infos, err := c.BuildUnstructured(namespace, reader) if err != nil { return "", err @@ -224,6 +229,8 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { missing := []string{} err = perform(infos, func(info *resource.Info) error { + mux.Lock() + defer mux.Unlock() c.Log("Doing get for %s: %q", info.Mapping.GroupVersionKind.Kind, info.Name) if err := info.Get(); err != nil { c.Log("WARNING: Failed Get for resource %q: %s", info.Name, err) @@ -314,7 +321,14 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { return buf.String(), nil } -// Deprecated; use UpdateWithOptions instead +// Update reads the current configuration and a target configuration from io.reader +// and creates resources that don't already exist, updates resources that have been modified +// in the target configuration and deletes resources from the current configuration that are +// not present in the target configuration. +// +// Namespace will set the namespaces. +// +// Deprecated: use UpdateWithOptions instead. func (c *Client) Update(namespace string, originalReader, targetReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error { return c.UpdateWithOptions(namespace, originalReader, targetReader, UpdateOptions{ Force: force, @@ -334,12 +348,13 @@ type UpdateOptions struct { CleanupOnFail bool } -// UpdateWithOptions reads in the current configuration and a target configuration from io.reader -// and creates resources that don't already exists, updates resources that have been modified +// UpdateWithOptions reads the current configuration and a target configuration from io.reader +// and creates resources that don't already exist, updates resources that have been modified // in the target configuration and deletes resources from the current configuration that are // not present in the target configuration. // -// Namespace will set the namespaces. +// Namespace will set the namespaces. UpdateOptions provides additional parameters to control +// update behavior. func (c *Client) UpdateWithOptions(namespace string, originalReader, targetReader io.Reader, opts UpdateOptions) error { original, err := c.BuildUnstructured(namespace, originalReader) if err != nil { @@ -552,7 +567,7 @@ func (c *Client) WatchUntilReady(namespace string, reader io.Reader, timeout int return perform(infos, c.watchTimeout(time.Duration(timeout)*time.Second)) } -// WatchUntilCRDEstablished polls the given CRD until it reaches the established +// WaitUntilCRDEstablished polls the given CRD until it reaches the established // state. A CRD needs to reach the established state before CRs can be created. // // If a naming conflict condition is found, this function will return an error. @@ -606,14 +621,35 @@ func perform(infos Result, fn ResourceActorFunc) error { return ErrNoObjectsVisited } - for _, info := range infos { - if err := fn(info); err != nil { + errs := make(chan error) + go batchPerform(infos, fn, errs) + + for range infos { + err := <-errs + if err != nil { return err } } return nil } +func batchPerform(infos Result, fn ResourceActorFunc, errs chan<- error) { + var kind string + var wg sync.WaitGroup + for _, info := range infos { + currentKind := info.Object.GetObjectKind().GroupVersionKind().Kind + if kind != currentKind { + wg.Wait() + kind = currentKind + } + wg.Add(1) + go func(i *resource.Info) { + errs <- fn(i) + wg.Done() + }(info) + } +} + func createResource(info *resource.Info) error { obj, err := resource.NewHelper(info.Client, info.Mapping).Create(info.Namespace, true, info.Object, nil) if err != nil { @@ -650,7 +686,7 @@ func createPatch(target *resource.Info, current runtime.Object) ([]byte, types.P // Get a versioned object versionedObject, err := asVersioned(target) - // Unstructured objects, such as CRDs, may not have an not registered error + // Unstructured objects, such as CRDs, may not have a not registered error // returned from ConvertToVersion. Anything that's unstructured should // use the jsonpatch.CreateMergePatch. Strategic Merge Patch is not supported // on objects like CRDs. @@ -802,10 +838,7 @@ func getSelectorFromObject(obj runtime.Object) (map[string]string, bool) { } func (c *Client) watchUntilReady(timeout time.Duration, info *resource.Info) error { - w, err := resource.NewHelper(info.Client, info.Mapping).WatchSingle(info.Namespace, info.Name, info.ResourceVersion) - if err != nil { - return err - } + lw := cachetools.NewListWatchFromClient(info.Client, info.Mapping.Resource.Resource, info.Namespace, fields.Everything()) kind := info.Mapping.GroupVersionKind.Kind c.Log("Watching for changes to %s %s with timeout of %v", kind, info.Name, timeout) @@ -818,7 +851,7 @@ func (c *Client) watchUntilReady(timeout time.Duration, info *resource.Info) err ctx, cancel := watchtools.ContextWithOptionalTimeout(context.Background(), timeout) defer cancel() - _, err = watchtools.UntilWithoutRetry(ctx, w, func(e watch.Event) (bool, error) { + _, err := watchtools.ListWatchUntil(ctx, lw, func(e watch.Event) (bool, error) { switch e.Type { case watch.Added, watch.Modified: // For things like a secret or a config map, this is the best indicator @@ -906,21 +939,32 @@ func (c *Client) WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, } func (c *Client) watchPodUntilComplete(timeout time.Duration, info *resource.Info) error { - w, err := resource.NewHelper(info.Client, info.Mapping).WatchSingle(info.Namespace, info.Name, info.ResourceVersion) - if err != nil { - return err - } + lw := cachetools.NewListWatchFromClient(info.Client, info.Mapping.Resource.Resource, info.Namespace, fields.ParseSelectorOrDie(fmt.Sprintf("metadata.name=%s", info.Name))) c.Log("Watching pod %s for completion with timeout of %v", info.Name, timeout) ctx, cancel := watchtools.ContextWithOptionalTimeout(context.Background(), timeout) defer cancel() - _, err = watchtools.UntilWithoutRetry(ctx, w, func(e watch.Event) (bool, error) { + _, err := watchtools.ListWatchUntil(ctx, lw, func(e watch.Event) (bool, error) { return isPodComplete(e) }) return err } +// GetPodLogs takes pod name and namespace and returns the current logs (streaming is NOT enabled). +func (c *Client) GetPodLogs(name, ns string) (io.ReadCloser, error) { + client, err := c.KubernetesClientSet() + if err != nil { + return nil, err + } + req := client.CoreV1().Pods(ns).GetLogs(name, &v1.PodLogOptions{}) + logReader, err := req.Stream() + if err != nil { + return nil, fmt.Errorf("error in opening log stream, got: %s", err) + } + return logReader, nil +} + func isPodComplete(event watch.Event) (bool, error) { o, ok := event.Object.(*v1.Pod) if !ok { diff --git a/vendor/k8s.io/helm/pkg/kube/wait.go b/vendor/k8s.io/helm/pkg/kube/wait.go index 51fa6a6df9..c7df8ff2d3 100644 --- a/vendor/k8s.io/helm/pkg/kube/wait.go +++ b/vendor/k8s.io/helm/pkg/kube/wait.go @@ -52,6 +52,7 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error { services := []v1.Service{} pvc := []v1.PersistentVolumeClaim{} deployments := []deployment{} + ingresses := []extensions.Ingress{} for _, v := range created { switch value := asVersionedOrUnstructured(v).(type) { case *v1.ReplicationController: @@ -71,6 +72,10 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error { if err != nil { return false, err } + // If paused deployment will never be ready + if currentDeployment.Spec.Paused { + continue + } // Find RS associated with deployment newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1()) if err != nil || newReplicaSet == nil { @@ -86,6 +91,10 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error { if err != nil { return false, err } + // If paused deployment will never be ready + if currentDeployment.Spec.Paused { + continue + } // Find RS associated with deployment newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1()) if err != nil || newReplicaSet == nil { @@ -101,6 +110,10 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error { if err != nil { return false, err } + // If paused deployment will never be ready + if currentDeployment.Spec.Paused { + continue + } // Find RS associated with deployment newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1()) if err != nil || newReplicaSet == nil { @@ -116,6 +129,10 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error { if err != nil { return false, err } + // If paused deployment will never be ready + if currentDeployment.Spec.Paused { + continue + } // Find RS associated with deployment newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1()) if err != nil || newReplicaSet == nil { @@ -192,9 +209,15 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error { return false, err } services = append(services, *svc) + case *extensions.Ingress: + ingress, err := kcs.ExtensionsV1beta1().Ingresses(value.Namespace).Get(value.Name, metav1.GetOptions{}) + if err != nil { + return false, err + } + ingresses = append(ingresses, *ingress) } } - isReady := c.podsReady(pods) && c.servicesReady(services) && c.volumesReady(pvc) && c.deploymentsReady(deployments) + isReady := c.podsReady(pods) && c.servicesReady(services) && c.volumesReady(pvc) && c.deploymentsReady(deployments) && c.ingressesReady(ingresses) return isReady, nil }) } @@ -269,3 +292,13 @@ func isPodReady(pod *v1.Pod) bool { } return false } + +func (c *Client) ingressesReady(ingresses []extensions.Ingress) bool { + for _, ingress := range ingresses { + if &ingress.Status == nil || len(ingress.Status.LoadBalancer.Ingress) == 0 { + c.Log("Ingress is not ready: %s/%s", ingress.GetNamespace(), ingress.GetName()) + return false + } + } + return true +} diff --git a/vendor/k8s.io/helm/pkg/proto/hapi/release/status.pb.go b/vendor/k8s.io/helm/pkg/proto/hapi/release/status.pb.go index c5ed592027..99bcbc585b 100644 --- a/vendor/k8s.io/helm/pkg/proto/hapi/release/status.pb.go +++ b/vendor/k8s.io/helm/pkg/proto/hapi/release/status.pb.go @@ -38,7 +38,7 @@ const ( Status_PENDING_INSTALL Status_Code = 6 // Status_PENDING_UPGRADE indicates that an upgrade operation is underway. Status_PENDING_UPGRADE Status_Code = 7 - // Status_PENDING_ROLLBACK indicates that an rollback operation is underway. + // Status_PENDING_ROLLBACK indicates that a rollback operation is underway. Status_PENDING_ROLLBACK Status_Code = 8 ) diff --git a/vendor/k8s.io/helm/pkg/proto/hapi/services/tiller.pb.go b/vendor/k8s.io/helm/pkg/proto/hapi/services/tiller.pb.go index 894d2eb032..220accc2a6 100644 --- a/vendor/k8s.io/helm/pkg/proto/hapi/services/tiller.pb.go +++ b/vendor/k8s.io/helm/pkg/proto/hapi/services/tiller.pb.go @@ -53,7 +53,7 @@ func (x ListSort_SortBy) String() string { return proto.EnumName(ListSort_SortBy_name, int32(x)) } func (ListSort_SortBy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{1, 0} + return fileDescriptor_tiller_0094511522f6b040, []int{1, 0} } // SortOrder defines sort orders to augment sorting operations. @@ -77,7 +77,7 @@ func (x ListSort_SortOrder) String() string { return proto.EnumName(ListSort_SortOrder_name, int32(x)) } func (ListSort_SortOrder) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{1, 1} + return fileDescriptor_tiller_0094511522f6b040, []int{1, 1} } // ListReleasesRequest requests a list of releases. @@ -114,7 +114,7 @@ func (m *ListReleasesRequest) Reset() { *m = ListReleasesRequest{} } func (m *ListReleasesRequest) String() string { return proto.CompactTextString(m) } func (*ListReleasesRequest) ProtoMessage() {} func (*ListReleasesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{0} + return fileDescriptor_tiller_0094511522f6b040, []int{0} } func (m *ListReleasesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListReleasesRequest.Unmarshal(m, b) @@ -194,7 +194,7 @@ func (m *ListSort) Reset() { *m = ListSort{} } func (m *ListSort) String() string { return proto.CompactTextString(m) } func (*ListSort) ProtoMessage() {} func (*ListSort) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{1} + return fileDescriptor_tiller_0094511522f6b040, []int{1} } func (m *ListSort) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListSort.Unmarshal(m, b) @@ -234,7 +234,7 @@ func (m *ListReleasesResponse) Reset() { *m = ListReleasesResponse{} } func (m *ListReleasesResponse) String() string { return proto.CompactTextString(m) } func (*ListReleasesResponse) ProtoMessage() {} func (*ListReleasesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{2} + return fileDescriptor_tiller_0094511522f6b040, []int{2} } func (m *ListReleasesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListReleasesResponse.Unmarshal(m, b) @@ -297,7 +297,7 @@ func (m *GetReleaseStatusRequest) Reset() { *m = GetReleaseStatusRequest func (m *GetReleaseStatusRequest) String() string { return proto.CompactTextString(m) } func (*GetReleaseStatusRequest) ProtoMessage() {} func (*GetReleaseStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{3} + return fileDescriptor_tiller_0094511522f6b040, []int{3} } func (m *GetReleaseStatusRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReleaseStatusRequest.Unmarshal(m, b) @@ -348,7 +348,7 @@ func (m *GetReleaseStatusResponse) Reset() { *m = GetReleaseStatusRespon func (m *GetReleaseStatusResponse) String() string { return proto.CompactTextString(m) } func (*GetReleaseStatusResponse) ProtoMessage() {} func (*GetReleaseStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{4} + return fileDescriptor_tiller_0094511522f6b040, []int{4} } func (m *GetReleaseStatusResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReleaseStatusResponse.Unmarshal(m, b) @@ -404,7 +404,7 @@ func (m *GetReleaseContentRequest) Reset() { *m = GetReleaseContentReque func (m *GetReleaseContentRequest) String() string { return proto.CompactTextString(m) } func (*GetReleaseContentRequest) ProtoMessage() {} func (*GetReleaseContentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{5} + return fileDescriptor_tiller_0094511522f6b040, []int{5} } func (m *GetReleaseContentRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReleaseContentRequest.Unmarshal(m, b) @@ -451,7 +451,7 @@ func (m *GetReleaseContentResponse) Reset() { *m = GetReleaseContentResp func (m *GetReleaseContentResponse) String() string { return proto.CompactTextString(m) } func (*GetReleaseContentResponse) ProtoMessage() {} func (*GetReleaseContentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{6} + return fileDescriptor_tiller_0094511522f6b040, []int{6} } func (m *GetReleaseContentResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReleaseContentResponse.Unmarshal(m, b) @@ -519,7 +519,7 @@ func (m *UpdateReleaseRequest) Reset() { *m = UpdateReleaseRequest{} } func (m *UpdateReleaseRequest) String() string { return proto.CompactTextString(m) } func (*UpdateReleaseRequest) ProtoMessage() {} func (*UpdateReleaseRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{7} + return fileDescriptor_tiller_0094511522f6b040, []int{7} } func (m *UpdateReleaseRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateReleaseRequest.Unmarshal(m, b) @@ -649,7 +649,7 @@ func (m *UpdateReleaseResponse) Reset() { *m = UpdateReleaseResponse{} } func (m *UpdateReleaseResponse) String() string { return proto.CompactTextString(m) } func (*UpdateReleaseResponse) ProtoMessage() {} func (*UpdateReleaseResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{8} + return fileDescriptor_tiller_0094511522f6b040, []int{8} } func (m *UpdateReleaseResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateReleaseResponse.Unmarshal(m, b) @@ -707,7 +707,7 @@ func (m *RollbackReleaseRequest) Reset() { *m = RollbackReleaseRequest{} func (m *RollbackReleaseRequest) String() string { return proto.CompactTextString(m) } func (*RollbackReleaseRequest) ProtoMessage() {} func (*RollbackReleaseRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{9} + return fileDescriptor_tiller_0094511522f6b040, []int{9} } func (m *RollbackReleaseRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RollbackReleaseRequest.Unmarshal(m, b) @@ -809,7 +809,7 @@ func (m *RollbackReleaseResponse) Reset() { *m = RollbackReleaseResponse func (m *RollbackReleaseResponse) String() string { return proto.CompactTextString(m) } func (*RollbackReleaseResponse) ProtoMessage() {} func (*RollbackReleaseResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{10} + return fileDescriptor_tiller_0094511522f6b040, []int{10} } func (m *RollbackReleaseResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RollbackReleaseResponse.Unmarshal(m, b) @@ -874,7 +874,7 @@ func (m *InstallReleaseRequest) Reset() { *m = InstallReleaseRequest{} } func (m *InstallReleaseRequest) String() string { return proto.CompactTextString(m) } func (*InstallReleaseRequest) ProtoMessage() {} func (*InstallReleaseRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{11} + return fileDescriptor_tiller_0094511522f6b040, []int{11} } func (m *InstallReleaseRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InstallReleaseRequest.Unmarshal(m, b) @@ -990,7 +990,7 @@ func (m *InstallReleaseResponse) Reset() { *m = InstallReleaseResponse{} func (m *InstallReleaseResponse) String() string { return proto.CompactTextString(m) } func (*InstallReleaseResponse) ProtoMessage() {} func (*InstallReleaseResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{12} + return fileDescriptor_tiller_0094511522f6b040, []int{12} } func (m *InstallReleaseResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InstallReleaseResponse.Unmarshal(m, b) @@ -1038,7 +1038,7 @@ func (m *UninstallReleaseRequest) Reset() { *m = UninstallReleaseRequest func (m *UninstallReleaseRequest) String() string { return proto.CompactTextString(m) } func (*UninstallReleaseRequest) ProtoMessage() {} func (*UninstallReleaseRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{13} + return fileDescriptor_tiller_0094511522f6b040, []int{13} } func (m *UninstallReleaseRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UninstallReleaseRequest.Unmarshal(m, b) @@ -1108,7 +1108,7 @@ func (m *UninstallReleaseResponse) Reset() { *m = UninstallReleaseRespon func (m *UninstallReleaseResponse) String() string { return proto.CompactTextString(m) } func (*UninstallReleaseResponse) ProtoMessage() {} func (*UninstallReleaseResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{14} + return fileDescriptor_tiller_0094511522f6b040, []int{14} } func (m *UninstallReleaseResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UninstallReleaseResponse.Unmarshal(m, b) @@ -1153,7 +1153,7 @@ func (m *GetVersionRequest) Reset() { *m = GetVersionRequest{} } func (m *GetVersionRequest) String() string { return proto.CompactTextString(m) } func (*GetVersionRequest) ProtoMessage() {} func (*GetVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{15} + return fileDescriptor_tiller_0094511522f6b040, []int{15} } func (m *GetVersionRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetVersionRequest.Unmarshal(m, b) @@ -1184,7 +1184,7 @@ func (m *GetVersionResponse) Reset() { *m = GetVersionResponse{} } func (m *GetVersionResponse) String() string { return proto.CompactTextString(m) } func (*GetVersionResponse) ProtoMessage() {} func (*GetVersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{16} + return fileDescriptor_tiller_0094511522f6b040, []int{16} } func (m *GetVersionResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetVersionResponse.Unmarshal(m, b) @@ -1226,7 +1226,7 @@ func (m *GetHistoryRequest) Reset() { *m = GetHistoryRequest{} } func (m *GetHistoryRequest) String() string { return proto.CompactTextString(m) } func (*GetHistoryRequest) ProtoMessage() {} func (*GetHistoryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{17} + return fileDescriptor_tiller_0094511522f6b040, []int{17} } func (m *GetHistoryRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetHistoryRequest.Unmarshal(m, b) @@ -1272,7 +1272,7 @@ func (m *GetHistoryResponse) Reset() { *m = GetHistoryResponse{} } func (m *GetHistoryResponse) String() string { return proto.CompactTextString(m) } func (*GetHistoryResponse) ProtoMessage() {} func (*GetHistoryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{18} + return fileDescriptor_tiller_0094511522f6b040, []int{18} } func (m *GetHistoryResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetHistoryResponse.Unmarshal(m, b) @@ -1308,7 +1308,11 @@ type TestReleaseRequest struct { // cleanup specifies whether or not to attempt pod deletion after test completes Cleanup bool `protobuf:"varint,3,opt,name=cleanup,proto3" json:"cleanup,omitempty"` // parallel specifies whether or not to run test pods in parallel - Parallel bool `protobuf:"varint,4,opt,name=parallel,proto3" json:"parallel,omitempty"` + Parallel bool `protobuf:"varint,4,opt,name=parallel,proto3" json:"parallel,omitempty"` + // maximum number of test pods to run in parallel + MaxParallel uint32 `protobuf:"varint,5,opt,name=max_parallel,json=maxParallel,proto3" json:"max_parallel,omitempty"` + // logs specifies whether or not to dump the logs from the test pods + Logs bool `protobuf:"varint,6,opt,name=logs,proto3" json:"logs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1318,7 +1322,7 @@ func (m *TestReleaseRequest) Reset() { *m = TestReleaseRequest{} } func (m *TestReleaseRequest) String() string { return proto.CompactTextString(m) } func (*TestReleaseRequest) ProtoMessage() {} func (*TestReleaseRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{19} + return fileDescriptor_tiller_0094511522f6b040, []int{19} } func (m *TestReleaseRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TestReleaseRequest.Unmarshal(m, b) @@ -1366,6 +1370,20 @@ func (m *TestReleaseRequest) GetParallel() bool { return false } +func (m *TestReleaseRequest) GetMaxParallel() uint32 { + if m != nil { + return m.MaxParallel + } + return 0 +} + +func (m *TestReleaseRequest) GetLogs() bool { + if m != nil { + return m.Logs + } + return false +} + // TestReleaseResponse represents a message from executing a test type TestReleaseResponse struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` @@ -1379,7 +1397,7 @@ func (m *TestReleaseResponse) Reset() { *m = TestReleaseResponse{} } func (m *TestReleaseResponse) String() string { return proto.CompactTextString(m) } func (*TestReleaseResponse) ProtoMessage() {} func (*TestReleaseResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_tiller_bb72ee4a42494734, []int{20} + return fileDescriptor_tiller_0094511522f6b040, []int{20} } func (m *TestReleaseResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TestReleaseResponse.Unmarshal(m, b) @@ -1889,92 +1907,94 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ Metadata: "hapi/services/tiller.proto", } -func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor_tiller_bb72ee4a42494734) } - -var fileDescriptor_tiller_bb72ee4a42494734 = []byte{ - // 1337 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdd, 0x72, 0xdb, 0x44, - 0x14, 0x8e, 0x2d, 0xff, 0x1e, 0x27, 0xae, 0xbb, 0x4d, 0x13, 0xd5, 0x14, 0x26, 0x88, 0xa1, 0x75, - 0x0b, 0x75, 0x20, 0x70, 0xc3, 0x0c, 0xc3, 0x4c, 0xea, 0x86, 0xa4, 0x10, 0xd2, 0x19, 0xb9, 0x2d, - 0x33, 0xcc, 0x30, 0x1e, 0xc5, 0x5e, 0xb7, 0xa2, 0xb2, 0xd6, 0x68, 0x57, 0xa1, 0x79, 0x04, 0x2e, - 0x79, 0x07, 0xae, 0x79, 0x06, 0x6e, 0x79, 0x06, 0x5e, 0x86, 0xd9, 0x3f, 0x45, 0x2b, 0x4b, 0xae, - 0xc8, 0x4d, 0xac, 0xdd, 0x73, 0xf6, 0xfc, 0x7c, 0xdf, 0x9e, 0xb3, 0x67, 0x02, 0xfd, 0xd7, 0xde, - 0xd2, 0xdf, 0xa7, 0x38, 0xba, 0xf0, 0xa7, 0x98, 0xee, 0x33, 0x3f, 0x08, 0x70, 0x34, 0x5c, 0x46, - 0x84, 0x11, 0xb4, 0xcd, 0x65, 0x43, 0x2d, 0x1b, 0x4a, 0x59, 0x7f, 0x47, 0x9c, 0x98, 0xbe, 0xf6, - 0x22, 0x26, 0xff, 0x4a, 0xed, 0xfe, 0x6e, 0x7a, 0x9f, 0x84, 0x73, 0xff, 0x95, 0x12, 0x48, 0x17, - 0x11, 0x0e, 0xb0, 0x47, 0xb1, 0xfe, 0x35, 0x0e, 0x69, 0x99, 0x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, 0xaf, 0x0c, 0x61, 0xa6, 0x73, 0x80, 0xcc, 0x38, 0x9f, - 0x86, 0x73, 0xe2, 0x0a, 0xb9, 0x49, 0x9d, 0x95, 0xa5, 0xee, 0x24, 0xed, 0x75, 0x44, 0x42, 0x86, - 0x43, 0x76, 0xbd, 0xf8, 0x4f, 0xe1, 0x4e, 0x8e, 0x25, 0x95, 0xc0, 0x3e, 0x34, 0x55, 0x68, 0xc2, - 0x5a, 0x21, 0xae, 0x5a, 0xcb, 0xf9, 0xc7, 0x82, 0xed, 0x17, 0xcb, 0x99, 0xc7, 0xb0, 0x16, 0xad, - 0x09, 0xea, 0x3e, 0xd4, 0x45, 0x87, 0x51, 0x58, 0xdc, 0x94, 0xb6, 0x65, 0x1b, 0x1a, 0xf1, 0xbf, - 0xae, 0x94, 0xa3, 0x87, 0xd0, 0xb8, 0xf0, 0x82, 0x18, 0x53, 0x01, 0x44, 0x82, 0x9a, 0xd2, 0x14, - 0xed, 0xc9, 0x55, 0x1a, 0x68, 0x17, 0x9a, 0xb3, 0xe8, 0x92, 0xf7, 0x17, 0x51, 0x92, 0x2d, 0xb7, - 0x31, 0x8b, 0x2e, 0xdd, 0x38, 0x44, 0x1f, 0xc1, 0xd6, 0xcc, 0xa7, 0xde, 0x79, 0x80, 0x27, 0xaf, - 0x09, 0x79, 0x43, 0x45, 0x55, 0xb6, 0xdc, 0x4d, 0xb5, 0x79, 0xc2, 0xf7, 0x50, 0x9f, 0xdf, 0xa4, - 0x69, 0x84, 0x3d, 0x86, 0xed, 0x86, 0x90, 0x27, 0x6b, 0x8e, 0x21, 0xf3, 0x17, 0x98, 0xc4, 0x4c, - 0x94, 0x92, 0xe5, 0xea, 0x25, 0xfa, 0x10, 0x36, 0x23, 0x4c, 0x31, 0x9b, 0xa8, 0x28, 0x5b, 0xe2, - 0x64, 0x47, 0xec, 0xbd, 0x94, 0x61, 0x21, 0xa8, 0xfd, 0xe6, 0xf9, 0xcc, 0x6e, 0x0b, 0x91, 0xf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0x42, 0x42, 0xcc, 0xae, 0xd4, 0x1f, 0xbc, 0x5b, 0x31, 0x71, 0xb1, 0x84, 0x1b, 0x99, 0x49, - 0x00, 0x15, 0x40, 0x93, 0x3f, 0x60, 0xf5, 0x1f, 0x95, 0xd4, 0xce, 0x24, 0xa5, 0x3a, 0xd6, 0x9a, - 0xa4, 0xcc, 0x76, 0xb8, 0x26, 0xa9, 0x4c, 0xf3, 0x73, 0x36, 0x90, 0x0f, 0x5d, 0x37, 0x0e, 0x95, - 0x6b, 0xde, 0x16, 0x50, 0xc1, 0xe9, 0xd5, 0x8e, 0xd7, 0x7f, 0x50, 0x42, 0xf3, 0xaa, 0xbe, 0x1f, - 0xc3, 0x4f, 0x2d, 0xad, 0x7a, 0xde, 0x10, 0xff, 0x39, 0xf8, 0xe2, 0xbf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x20, 0xcd, 0x9e, 0x3a, 0x27, 0x11, 0x00, 0x00, +func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor_tiller_0094511522f6b040) } + +var fileDescriptor_tiller_0094511522f6b040 = []byte{ + // 1369 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdd, 0x72, 0x1b, 0xc5, + 0x12, 0xb6, 0xb4, 0xfa, 0x6d, 0xd9, 0x8a, 0x32, 0x71, 0xec, 0x8d, 0x4e, 0xce, 0x29, 0x9f, 0xa5, + 0x48, 0x94, 0x40, 0x64, 0x30, 0xdc, 0x50, 0x45, 0x51, 0xe5, 0x28, 0xc6, 0x0e, 0x18, 0x87, 0x5a, + 0x27, 0xa1, 0x8a, 0x2a, 0x4a, 0x35, 0x96, 0x46, 0xce, 0x92, 0xd5, 0x8e, 0xd8, 0x99, 0x35, 0xf6, + 0x23, 0x70, 0xc9, 0x3b, 0x70, 0x0d, 0xaf, 0xc0, 0x2d, 0xcf, 0xc0, 0xcb, 0x50, 0x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xf2, 0x4f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x8a, 0x23, 0x76, 0x0d, 0x5f, 0x11, 0x00, 0x00, } diff --git a/vendor/k8s.io/helm/pkg/provenance/sign.go b/vendor/k8s.io/helm/pkg/provenance/sign.go index 5a7626424b..d0e4d06c7f 100644 --- a/vendor/k8s.io/helm/pkg/provenance/sign.go +++ b/vendor/k8s.io/helm/pkg/provenance/sign.go @@ -122,7 +122,7 @@ func NewFromKeyring(keyringfile, id string) (*Signatory, error) { return s, nil } - // We're gonna go all GnuPG on this and look for a string that _contains_. If + // We're going to go all GnuPG on this and look for a string that _contains_. If // two or more keys contain the string and none are a direct match, we error // out. var candidate *openpgp.Entity @@ -405,7 +405,7 @@ func DigestFile(filename string) (string, error) { func Digest(in io.Reader) (string, error) { hash := crypto.SHA256.New() if _, err := io.Copy(hash, in); err != nil { - return "", nil + return "", err } return hex.EncodeToString(hash.Sum(nil)), nil } diff --git a/vendor/k8s.io/helm/pkg/renderutil/render.go b/vendor/k8s.io/helm/pkg/renderutil/render.go index 1996e1dc29..5be40992b8 100644 --- a/vendor/k8s.io/helm/pkg/renderutil/render.go +++ b/vendor/k8s.io/helm/pkg/renderutil/render.go @@ -31,6 +31,7 @@ import ( type Options struct { ReleaseOptions chartutil.ReleaseOptions KubeVersion string + APIVersions []string } // Render chart templates locally and display the output. @@ -79,6 +80,10 @@ func Render(c *chart.Chart, config *chart.Config, opts Options) (map[string]stri caps.KubeVersion.GitVersion = fmt.Sprintf("v%d.%d.0", kv.Major(), kv.Minor()) } + if len(opts.APIVersions) > 0 { + caps.APIVersions = chartutil.NewVersionSet(append(opts.APIVersions, "v1")...) + } + vals, err := chartutil.ToRenderValuesCaps(c, config, opts.ReleaseOptions, caps) if err != nil { return nil, err diff --git a/vendor/k8s.io/helm/pkg/repo/chartrepo.go b/vendor/k8s.io/helm/pkg/repo/chartrepo.go index c512c5b7e2..e19aa52c5e 100644 --- a/vendor/k8s.io/helm/pkg/repo/chartrepo.go +++ b/vendor/k8s.io/helm/pkg/repo/chartrepo.go @@ -21,6 +21,7 @@ import ( "io/ioutil" "net/url" "os" + "path" "path/filepath" "strings" @@ -111,14 +112,13 @@ func (r *ChartRepository) Load() error { // cachePath is prepended to any index that does not have an absolute path. This // is for pre-2.2.0 repo files. func (r *ChartRepository) DownloadIndexFile(cachePath string) error { - var indexURL string parsedURL, err := url.Parse(r.Config.URL) if err != nil { return err } - parsedURL.Path = strings.TrimSuffix(parsedURL.Path, "/") + "/index.yaml" - - indexURL = parsedURL.String() + parsedURL.RawPath = path.Join(parsedURL.RawPath, "index.yaml") + parsedURL.Path = path.Join(parsedURL.Path, "index.yaml") + indexURL := parsedURL.String() r.setCredentials() resp, err := r.Client.Get(indexURL) diff --git a/vendor/k8s.io/helm/pkg/repo/repo.go b/vendor/k8s.io/helm/pkg/repo/repo.go index fa550357a1..80166feea2 100644 --- a/vendor/k8s.io/helm/pkg/repo/repo.go +++ b/vendor/k8s.io/helm/pkg/repo/repo.go @@ -117,12 +117,18 @@ func (r *RepoFile) Update(re ...*Entry) { // Has returns true if the given name is already a repository name. func (r *RepoFile) Has(name string) bool { - for _, rf := range r.Repositories { - if rf.Name == name { - return true + _, ok := r.Get(name) + return ok +} + +// Get returns entry by the given name if it exists. +func (r *RepoFile) Get(name string) (*Entry, bool) { + for _, entry := range r.Repositories { + if entry.Name == name { + return entry, true } } - return false + return nil, false } // Remove removes the entry from the list of repositories. diff --git a/vendor/k8s.io/helm/pkg/storage/driver/sql.go b/vendor/k8s.io/helm/pkg/storage/driver/sql.go index 46bcccc32f..e1677c9eda 100644 --- a/vendor/k8s.io/helm/pkg/storage/driver/sql.go +++ b/vendor/k8s.io/helm/pkg/storage/driver/sql.go @@ -25,7 +25,7 @@ import ( "github.com/jmoiron/sqlx" migrate "github.com/rubenv/sql-migrate" - // Import pq for potgres dialect + // Import pq for postgres dialect _ "github.com/lib/pq" rspb "k8s.io/helm/pkg/proto/hapi/release" @@ -199,7 +199,7 @@ func (s *SQL) Query(labels map[string]string) ([]*rspb.Release, error) { sqlFilter[dbField] = val } else { s.Log("unknown label %s", key) - return nil, fmt.Errorf("unknow label %s", key) + return nil, fmt.Errorf("unknown label %s", key) } } sort.Strings(sqlFilterKeys) diff --git a/vendor/k8s.io/helm/pkg/storage/storage.go b/vendor/k8s.io/helm/pkg/storage/storage.go index 9520db08bc..e79cacc8d3 100644 --- a/vendor/k8s.io/helm/pkg/storage/storage.go +++ b/vendor/k8s.io/helm/pkg/storage/storage.go @@ -50,7 +50,7 @@ func (s *Storage) Get(name string, version int32) (*rspb.Release, error) { // Create creates a new storage entry holding the release. An // error is returned if the storage driver failed to store the -// release, or a release with identical an key already exists. +// release, or a release with identical key already exists. func (s *Storage) Create(rls *rspb.Release) error { s.Log("creating release %q", makeKey(rls.Name, rls.Version)) if s.MaxHistory > 0 { diff --git a/vendor/k8s.io/helm/pkg/sympath/walk.go b/vendor/k8s.io/helm/pkg/sympath/walk.go index b2500284a5..9a62261d00 100644 --- a/vendor/k8s.io/helm/pkg/sympath/walk.go +++ b/vendor/k8s.io/helm/pkg/sympath/walk.go @@ -22,6 +22,7 @@ package sympath import ( "fmt" + "log" "os" "path/filepath" "sort" @@ -69,12 +70,14 @@ func symwalk(path string, info os.FileInfo, walkFn filepath.WalkFunc) error { if err != nil { return fmt.Errorf("error evaluating symlink %s: %s", path, err) } + log.Printf("found symbolic link in path: %s resolves to %s", path, resolved) if info, err = os.Lstat(resolved); err != nil { return err } - if err := symwalk(resolved, info, walkFn); err != nil && err != filepath.SkipDir { + if err := symwalk(path, info, walkFn); err != nil && err != filepath.SkipDir { return err } + return nil } if err := walkFn(path, info, nil); err != nil { diff --git a/vendor/k8s.io/helm/pkg/tiller/environment/environment.go b/vendor/k8s.io/helm/pkg/tiller/environment/environment.go index d84ad55dbe..ee557c464a 100644 --- a/vendor/k8s.io/helm/pkg/tiller/environment/environment.go +++ b/vendor/k8s.io/helm/pkg/tiller/environment/environment.go @@ -160,7 +160,7 @@ type KubeClient interface { // BuildUnstructured reads a stream of manifests from a reader and turns them into // info objects. Manifests are not validated against the schema, but it will fail if - // any resoures types are not known by the apiserver. + // any resources types are not known by the apiserver. // // reader must contain a YAML stream (one or more YAML documents separated by "\n---\n"). BuildUnstructured(namespace string, reader io.Reader) (kube.Result, error) @@ -175,6 +175,8 @@ type KubeClient interface { // and returns said phase (PodSucceeded or PodFailed qualify). WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, timeout time.Duration) (v1.PodPhase, error) + GetPodLogs(name, namespace string) (io.ReadCloser, error) + WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error } @@ -255,6 +257,12 @@ func (p *PrintingKubeClient) WaitAndGetCompletedPodPhase(namespace string, reade return v1.PodUnknown, err } +// GetPodLogs implements KubeClient GetPodLogs. +func (p *PrintingKubeClient) GetPodLogs(name, ns string) (io.ReadCloser, error) { + return nil, nil +} + +// WaitUntilCRDEstablished implements KubeClient WaitUntilCRDEstablished. func (p *PrintingKubeClient) WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error { _, err := io.Copy(p.Out, reader) return err diff --git a/vendor/k8s.io/helm/pkg/version/version.go b/vendor/k8s.io/helm/pkg/version/version.go index d32f09c4a8..07215f167a 100644 --- a/vendor/k8s.io/helm/pkg/version/version.go +++ b/vendor/k8s.io/helm/pkg/version/version.go @@ -26,7 +26,7 @@ var ( // Increment major number for new feature additions and behavioral changes. // Increment minor number for bug fixes and performance enhancements. // Increment patch number for critical fixes to existing releases. - Version = "v2.14" + Version = "v2.15" // BuildMetadata is extra build time data BuildMetadata = "unreleased" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/get/sorter.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/get/sorter.go index 599b4acd15..2d5e303174 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/get/sorter.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/get/sorter.go @@ -34,7 +34,7 @@ import ( "k8s.io/client-go/util/jsonpath" "k8s.io/utils/integer" - "vbom.ml/util/sortorder" + "github.com/fvbommel/sortorder" ) // SortingPrinter sorts list types before delegating to another printer. diff --git a/vendor/vbom.ml/util/sortorder/README.md b/vendor/vbom.ml/util/sortorder/README.md deleted file mode 100644 index ed8da0e29b..0000000000 --- a/vendor/vbom.ml/util/sortorder/README.md +++ /dev/null @@ -1,5 +0,0 @@ -## sortorder [![GoDoc](https://godoc.org/vbom.ml/util/sortorder?status.svg)](https://godoc.org/vbom.ml/util/sortorder) - - import "vbom.ml/util/sortorder" - -Sort orders and comparison functions.