From 3b716b6d735b5a3d8d92b28d25ab8be7a9083609 Mon Sep 17 00:00:00 2001 From: Don Bowman Date: Wed, 6 Feb 2019 12:10:30 -0500 Subject: [PATCH 01/56] Add imagePullSecret to the `default` helm create template This relates to [#3529](https://github.com/helm/helm/issues/3529). It adds image.pullSecret to the default generate blank chart when the user does `helm create`. Signed-off-by: Don Bowman --- pkg/chartutil/create.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 9af4b8f45..2577527b3 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -62,6 +62,7 @@ image: repository: nginx tag: stable pullPolicy: IfNotPresent + # pullSecret: my_secret nameOverride: "" fullnameOverride: "" @@ -189,6 +190,10 @@ spec: app.kubernetes.io/name: {{ include ".name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: + {{- if .Values.image.pullSecret -}} + imagePullSecrets: + - name: {{ .Values.image.pullSecret }} + {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" From 7d2e42669a214f55f78ad4bb007d67094d6c1f15 Mon Sep 17 00:00:00 2001 From: Nguyen Hai Truong Date: Fri, 22 Feb 2019 15:17:32 +0700 Subject: [PATCH 02/56] Adding github workflow for contributing to helm Describe detail step-by-step of using github to contribute to helm project. Co-Authored-By: Dao Cong Tien tiendc@vn.fujitsu.com Signed-off-by: Nguyen Hai Truong --- CONTRIBUTING.md | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a20c2b90b..4368c6a9e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -172,10 +172,44 @@ contributing to Helm. All issue types follow the same general lifecycle. Differe ## How to Contribute a Patch -1. Fork the repo, develop and test your code changes. -1. Use sign-off when making each of your commits (see [above](#sign-your-work)). +1. **Fork** the repo [helm](https://github.com/helm/helm) + +Go to https://github.com/helm/helm then hit the `Fork` button to fork your own copy of repository **helm** to your github account. + +2. **Clone** the forked repo to your local working directory. +```sh +$ git clone https://github.com/$your_github_account/helm.git +``` +3. Add an `upstream` remote to keep your fork in sync with the main repo. +```sh +$ cd helm +$ git remote add upstream https://github.com/helm/helm.git +$ git remote -v + +origin https://github.com/$your_github_account/helm.git (fetch) +origin https://github.com/$your_github_account/helm.git (push) +upstream https://github.com/helm/helm.git (fetch) +upstream https://github.com/helm/helm.git (push) +``` +4. Sync your local `master` branch. +```sh +$ git pull upstream master +``` +5. Create a branch to add a new feature or fix issues. +```sh +$ git checkout -b new-feature +``` +6. Make any change on the branch `new-feature` then build and test your codes. +7. Include in what will be committed. +```sh +$ git add +``` +8. Use sign-off when making each of your commits (see [above](#sign-your-work)). If you forgot to sign some commits that are part of the contribution, you can ask [git to rewrite your commit history](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History). -1. Submit a pull request. +```sh +$ git commit --signoff +``` +9. Submit a pull request. Coding conventions and standards are explained in the official developer docs: [Developers Guide](docs/developers.md) From d819efa48b820591e314562975cf11175cbf283a Mon Sep 17 00:00:00 2001 From: Don Bowman Date: Sat, 23 Feb 2019 17:47:44 -0500 Subject: [PATCH 03/56] Make imagePullSecrets and array, move to root level Changes as per PR https://github.com/helm/helm/pull/5271 - make imagePullSecrets be an array - move imagePullSecrets to 'root' level of Values Signed-off-by: Don Bowman --- pkg/chartutil/create.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 2577527b3..c5bd6805e 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -62,8 +62,8 @@ image: repository: nginx tag: stable pullPolicy: IfNotPresent - # pullSecret: my_secret +imagePullSecrets: [] nameOverride: "" fullnameOverride: "" @@ -190,9 +190,9 @@ spec: app.kubernetes.io/name: {{ include ".name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: - {{- if .Values.image.pullSecret -}} + {{- with .Values.imagePullSecrets }} imagePullSecrets: - - name: {{ .Values.image.pullSecret }} + {{- toYaml . | nindent 8 }} {{- end }} containers: - name: {{ .Chart.Name }} From 680b3fd05ac2dc5051afd69c96bca3fa929969e9 Mon Sep 17 00:00:00 2001 From: Vu Cong Tuan Date: Tue, 19 Feb 2019 14:55:28 +0700 Subject: [PATCH 04/56] Fixing many typos in docs Signed-off-by: Vu Cong Tuan --- docs/chart_template_guide/functions_and_pipelines.md | 2 +- docs/chart_template_guide/helm_ignore_file.md | 2 +- docs/helm/helm_verify.md | 2 +- docs/man/man1/helm_install.1 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/chart_template_guide/functions_and_pipelines.md b/docs/chart_template_guide/functions_and_pipelines.md index fe5a3c2b2..1c099887d 100644 --- a/docs/chart_template_guide/functions_and_pipelines.md +++ b/docs/chart_template_guide/functions_and_pipelines.md @@ -150,7 +150,7 @@ Template functions and pipelines are a powerful way to transform information and ## Operators are functions -Operators are implemented as functions that return a boolean value. To use `eq`, `ne`, `lt`, `gt`, `and`, `or`, `not` etcetera place the operator at the front of the statement followed by its parameters just as you would a function. To chain multiple operations together, separate individual functions by surrounding them with paranthesis. +Operators are implemented as functions that return a boolean value. To use `eq`, `ne`, `lt`, `gt`, `and`, `or`, `not` etcetera place the operator at the front of the statement followed by its parameters just as you would a function. To chain multiple operations together, separate individual functions by surrounding them with parentheses. ```yaml {{/* include the body of this if statement when the variable .Values.fooString exists and is set to "foo" */}} diff --git a/docs/chart_template_guide/helm_ignore_file.md b/docs/chart_template_guide/helm_ignore_file.md index 6793bdfec..5980f439c 100644 --- a/docs/chart_template_guide/helm_ignore_file.md +++ b/docs/chart_template_guide/helm_ignore_file.md @@ -4,7 +4,7 @@ The `.helmignore` file is used to specify files you don't want to include in you If this file exists, the `helm package` command will ignore all the files that match the pattern specified in the `.helmignore` file while packaging your application. -This can help in avoiding unncessary or sensitive files or directories from being added in your helm chart. +This can help in avoiding unnecessary or sensitive files or directories from being added in your helm chart. The `.helmignore` file supports Unix shell glob matching, relative path matching, and negation (prefixed with !). Only one pattern per line is considered. diff --git a/docs/helm/helm_verify.md b/docs/helm/helm_verify.md index acd1c2923..e6d683dfb 100644 --- a/docs/helm/helm_verify.md +++ b/docs/helm/helm_verify.md @@ -42,4 +42,4 @@ helm verify [flags] PATH * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 25-Feb-2019 diff --git a/docs/man/man1/helm_install.1 b/docs/man/man1/helm_install.1 index fe1856bed..df4011a62 100644 --- a/docs/man/man1/helm_install.1 +++ b/docs/man/man1/helm_install.1 @@ -80,7 +80,7 @@ the '\-\-debug' and '\-\-dry\-run' flags can be combined. This will still requir round\-trip to the Tiller server. .PP -If \-\-verify is set, the chart MUST have a provenance file, and the provenenace +If \-\-verify is set, the chart MUST have a provenance file, and the provenance fall MUST pass all verification steps. .PP From e80f1735260dadb7da11ded78c77d88ab471e041 Mon Sep 17 00:00:00 2001 From: Don Bowman Date: Sat, 2 Mar 2019 10:55:38 -0500 Subject: [PATCH 05/56] Change indent of {{ with }} Signed-off-by: Don Bowman --- pkg/chartutil/create.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index c5bd6805e..10395edaa 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -190,10 +190,10 @@ spec: app.kubernetes.io/name: {{ include ".name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: - {{- with .Values.imagePullSecrets }} + {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" From b7b372f693eca152773989079148ec916d09b7c9 Mon Sep 17 00:00:00 2001 From: Luis Davim Date: Wed, 27 Feb 2019 15:19:51 +0000 Subject: [PATCH 06/56] Add app.kubernetes.io/version label Signed-off-by: Luis Davim --- cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml | 1 + cmd/helm/testdata/testcharts/novals/templates/alpine-pod.yaml | 1 + .../testdata/testcharts/prerelease/templates/alpine-pod.yaml | 1 + docs/chart_template_guide/variables.md | 1 + docs/charts_hooks.md | 3 ++- docs/examples/alpine/templates/alpine-pod.yaml | 1 + docs/examples/nginx/templates/configmap.yaml | 1 + docs/examples/nginx/templates/deployment.yaml | 1 + docs/examples/nginx/templates/post-install-job.yaml | 1 + docs/examples/nginx/templates/pre-install-secret.yaml | 1 + docs/examples/nginx/templates/service-test.yaml | 1 + docs/examples/nginx/templates/service.yaml | 1 + pkg/chartutil/create.go | 4 ++++ pkg/lint/rules/testdata/albatross/templates/svc.yaml | 1 + 14 files changed, 18 insertions(+), 1 deletion(-) diff --git a/cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml b/cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml index b8ae22b6c..fc0576d5a 100644 --- a/cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml +++ b/cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml @@ -10,6 +10,7 @@ metadata: # The "release" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{.Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" values: {{.Values.test.Name}} diff --git a/cmd/helm/testdata/testcharts/novals/templates/alpine-pod.yaml b/cmd/helm/testdata/testcharts/novals/templates/alpine-pod.yaml index f569d556c..564429dea 100644 --- a/cmd/helm/testdata/testcharts/novals/templates/alpine-pod.yaml +++ b/cmd/helm/testdata/testcharts/novals/templates/alpine-pod.yaml @@ -10,6 +10,7 @@ metadata: # The "release" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{.Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" annotations: diff --git a/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml b/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml index f569d556c..564429dea 100644 --- a/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml +++ b/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml @@ -10,6 +10,7 @@ metadata: # The "release" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{.Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" annotations: diff --git a/docs/chart_template_guide/variables.md b/docs/chart_template_guide/variables.md index dda92559b..984b9b4e5 100644 --- a/docs/chart_template_guide/variables.md +++ b/docs/chart_template_guide/variables.md @@ -114,6 +114,7 @@ metadata: # I cannot reference .Chart.Name, but I can do $.Chart.Name helm.sh/chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}" app.kubernetes.io/instance: "{{ $.Release.Name }}" + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: "{{ $.Release.Service }}" type: kubernetes.io/tls data: diff --git a/docs/charts_hooks.md b/docs/charts_hooks.md index 6d436402d..3044414c3 100644 --- a/docs/charts_hooks.md +++ b/docs/charts_hooks.md @@ -76,7 +76,7 @@ hooks, the lifecycle is altered like this: 5. Tiller sorts hooks by weight (assigning a weight of 0 by default) and by name for those hooks with the same weight in ascending order. 6. Tiller then loads the hook with the lowest weight first (negative to positive) 7. Tiller waits until the hook is "Ready" (except for CRDs) -8. Tiller loads the resulting resources into Kubernetes. Note that if the `--wait` +8. Tiller loads the resulting resources into Kubernetes. Note that if the `--wait` flag is set, Tiller will wait until all resources are in a ready state and will not run the `post-install` hook until they are ready. 9. Tiller executes the `post-install` hook (loading hook resources) @@ -129,6 +129,7 @@ metadata: labels: app.kubernetes.io/managed-by: {{.Release.Service | quote }} app.kubernetes.io/instance: {{.Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" annotations: # This is what defines this resource as a hook. Without this line, the diff --git a/docs/examples/alpine/templates/alpine-pod.yaml b/docs/examples/alpine/templates/alpine-pod.yaml index 1fc299b6d..2b54811fd 100644 --- a/docs/examples/alpine/templates/alpine-pod.yaml +++ b/docs/examples/alpine/templates/alpine-pod.yaml @@ -10,6 +10,7 @@ metadata: # The "app.kubernetes.io/instance" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{ .Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "alpine.name" . }} diff --git a/docs/examples/nginx/templates/configmap.yaml b/docs/examples/nginx/templates/configmap.yaml index 0141cbc69..d47992024 100644 --- a/docs/examples/nginx/templates/configmap.yaml +++ b/docs/examples/nginx/templates/configmap.yaml @@ -6,6 +6,7 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} data: diff --git a/docs/examples/nginx/templates/deployment.yaml b/docs/examples/nginx/templates/deployment.yaml index 5bb30f9af..cc4d4ea85 100644 --- a/docs/examples/nginx/templates/deployment.yaml +++ b/docs/examples/nginx/templates/deployment.yaml @@ -14,6 +14,7 @@ metadata: # to all of the Kubernetes resources that were created as part of that # release. app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} diff --git a/docs/examples/nginx/templates/post-install-job.yaml b/docs/examples/nginx/templates/post-install-job.yaml index 3562e6cf5..856782a4d 100644 --- a/docs/examples/nginx/templates/post-install-job.yaml +++ b/docs/examples/nginx/templates/post-install-job.yaml @@ -10,6 +10,7 @@ metadata: # The "app.kubernetes.io/instance" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} diff --git a/docs/examples/nginx/templates/pre-install-secret.yaml b/docs/examples/nginx/templates/pre-install-secret.yaml index 07a9504b5..40451800d 100644 --- a/docs/examples/nginx/templates/pre-install-secret.yaml +++ b/docs/examples/nginx/templates/pre-install-secret.yaml @@ -7,6 +7,7 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} # This declares the resource to be a hook. By convention, we also name the diff --git a/docs/examples/nginx/templates/service-test.yaml b/docs/examples/nginx/templates/service-test.yaml index ffb37e9f4..867f077ee 100644 --- a/docs/examples/nginx/templates/service-test.yaml +++ b/docs/examples/nginx/templates/service-test.yaml @@ -5,6 +5,7 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} annotations: diff --git a/docs/examples/nginx/templates/service.yaml b/docs/examples/nginx/templates/service.yaml index a12cb0982..e8eb8e51e 100644 --- a/docs/examples/nginx/templates/service.yaml +++ b/docs/examples/nginx/templates/service.yaml @@ -10,6 +10,7 @@ metadata: helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} name: {{ template "nginx.fullname" . }} spec: # Provides options for the service so chart users have the full choice diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 9af4b8f45..415e6f97b 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -137,6 +137,7 @@ metadata: app.kubernetes.io/name: {{ include ".name" . }} helm.sh/chart: {{ include ".chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- with .Values.ingress.annotations }} annotations: @@ -176,6 +177,7 @@ metadata: app.kubernetes.io/name: {{ include ".name" . }} helm.sh/chart: {{ include ".chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: replicas: {{ .Values.replicaCount }} @@ -229,6 +231,7 @@ metadata: app.kubernetes.io/name: {{ include ".name" . }} helm.sh/chart: {{ include ".chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: type: {{ .Values.service.type }} @@ -307,6 +310,7 @@ metadata: app.kubernetes.io/name: {{ include ".name" . }} helm.sh/chart: {{ include ".chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: {{ .Release.Service }} annotations: "helm.sh/hook": test-success diff --git a/pkg/lint/rules/testdata/albatross/templates/svc.yaml b/pkg/lint/rules/testdata/albatross/templates/svc.yaml index aea11d833..a976b4fdd 100644 --- a/pkg/lint/rules/testdata/albatross/templates/svc.yaml +++ b/pkg/lint/rules/testdata/albatross/templates/svc.yaml @@ -7,6 +7,7 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service | quote }} app.kubernetes.io/instance: {{ .Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" kubeVersion: {{ .Capabilities.KubeVersion.Major }} tillerVersion: {{ .Capabilities.TillerVersion }} From b8e40a7c31faf094c950be40a0d08ce554bdc7dd Mon Sep 17 00:00:00 2001 From: Morten Torkildsen Date: Thu, 27 Dec 2018 01:56:00 -0800 Subject: [PATCH 07/56] fix(helm): Wait for CRDs to reach established state for crd_install hook Makes sure CRDs installed through the crd_install hook reaches the `established` state before the hook is considered complete. Signed-off-by: Morten Torkildsen --- pkg/kube/client.go | 57 ++++++++ pkg/kube/client_test.go | 150 ++++++++++++++++++++- pkg/tiller/environment/environment.go | 7 + pkg/tiller/environment/environment_test.go | 4 + pkg/tiller/release_server.go | 8 +- pkg/tiller/release_server_test.go | 4 + 6 files changed, 225 insertions(+), 5 deletions(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 66c822ebd..ee643fade 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -37,6 +37,7 @@ import ( batch "k8s.io/api/batch/v1" "k8s.io/api/core/v1" extv1beta1 "k8s.io/api/extensions/v1beta1" + apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -45,6 +46,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/strategicpatch" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/cli-runtime/pkg/resource" @@ -76,6 +78,12 @@ func New(getter genericclioptions.RESTClientGetter) *Client { if getter == nil { getter = genericclioptions.NewConfigFlags(true) } + + err := apiextv1beta1.AddToScheme(scheme.Scheme) + if err != nil { + panic(err) + } + return &Client{ Factory: cmdutil.NewFactory(getter), Log: nopLogger, @@ -439,6 +447,55 @@ 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 +// 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. +func (c *Client) WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error { + infos, err := c.BuildUnstructured(metav1.NamespaceAll, reader) + if err != nil { + return err + } + + return perform(infos, c.pollCRDEstablished(timeout)) +} + +func (c *Client) pollCRDEstablished(t time.Duration) ResourceActorFunc { + return func(info *resource.Info) error { + return c.pollCRDUntilEstablished(t, info) + } +} + +func (c *Client) pollCRDUntilEstablished(timeout time.Duration, info *resource.Info) error { + return wait.PollImmediate(time.Second, timeout, func() (bool, error) { + err := info.Get() + if err != nil { + return false, fmt.Errorf("unable to get CRD: %v", err) + } + + crd := &apiextv1beta1.CustomResourceDefinition{} + err = scheme.Scheme.Convert(info.Object, crd, nil) + if err != nil { + return false, fmt.Errorf("unable to convert to CRD type: %v", err) + } + + for _, cond := range crd.Status.Conditions { + switch cond.Type { + case apiextv1beta1.Established: + if cond.Status == apiextv1beta1.ConditionTrue { + return true, nil + } + case apiextv1beta1.NamesAccepted: + if cond.Status == apiextv1beta1.ConditionFalse { + return false, fmt.Errorf("naming conflict detected for CRD %s", crd.GetName()) + } + } + } + + return false, nil + }) +} + func perform(infos Result, fn ResourceActorFunc) error { if len(infos) == 0 { return ErrNoObjectsVisited diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index a41490f9b..810abdf17 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -24,8 +24,10 @@ import ( "sort" "strings" "testing" + "time" - v1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" + apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -33,15 +35,35 @@ import ( "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" + kubectlscheme "k8s.io/kubernetes/pkg/kubectl/scheme" ) +func init() { + err := apiextv1beta1.AddToScheme(scheme.Scheme) + if err != nil { + panic(err) + } + + // Tiller use the scheme from go-client, but the cmdtesting + // package used here is hardcoded to use the scheme from + // kubectl. So for testing, we need to add the CustomResourceDefinition + // type to both schemes. + err = apiextv1beta1.AddToScheme(kubectlscheme.Scheme) + if err != nil { + panic(err) + } +} + var ( - codec = scheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...) unstructuredSerializer = resource.UnstructuredPlusDefaultContentConfig().NegotiatedSerializer ) +func getCodec() runtime.Codec { + return scheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...) +} + func objBody(obj runtime.Object) io.ReadCloser { - return ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(codec, obj)))) + return ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(getCodec(), obj)))) } func newPod(name string) v1.Pod { @@ -103,7 +125,7 @@ func notFoundBody() *metav1.Status { func newResponse(code int, obj runtime.Object) (*http.Response, error) { header := http.Header{} header.Set("Content-Type", runtime.ContentTypeJSON) - body := ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(codec, obj)))) + body := ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(getCodec(), obj)))) return &http.Response{StatusCode: code, Header: header, Body: body}, nil } @@ -434,6 +456,88 @@ func TestResourceSortOrder(t *testing.T) { } } +func TestWaitUntilCRDEstablished(t *testing.T) { + testCases := map[string]struct { + conditions []apiextv1beta1.CustomResourceDefinitionCondition + returnConditionsAfter int + success bool + }{ + "crd reaches established state after 2 requests": { + conditions: []apiextv1beta1.CustomResourceDefinitionCondition{ + { + Type: apiextv1beta1.Established, + Status: apiextv1beta1.ConditionTrue, + }, + }, + returnConditionsAfter: 2, + success: true, + }, + "crd does not reach established state before timeout": { + conditions: []apiextv1beta1.CustomResourceDefinitionCondition{}, + returnConditionsAfter: 100, + success: false, + }, + "crd name is not accepted": { + conditions: []apiextv1beta1.CustomResourceDefinitionCondition{ + { + Type: apiextv1beta1.NamesAccepted, + Status: apiextv1beta1.ConditionFalse, + }, + }, + returnConditionsAfter: 1, + success: false, + }, + } + + for tn, tc := range testCases { + func(name string) { + c := newTestClient() + defer c.Cleanup() + + crdWithoutConditions := newCrdWithStatus("name", apiextv1beta1.CustomResourceDefinitionStatus{}) + crdWithConditions := newCrdWithStatus("name", apiextv1beta1.CustomResourceDefinitionStatus{ + Conditions: tc.conditions, + }) + + requestCount := 0 + c.TestFactory.UnstructuredClient = &fake.RESTClient{ + GroupVersion: schema.GroupVersion{Version: "v1"}, + NegotiatedSerializer: unstructuredSerializer, + Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { + var crd apiextv1beta1.CustomResourceDefinition + if requestCount < tc.returnConditionsAfter { + crd = crdWithoutConditions + } else { + crd = crdWithConditions + } + requestCount += 1 + return newResponse(200, &crd) + }), + } + + err := c.WaitUntilCRDEstablished(strings.NewReader(crdManifest), 5*time.Second) + if err != nil && tc.success { + t.Errorf("%s: expected no error, but got %v", name, err) + } + if err == nil && !tc.success { + t.Errorf("%s: expected error, but didn't get one", name) + } + }(tn) + } +} + +func newCrdWithStatus(name string, status apiextv1beta1.CustomResourceDefinitionStatus) apiextv1beta1.CustomResourceDefinition { + crd := apiextv1beta1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: metav1.NamespaceDefault, + }, + Spec: apiextv1beta1.CustomResourceDefinitionSpec{}, + Status: status, + } + return crd +} + func TestPerform(t *testing.T) { tests := []struct { name string @@ -701,3 +805,41 @@ spec: ports: - containerPort: 80 ` + +const crdManifest = ` +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + labels: + controller-tools.k8s.io: "1.0" + name: applications.app.k8s.io +spec: + group: app.k8s.io + names: + kind: Application + plural: applications + scope: Namespaced + validation: + openAPIV3Schema: + properties: + apiVersion: + description: 'Description' + type: string + kind: + description: 'Kind' + type: string + metadata: + type: object + spec: + type: object + status: + type: object + version: v1beta1 +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +` diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index dca7c0756..6063e9c5f 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -141,6 +141,8 @@ type KubeClient interface { // WaitAndGetCompletedPodPhase waits up to a timeout until a pod enters a completed phase // and returns said phase (PodSucceeded or PodFailed qualify). WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, timeout time.Duration) (v1.PodPhase, error) + + WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error } // PrintingKubeClient implements KubeClient, but simply prints the reader to @@ -197,6 +199,11 @@ func (p *PrintingKubeClient) WaitAndGetCompletedPodPhase(namespace string, reade return v1.PodUnknown, err } +func (p *PrintingKubeClient) WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error { + _, err := io.Copy(p.Out, reader) + return err +} + // Environment provides the context for executing a client request. // // All services in a context are concurrency safe. diff --git a/pkg/tiller/environment/environment_test.go b/pkg/tiller/environment/environment_test.go index 9e9b549d4..464cee191 100644 --- a/pkg/tiller/environment/environment_test.go +++ b/pkg/tiller/environment/environment_test.go @@ -69,6 +69,10 @@ func (k *mockKubeClient) WaitAndGetCompletedPodStatus(namespace string, reader i return "", nil } +func (k *mockKubeClient) WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error { + return nil +} + var _ Engine = &mockEngine{} var _ KubeClient = &mockKubeClient{} var _ KubeClient = &PrintingKubeClient{} diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index d32fd82f6..c95b31477 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -23,6 +23,7 @@ import ( "path" "regexp" "strings" + "time" "github.com/technosophos/moniker" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -399,7 +400,7 @@ func (s *ReleaseServer) execHook(hs []*release.Hook, name, namespace, hook strin b.Reset() b.WriteString(h.Manifest) - // We can't watch CRDs + // We can't watch CRDs, but need to wait until they reach the established state before continuing if hook != hooks.CRDInstall { if err := kubeCli.WatchUntilReady(namespace, b, timeout, false); err != nil { s.Log("warning: Release %s %s %s could not complete: %s", name, hook, h.Path, err) @@ -410,6 +411,11 @@ func (s *ReleaseServer) execHook(hs []*release.Hook, name, namespace, hook strin } return err } + } else { + if err := kubeCli.WaitUntilCRDEstablished(b, time.Duration(timeout)*time.Second); err != nil { + s.Log("warning: Release %s %s %s could not complete: %s", name, hook, h.Path, err) + return err + } } } diff --git a/pkg/tiller/release_server_test.go b/pkg/tiller/release_server_test.go index ecf5ffd17..4087b2f76 100644 --- a/pkg/tiller/release_server_test.go +++ b/pkg/tiller/release_server_test.go @@ -642,6 +642,10 @@ func (kc *mockHooksKubeClient) WaitAndGetCompletedPodPhase(namespace string, rea return v1.PodUnknown, nil } +func (kc *mockHooksKubeClient) WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error { + return nil +} + func deletePolicyStub(kubeClient *mockHooksKubeClient) *ReleaseServer { e := environment.New() e.Releases = storage.Init(driver.NewMemory()) From 2aa41559524f6d170a131eab251735b51fbc452c Mon Sep 17 00:00:00 2001 From: Kenta Iso Date: Sun, 7 Apr 2019 16:10:34 +0900 Subject: [PATCH 08/56] Fix 'THE INCLUDE FUNCTION' in 'Developing Templates' output Signed-off-by: Kenta Iso --- docs/chart_template_guide/named_templates.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chart_template_guide/named_templates.md b/docs/chart_template_guide/named_templates.md index 08e41d58d..630b98c34 100644 --- a/docs/chart_template_guide/named_templates.md +++ b/docs/chart_template_guide/named_templates.md @@ -215,7 +215,7 @@ data: myvalue: "Hello World" drink: "coffee" food: "pizza" - app_name: mychart +app_name: mychart app_version: "0.1.0+1478129847" ``` From ae48e53e29fcc4703cbe761de01dcf52ffc36a2a Mon Sep 17 00:00:00 2001 From: ialidzhikov Date: Mon, 8 Apr 2019 18:34:54 +0300 Subject: [PATCH 09/56] Update golang version Signed-off-by: ialidzhikov --- .circleci/config.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7bba262a8..09d49fb89 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: working_directory: /go/src/k8s.io/helm parallelism: 3 docker: - - image: golang:1.12.1 + - image: golang:1.12.2 environment: PROJECT_NAME: "kubernetes-helm" steps: diff --git a/Makefile b/Makefile index 3584521a4..719fd5f03 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ DOCKER_REGISTRY ?= gcr.io IMAGE_PREFIX ?= kubernetes-helm -DEV_IMAGE ?= golang:1.12.1 +DEV_IMAGE ?= golang:1.12.2 SHORT_NAME ?= tiller SHORT_NAME_RUDDER ?= rudder TARGETS ?= darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le linux/s390x windows/amd64 From b72265b4f3c539bf543eddfb7ef02c78a1fe8671 Mon Sep 17 00:00:00 2001 From: SataQiu Date: Tue, 9 Apr 2019 18:35:04 +0800 Subject: [PATCH 10/56] refactor: use const code block Signed-off-by: SataQiu --- cmd/helm/search/search.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cmd/helm/search/search.go b/cmd/helm/search/search.go index 04acb8690..a9d0616e9 100644 --- a/cmd/helm/search/search.go +++ b/cmd/helm/search/search.go @@ -33,6 +33,12 @@ import ( "k8s.io/helm/pkg/repo" ) +const ( + sep = "\v" + // verSep is a separator for version fields in map keys. + verSep = "$$" +) + // Result is a search result. // // Score indicates how close it is to match. The higher the score, the longer @@ -49,16 +55,11 @@ type Index struct { charts map[string]*repo.ChartVersion } -const sep = "\v" - // NewIndex creats a new Index. func NewIndex() *Index { return &Index{lines: map[string]string{}, charts: map[string]*repo.ChartVersion{}} } -// verSep is a separator for version fields in map keys. -const verSep = "$$" - // AddRepo adds a repository index to the search index. func (i *Index) AddRepo(rname string, ind *repo.IndexFile, all bool) { ind.SortEntries() From 32d7f1a3fc226c1745a58b51e318b7362bc7a0bf Mon Sep 17 00:00:00 2001 From: Morten Torkildsen Date: Tue, 9 Apr 2019 17:37:51 -0700 Subject: [PATCH 11/56] fix(helm): Fix manifest validation Manifest validation is done by the builder, but it requires that the schema is set before the Stream function is called. Otherwise the StreamVisitor is created without a schema and no validation is done. Signed-off-by: Morten Torkildsen --- pkg/kube/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 4568dd34b..e1101667d 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -142,8 +142,8 @@ func (c *Client) BuildUnstructured(namespace string, reader io.Reader) (Result, ContinueOnError(). NamespaceParam(namespace). DefaultNamespace(). - Stream(reader, ""). Schema(c.validator()). + Stream(reader, ""). Flatten(). Do().Infos() return result, scrubValidationError(err) From f506db4b752c5901e13abab84cb431d0cb1937f4 Mon Sep 17 00:00:00 2001 From: Timofey Kirillov Date: Wed, 10 Apr 2019 17:08:14 +0300 Subject: [PATCH 12/56] Add --cleanup-on-fail support into --atomic: use CleanupOnFail param in rollback Signed-off-by: Timofey Kirillov --- cmd/helm/upgrade.go | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 2446f3eb5..f07a5c4a7 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -283,17 +283,18 @@ func (u *upgradeCmd) run() error { if u.atomic { fmt.Fprint(u.out, "ROLLING BACK") rollback := &rollbackCmd{ - out: u.out, - client: u.client, - name: u.release, - dryRun: u.dryRun, - recreate: u.recreate, - force: u.force, - timeout: u.timeout, - wait: u.wait, - description: "", - revision: releaseHistory.Releases[0].Version, - disableHooks: u.disableHooks, + out: u.out, + client: u.client, + name: u.release, + dryRun: u.dryRun, + recreate: u.recreate, + force: u.force, + timeout: u.timeout, + wait: u.wait, + description: "", + revision: releaseHistory.Releases[0].Version, + disableHooks: u.disableHooks, + cleanupOnFail: u.cleanupOnFail, } if err := rollback.run(); err != nil { return err From eb457460b14aa18d09ee57c4f971d93cd0352bc5 Mon Sep 17 00:00:00 2001 From: xichengliudui <1693291525@qq.com> Date: Wed, 10 Apr 2019 16:07:09 -0400 Subject: [PATCH 13/56] Using const() defines constants together Signed-off-by: xichengliudui <1693291525@qq.com> --- cmd/helm/inspect.go | 13 ++++++------- pkg/hooks/hooks.go | 16 ++++++++-------- pkg/lint/lint_test.go | 15 ++++++++------- pkg/lint/rules/template_test.go | 9 +++++---- 4 files changed, 27 insertions(+), 26 deletions(-) diff --git a/cmd/helm/inspect.go b/cmd/helm/inspect.go index 52e681e48..9330b900f 100644 --- a/cmd/helm/inspect.go +++ b/cmd/helm/inspect.go @@ -27,27 +27,26 @@ import ( "k8s.io/helm/pkg/chartutil" ) -const inspectDesc = ` +const ( + inspectDesc = ` This command inspects a chart and displays information. It takes a chart reference ('stable/drupal'), a full path to a directory or packaged chart, or a URL. Inspect prints the contents of the Chart.yaml file and the values.yaml file. ` - -const inspectValuesDesc = ` + inspectValuesDesc = ` This command inspects a chart (directory, file, or URL) and displays the contents of the values.yaml file ` - -const inspectChartDesc = ` + inspectChartDesc = ` This command inspects a chart (directory, file, or URL) and displays the contents of the Charts.yaml file ` - -const readmeChartDesc = ` + readmeChartDesc = ` This command inspects a chart (directory, file, or URL) and displays the contents of the README file ` +) type inspectCmd struct { chartpath string diff --git a/pkg/hooks/hooks.go b/pkg/hooks/hooks.go index 5083672cd..13a09b08b 100644 --- a/pkg/hooks/hooks.go +++ b/pkg/hooks/hooks.go @@ -20,14 +20,14 @@ import ( "k8s.io/helm/pkg/proto/hapi/release" ) -// HookAnno is the label name for a hook -const HookAnno = "helm.sh/hook" - -// HookWeightAnno is the label name for a hook weight -const HookWeightAnno = "helm.sh/hook-weight" - -// HookDeleteAnno is the label name for the delete policy for a hook -const HookDeleteAnno = "helm.sh/hook-delete-policy" +const ( + // HookAnno is the label name for a hook + HookAnno = "helm.sh/hook" + // HookWeightAnno is the label name for a hook weight + HookWeightAnno = "helm.sh/hook-weight" + // HookDeleteAnno is the label name for the delete policy for a hook + HookDeleteAnno = "helm.sh/hook-delete-policy" +) // Types of hooks const ( diff --git a/pkg/lint/lint_test.go b/pkg/lint/lint_test.go index 84dfbf508..8bf5a0927 100644 --- a/pkg/lint/lint_test.go +++ b/pkg/lint/lint_test.go @@ -26,13 +26,14 @@ import ( var values = []byte{} -const namespace = "testNamespace" -const strict = false - -const badChartDir = "rules/testdata/badchartfile" -const badValuesFileDir = "rules/testdata/badvaluesfile" -const badYamlFileDir = "rules/testdata/albatross" -const goodChartDir = "rules/testdata/goodone" +const ( + namespace = "testNamespace" + strict = false + badChartDir = "rules/testdata/badchartfile" + badValuesFileDir = "rules/testdata/badvaluesfile" + badYamlFileDir = "rules/testdata/albatross" + goodChartDir = "rules/testdata/goodone" +) func TestBadChart(t *testing.T) { m := All(badChartDir, values, namespace, strict).Messages diff --git a/pkg/lint/rules/template_test.go b/pkg/lint/rules/template_test.go index 41a7384e7..a294d3c57 100644 --- a/pkg/lint/rules/template_test.go +++ b/pkg/lint/rules/template_test.go @@ -25,7 +25,11 @@ import ( "k8s.io/helm/pkg/lint/support" ) -const templateTestBasedir = "./testdata/albatross" +const ( + strict = false + namespace = "testNamespace" + templateTestBasedir = "./testdata/albatross" +) func TestValidateAllowedExtension(t *testing.T) { var failTest = []string{"/foo", "/test.toml"} @@ -46,9 +50,6 @@ func TestValidateAllowedExtension(t *testing.T) { var values = []byte("nameOverride: ''\nhttpPort: 80") -const namespace = "testNamespace" -const strict = false - func TestTemplateParsing(t *testing.T) { linter := support.Linter{ChartDir: templateTestBasedir} Templates(&linter, values, namespace, strict) From 165e071d4a299f4dc4b84319b16eff057210ebd4 Mon Sep 17 00:00:00 2001 From: xichengliudui <1693291525@qq.com> Date: Thu, 11 Apr 2019 06:45:45 -0400 Subject: [PATCH 14/56] Using const() defines constants together (part:2) Signed-off-by: xichengliudui <1693291525@qq.com> update pull request Signed-off-by: xichengliudui <1693291525@qq.com> --- pkg/helm/fake_test.go | 6 ++++-- pkg/releasetesting/test_suite_test.go | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pkg/helm/fake_test.go b/pkg/helm/fake_test.go index ecb0a2855..4376742d7 100644 --- a/pkg/helm/fake_test.go +++ b/pkg/helm/fake_test.go @@ -26,7 +26,8 @@ import ( rls "k8s.io/helm/pkg/proto/hapi/services" ) -const cmInputTemplate = `kind: ConfigMap +const ( + cmInputTemplate = `kind: ConfigMap apiVersion: v1 metadata: name: example @@ -34,7 +35,7 @@ data: Release: {{.Release | toYaml | indent 4}} ` -const cmOutputTemplate = ` + cmOutputTemplate = ` --- # Source: installChart/templates/cm.yaml kind: ConfigMap @@ -53,6 +54,7 @@ data: seconds: 242085845 ` +) var installChart *chart.Chart diff --git a/pkg/releasetesting/test_suite_test.go b/pkg/releasetesting/test_suite_test.go index 59f122953..7b856ac39 100644 --- a/pkg/releasetesting/test_suite_test.go +++ b/pkg/releasetesting/test_suite_test.go @@ -37,7 +37,8 @@ import ( tillerEnv "k8s.io/helm/pkg/tiller/environment" ) -const manifestWithTestSuccessHook = ` +const ( + manifestWithTestSuccessHook = ` apiVersion: v1 kind: Pod metadata: @@ -51,7 +52,7 @@ spec: cmd: fake-command ` -const manifestWithTestFailureHook = ` + manifestWithTestFailureHook = ` apiVersion: v1 kind: Pod metadata: @@ -64,7 +65,7 @@ spec: image: fake-gold-finding-image cmd: fake-gold-finding-command ` -const manifestWithInstallHooks = `apiVersion: v1 + manifestWithInstallHooks = `apiVersion: v1 kind: ConfigMap metadata: name: test-cm @@ -73,6 +74,7 @@ metadata: data: name: value ` +) func TestNewTestSuite(t *testing.T) { rel := releaseStub() From 5edb79df4ce8ff2c59bc0b9ee7885c8fcb1a5a86 Mon Sep 17 00:00:00 2001 From: xichengliudui <1693291525@qq.com> Date: Thu, 11 Apr 2019 06:39:52 -0400 Subject: [PATCH 15/56] Using const() defines constants together (part:1) Signed-off-by: xichengliudui <1693291525@qq.com> update pull request Signed-off-by: xichengliudui <1693291525@qq.com> update pull request Signed-off-by: xichengliudui <1693291525@qq.com> --- pkg/kube/resource_policy.go | 20 +++++++++++--------- pkg/lint/rules/template_test.go | 9 +++++---- pkg/tiller/environment/environment.go | 10 ++++++---- pkg/tiller/release_server.go | 26 ++++++++++++++------------ 4 files changed, 36 insertions(+), 29 deletions(-) diff --git a/pkg/kube/resource_policy.go b/pkg/kube/resource_policy.go index 9bce63a7c..3029a22a5 100644 --- a/pkg/kube/resource_policy.go +++ b/pkg/kube/resource_policy.go @@ -16,16 +16,18 @@ limitations under the License. package kube -// ResourcePolicyAnno is the annotation name for a resource policy -const ResourcePolicyAnno = "helm.sh/resource-policy" +const ( + // ResourcePolicyAnno is the annotation name for a resource policy + ResourcePolicyAnno = "helm.sh/resource-policy" -// deletePolicy is the resource policy type for delete -// -// This resource policy type allows explicitly opting in to the default -// resource deletion behavior, for example when overriding a chart's -// default annotations. Any other value allows resources to skip being -// deleted during an uninstallRelease action. -const deletePolicy = "delete" + // deletePolicy is the resource policy type for delete + // + // This resource policy type allows explicitly opting in to the default + // resource deletion behavior, for example when overriding a chart's + // default annotations. Any other value allows resources to skip being + // deleted during an uninstallRelease action. + deletePolicy = "delete" +) // ResourcePolicyIsKeep accepts a map of Kubernetes resource annotations and // returns true if the resource should be kept, otherwise false if it is safe diff --git a/pkg/lint/rules/template_test.go b/pkg/lint/rules/template_test.go index 41a7384e7..a294d3c57 100644 --- a/pkg/lint/rules/template_test.go +++ b/pkg/lint/rules/template_test.go @@ -25,7 +25,11 @@ import ( "k8s.io/helm/pkg/lint/support" ) -const templateTestBasedir = "./testdata/albatross" +const ( + strict = false + namespace = "testNamespace" + templateTestBasedir = "./testdata/albatross" +) func TestValidateAllowedExtension(t *testing.T) { var failTest = []string{"/foo", "/test.toml"} @@ -46,9 +50,6 @@ func TestValidateAllowedExtension(t *testing.T) { var values = []byte("nameOverride: ''\nhttpPort: 80") -const namespace = "testNamespace" -const strict = false - func TestTemplateParsing(t *testing.T) { linter := support.Linter{ChartDir: templateTestBasedir} Templates(&linter, values, namespace, strict) diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index 1325130ee..11860a249 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -37,11 +37,13 @@ import ( "k8s.io/helm/pkg/storage/driver" ) -// DefaultTillerNamespace is the default namespace for Tiller. -const DefaultTillerNamespace = "kube-system" +const ( + // DefaultTillerNamespace is the default namespace for Tiller. + DefaultTillerNamespace = "kube-system" -// GoTplEngine is the name of the Go template engine, as registered in the EngineYard. -const GoTplEngine = "gotpl" + // GoTplEngine is the name of the Go template engine, as registered in the EngineYard. + GoTplEngine = "gotpl" +) // DefaultEngine points to the engine that the EngineYard should treat as the // default. A chart that does not specify an engine may be run through the diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index d32fd82f6..d3f69012f 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -40,18 +40,20 @@ import ( "k8s.io/helm/pkg/version" ) -// releaseNameMaxLen is the maximum length of a release name. -// -// As of Kubernetes 1.4, the max limit on a name is 63 chars. We reserve 10 for -// charts to add data. Effectively, that gives us 53 chars. -// See https://github.com/kubernetes/helm/issues/1528 -const releaseNameMaxLen = 53 - -// NOTESFILE_SUFFIX that we want to treat special. It goes through the templating engine -// but it's not a yaml file (resource) hence can't have hooks, etc. And the user actually -// wants to see this file after rendering in the status command. However, it must be a suffix -// since there can be filepath in front of it. -const notesFileSuffix = "NOTES.txt" +const ( + // releaseNameMaxLen is the maximum length of a release name. + // + // As of Kubernetes 1.4, the max limit on a name is 63 chars. We reserve 10 for + // charts to add data. Effectively, that gives us 53 chars. + // See https://github.com/kubernetes/helm/issues/1528 + releaseNameMaxLen = 53 + + // NOTESFILE_SUFFIX that we want to treat special. It goes through the templating engine + // but it's not a yaml file (resource) hence can't have hooks, etc. And the user actually + // wants to see this file after rendering in the status command. However, it must be a suffix + // since there can be filepath in front of it. + notesFileSuffix = "NOTES.txt" +) var ( // errMissingChart indicates that a chart was not provided. From 43c4378444995b45b1b6d5a8c6024e7cc652096f Mon Sep 17 00:00:00 2001 From: SataQiu Date: Fri, 12 Apr 2019 16:34:17 +0800 Subject: [PATCH 16/56] cleanup: using const block Signed-off-by: SataQiu --- cmd/helm/installer/options.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/helm/installer/options.go b/cmd/helm/installer/options.go index 186286ec2..00cadac07 100644 --- a/cmd/helm/installer/options.go +++ b/cmd/helm/installer/options.go @@ -24,7 +24,12 @@ import ( "k8s.io/helm/pkg/version" ) -const defaultImage = "gcr.io/kubernetes-helm/tiller" +const ( + defaultImage = "gcr.io/kubernetes-helm/tiller" + + fmtJSON OutputFormat = "json" + fmtYAML OutputFormat = "yaml" +) // Options control how to install Tiller into a cluster, upgrade, and uninstall Tiller from a cluster. type Options struct { @@ -154,11 +159,6 @@ func (f *OutputFormat) Type() string { return "OutputFormat" } -const ( - fmtJSON OutputFormat = "json" - fmtYAML OutputFormat = "yaml" -) - // Set validates and sets the value of the OutputFormat func (f *OutputFormat) Set(s string) error { for _, of := range []OutputFormat{fmtJSON, fmtYAML} { From 3b3406a20dafb3d151b49341cd993942bffa6386 Mon Sep 17 00:00:00 2001 From: dieutth Date: Tue, 16 Apr 2019 13:32:24 +0200 Subject: [PATCH 17/56] Update install.md *From Script* should be in the same level as other *Installing the Helm Client* options. Signed-off-by: Dieu Tran --- docs/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/install.md b/docs/install.md index b9626a43a..ab8268bcd 100755 --- a/docs/install.md +++ b/docs/install.md @@ -60,7 +60,7 @@ The binary can also be installed via [`scoop`](https://scoop.sh) command-line in scoop install helm ``` -## From Script +### From Script Helm now has an installer script that will automatically grab the latest version of the Helm client and [install it locally](https://raw.githubusercontent.com/helm/helm/master/scripts/get). From 9bc1f1c16e27f6bdc2d57ab66b7a6877d3137478 Mon Sep 17 00:00:00 2001 From: Adam Reese Date: Tue, 16 Apr 2019 12:59:49 -0700 Subject: [PATCH 18/56] chore(OWNERS): Add hickeyma to OWNERS Signed-off-by: Adam Reese --- OWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/OWNERS b/OWNERS index 39f8c8448..d1c2b4259 100644 --- a/OWNERS +++ b/OWNERS @@ -1,6 +1,7 @@ maintainers: - adamreese - bacongobbler + - hickeyma - jascott1 - mattfarina - michelleN From 26bce22e3bab0aef0c6ed4bbd94d0496628a7944 Mon Sep 17 00:00:00 2001 From: Tariq Ibrahim Date: Tue, 16 Apr 2019 15:42:16 -0700 Subject: [PATCH 19/56] chore: bump up the dependencies of kubernetes and prometheus client Signed-off-by: Tariq Ibrahim --- glide.lock | 23 +++++++++++++---------- glide.yaml | 14 +++++++------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/glide.lock b/glide.lock index eedbd9381..5d4a6a9f8 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 9a8f0b6c906f605bb879fbcdf0c122096f7698fe6a975ec4e6648f2ee85fce3e -updated: 2019-03-26T10:33:38.977361532-07:00 +hash: d92d7faee5c7ecbb241dadcd993e5dd8dfba226739d20d97fabf23168613f3ac +updated: 2019-04-16T15:32:58.609105-07:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -212,9 +212,10 @@ imports: - name: github.com/pkg/errors version: 645ef00459ed84a119197bfb8d8205042c6df63d - name: github.com/prometheus/client_golang - version: c5b7fccd204277076155f10851dad72b76a49317 + version: 505eaef017263e299324067d40ca2c48f6a2cf50 subpackages: - prometheus + - prometheus/internal - prometheus/promhttp - name: github.com/prometheus/client_model version: fa8ad6fec33561be4280a8f0514318c79d7f6cb6 @@ -376,7 +377,7 @@ imports: - name: gopkg.in/yaml.v2 version: 5420a8b6744d3b0345ab293f6fcba19c978f1183 - name: k8s.io/api - version: 40a48860b5abbba9aa891b02b32da429b08d96a0 + version: 6e4e0e4f393bf5e8bbff570acd13217aa5a770cd subpackages: - admission/v1beta1 - admissionregistration/v1beta1 @@ -417,11 +418,13 @@ imports: - storage/v1alpha1 - storage/v1beta1 - name: k8s.io/apiextensions-apiserver - version: 53c4693659ed354d76121458fb819202dd1635fa + version: 727a075fdec8319bf095330e344b3ccc668abc73 subpackages: + - pkg/apis/apiextensions + - pkg/apis/apiextensions/v1beta1 - pkg/features - name: k8s.io/apimachinery - version: d7deff9243b165ee192f5551710ea4285dcfd615 + version: 6a84e37a896db9780c75367af8d2ed2bb944022e subpackages: - pkg/api/equality - pkg/api/errors @@ -477,7 +480,7 @@ imports: - third_party/forked/golang/netutil - third_party/forked/golang/reflect - name: k8s.io/apiserver - version: 8b27c41bdbb11ff103caa673315e097bf0289171 + version: 1ec86e4da56ce0573788fc12bb3a5530600c0e5d subpackages: - pkg/authentication/authenticator - pkg/authentication/serviceaccount @@ -485,7 +488,7 @@ imports: - pkg/features - pkg/util/feature - name: k8s.io/cli-runtime - version: 2899ed30580fdbc8286718edb4382b529463099d + version: d644b00f3b79346b7627329269bb25f2135f941c subpackages: - pkg/genericclioptions - pkg/kustomize @@ -500,7 +503,7 @@ imports: - pkg/printers - pkg/resource - name: k8s.io/client-go - version: 6ee68ca5fd8355d024d02f9db0b3b667e8357a0f + version: 1a26190bd76a9017e289958b9fba936430aa3704 subpackages: - discovery - discovery/cached/disk @@ -644,7 +647,7 @@ imports: - pkg/util/proto/testing - pkg/util/proto/validation - name: k8s.io/kubernetes - version: b805719a99126e54bcbc0a3d9ee8a45cd7e85632 + version: 3c949c7d419670cd99fe92f60e6f4d251898bdf2 subpackages: - pkg/api/legacyscheme - pkg/api/service diff --git a/glide.yaml b/glide.yaml index 8600ed0ac..19024aecf 100644 --- a/glide.yaml +++ b/glide.yaml @@ -48,22 +48,22 @@ import: - package: github.com/BurntSushi/toml version: ~0.3.0 - package: github.com/prometheus/client_golang - version: 0.8.0 + version: 0.9.2 - package: github.com/grpc-ecosystem/go-grpc-prometheus - package: k8s.io/kubernetes version: release-1.14 - package: k8s.io/client-go - version: kubernetes-1.14.0 + version: kubernetes-1.14.1 - package: k8s.io/api - version: kubernetes-1.14.0 + version: kubernetes-1.14.1 - package: k8s.io/apimachinery - version: kubernetes-1.14.0 + version: kubernetes-1.14.1 - package: k8s.io/apiserver - version: kubernetes-1.14.0 + version: kubernetes-1.14.1 - package: k8s.io/cli-runtime - version: kubernetes-1.14.0 + version: kubernetes-1.14.1 - package: k8s.io/apiextensions-apiserver - version: kubernetes-1.14.0 + version: kubernetes-1.14.1 - package: github.com/cyphar/filepath-securejoin version: ^0.2.1 From bb4f1ebea1077a2572a65d942c5d40339b46aabb Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 17 Apr 2019 09:48:11 -0400 Subject: [PATCH 20/56] Moving nebril to emeritus status due to inactivity Note, he has been emailed regarding the move including an offer to re-engage. He has not taken this up. The governance has a 3 months of inactivity clause that causes maintainers to fall off. This period has been long exceeded per metrics measured in devstats. Signed-off-by: Matt Farina --- OWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OWNERS b/OWNERS index d1c2b4259..df847ab37 100644 --- a/OWNERS +++ b/OWNERS @@ -5,7 +5,6 @@ maintainers: - jascott1 - mattfarina - michelleN - - nebril - prydonius - SlickNik - technosophos @@ -27,6 +26,7 @@ reviewers: - viglesiasce emeritus: - migmartri + - nebril - seh - vaikas-google - rimusz From e48a3be64af498c2a8891ca9244741f5ea1d26cc Mon Sep 17 00:00:00 2001 From: SataQiu Date: Thu, 18 Apr 2019 10:51:34 +0800 Subject: [PATCH 21/56] define port 44134 as a constant Signed-off-by: SataQiu --- cmd/helm/installer/install.go | 5 +++-- cmd/tiller/tiller.go | 2 +- pkg/helm/portforwarder/portforwarder.go | 4 ++-- pkg/tiller/environment/environment.go | 3 +++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cmd/helm/installer/install.go b/cmd/helm/installer/install.go index d6d24eec4..04f9f9b19 100644 --- a/cmd/helm/installer/install.go +++ b/cmd/helm/installer/install.go @@ -36,6 +36,7 @@ import ( "k8s.io/helm/pkg/version" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/tiller/environment" ) // Install uses Kubernetes client to install Tiller. @@ -226,7 +227,7 @@ func generateDeployment(opts *Options) (*v1beta1.Deployment, error) { Image: opts.SelectImage(), ImagePullPolicy: opts.pullPolicy(), Ports: []v1.ContainerPort{ - {ContainerPort: 44134, Name: "tiller"}, + {ContainerPort: environment.DefaultTillerPort, Name: "tiller"}, {ContainerPort: 44135, Name: "http"}, }, Env: []v1.EnvVar{ @@ -341,7 +342,7 @@ func generateService(namespace string) *v1.Service { Ports: []v1.ServicePort{ { Name: "tiller", - Port: 44134, + Port: environment.DefaultTillerPort, TargetPort: intstr.FromString("tiller"), }, }, diff --git a/cmd/tiller/tiller.go b/cmd/tiller/tiller.go index f3ba197b5..f961d6871 100644 --- a/cmd/tiller/tiller.go +++ b/cmd/tiller/tiller.go @@ -74,7 +74,7 @@ const ( ) var ( - grpcAddr = flag.String("listen", ":44134", "address:port to listen on") + grpcAddr = flag.String("listen", fmt.Sprintf(":%v", environment.DefaultTillerPort), "address:port to listen on") probeAddr = flag.String("probe-listen", ":44135", "address:port to listen on for probes") enableTracing = flag.Bool("trace", false, "enable rpc tracing") store = flag.String("storage", storageConfigMap, "storage driver to use. One of 'configmap', 'memory', or 'secret'") diff --git a/pkg/helm/portforwarder/portforwarder.go b/pkg/helm/portforwarder/portforwarder.go index e962eef7f..0b04478f5 100644 --- a/pkg/helm/portforwarder/portforwarder.go +++ b/pkg/helm/portforwarder/portforwarder.go @@ -27,6 +27,7 @@ import ( "k8s.io/client-go/rest" "k8s.io/helm/pkg/kube" + "k8s.io/helm/pkg/tiller/environment" ) var ( @@ -39,8 +40,7 @@ func New(namespace string, client kubernetes.Interface, config *rest.Config) (*k if err != nil { return nil, err } - const tillerPort = 44134 - t := kube.NewTunnel(client.CoreV1().RESTClient(), config, namespace, podName, tillerPort) + t := kube.NewTunnel(client.CoreV1().RESTClient(), config, namespace, podName, environment.DefaultTillerPort) return t, t.ForwardPort() } diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index 28d4843a3..b237c53cc 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -41,6 +41,9 @@ const ( // DefaultTillerNamespace is the default namespace for Tiller. DefaultTillerNamespace = "kube-system" + // DefaultTillerPort defines the default port tiller listen on for client traffic + DefaultTillerPort = 44134 + // GoTplEngine is the name of the Go template engine, as registered in the EngineYard. GoTplEngine = "gotpl" ) From 06fbc720e775b1ec4fe8db47d98fc404fdbaad52 Mon Sep 17 00:00:00 2001 From: SataQiu Date: Thu, 18 Apr 2019 14:14:32 +0800 Subject: [PATCH 22/56] refactor: using tiller probe port constant Signed-off-by: SataQiu --- cmd/helm/installer/install.go | 6 +++--- cmd/tiller/tiller.go | 2 +- pkg/tiller/environment/environment.go | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cmd/helm/installer/install.go b/cmd/helm/installer/install.go index 04f9f9b19..5c3369c7d 100644 --- a/cmd/helm/installer/install.go +++ b/cmd/helm/installer/install.go @@ -228,7 +228,7 @@ func generateDeployment(opts *Options) (*v1beta1.Deployment, error) { ImagePullPolicy: opts.pullPolicy(), Ports: []v1.ContainerPort{ {ContainerPort: environment.DefaultTillerPort, Name: "tiller"}, - {ContainerPort: 44135, Name: "http"}, + {ContainerPort: environment.DefaultTillerProbePort, Name: "http"}, }, Env: []v1.EnvVar{ {Name: "TILLER_NAMESPACE", Value: opts.Namespace}, @@ -238,7 +238,7 @@ func generateDeployment(opts *Options) (*v1beta1.Deployment, error) { Handler: v1.Handler{ HTTPGet: &v1.HTTPGetAction{ Path: "/liveness", - Port: intstr.FromInt(44135), + Port: intstr.FromInt(environment.DefaultTillerProbePort), }, }, InitialDelaySeconds: 1, @@ -248,7 +248,7 @@ func generateDeployment(opts *Options) (*v1beta1.Deployment, error) { Handler: v1.Handler{ HTTPGet: &v1.HTTPGetAction{ Path: "/readiness", - Port: intstr.FromInt(44135), + Port: intstr.FromInt(environment.DefaultTillerProbePort), }, }, InitialDelaySeconds: 1, diff --git a/cmd/tiller/tiller.go b/cmd/tiller/tiller.go index f961d6871..ba26cc238 100644 --- a/cmd/tiller/tiller.go +++ b/cmd/tiller/tiller.go @@ -75,7 +75,7 @@ const ( var ( grpcAddr = flag.String("listen", fmt.Sprintf(":%v", environment.DefaultTillerPort), "address:port to listen on") - probeAddr = flag.String("probe-listen", ":44135", "address:port to listen on for probes") + probeAddr = flag.String("probe-listen", fmt.Sprintf(":%v", environment.DefaultTillerProbePort), "address:port to listen on for probes") enableTracing = flag.Bool("trace", false, "enable rpc tracing") store = flag.String("storage", storageConfigMap, "storage driver to use. One of 'configmap', 'memory', or 'secret'") remoteReleaseModules = flag.Bool("experimental-release", false, "enable experimental release modules") diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index b237c53cc..21c23d421 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -44,6 +44,9 @@ const ( // DefaultTillerPort defines the default port tiller listen on for client traffic DefaultTillerPort = 44134 + // DefaultTillerProbePort defines the default port to listen on for probes + DefaultTillerProbePort = 44135 + // GoTplEngine is the name of the Go template engine, as registered in the EngineYard. GoTplEngine = "gotpl" ) From d0f12eae210d20bd18723f88455fd44eb3fa2ffa Mon Sep 17 00:00:00 2001 From: Alan Carson Date: Fri, 19 Apr 2019 12:50:41 +0100 Subject: [PATCH 23/56] Added Cloudsmith to Additional Tools Hi! This PR adds a link to [Cloudsmith](https://cloudsmith.io), which is a package management service SaaS. It's commercial, but it's completely free for open-source and it has generous free tiers otherwise. It has first-class support for Helm (and many other package formats, such as npm, Docker etc), plus org/teams management, granular access controls, private repositories, repository-specific entitlements, a worldwide content distribution network, webhooks, access logs, etc. Thank you. :) Full disclosure: I work at Cloudsmith. \o/ Signed-off-by: Alan Carson --- docs/related.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/related.md b/docs/related.md index a8e494172..3f8c73d4a 100644 --- a/docs/related.md +++ b/docs/related.md @@ -68,6 +68,7 @@ Tools layered on top of Helm or Tiller. - [Armada](https://github.com/att-comdev/armada) - Manage prefixed releases throughout various Kubernetes namespaces, and removes completed jobs for complex deployments. Used by the [Openstack-Helm](https://github.com/openstack/openstack-helm) team. - [ChartMuseum](https://github.com/chartmuseum/chartmuseum) - Helm Chart Repository with support for Amazon S3 and Google Cloud Storage - [Chartify](https://github.com/appscode/chartify) - Generate Helm charts from existing Kubernetes resources. +- [Cloudsmith](https://cloudsmith.io/l/helm-repository/) - Fully managed SaaS offering private Helm Chart Repositories - [Codefresh](https://codefresh.io) - Kubernetes native CI/CD and management platform with UI dashboards for managing Helm charts and releases - [Cog](https://github.com/ohaiwalt/cog-helm) - Helm chart to deploy Cog on Kubernetes - [Drone.io Helm Plugin](http://plugins.drone.io/ipedrazas/drone-helm/) - Run Helm inside of the Drone CI/CD system From f602c2328d8de5b2f466f56a95d1b371ab2de3bf Mon Sep 17 00:00:00 2001 From: Evan Vetere Date: Fri, 19 Apr 2019 18:35:28 -0400 Subject: [PATCH 24/56] tone down the enthusiasm fix for unit tests Signed-off-by: Evan Vetere --- cmd/helm/init.go | 1 - cmd/helm/repo_update.go | 2 +- cmd/helm/rollback.go | 2 +- cmd/helm/rollback_test.go | 8 ++++---- cmd/helm/upgrade.go | 2 +- cmd/helm/upgrade_test.go | 20 ++++++++++---------- docs/charts.md | 2 +- docs/rbac.md | 1 - docs/using_helm.md | 2 +- pkg/downloader/manager.go | 2 +- 10 files changed, 20 insertions(+), 22 deletions(-) diff --git a/cmd/helm/init.go b/cmd/helm/init.go index 682189f84..145abdc87 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -310,7 +310,6 @@ func (i *initCmd) run() error { "$ helm init --tiller-image gcr.io/kubernetes-helm/tiller:v2.8.2\n\n") } - fmt.Fprintln(i.out, "Happy Helming!") return nil } diff --git a/cmd/helm/repo_update.go b/cmd/helm/repo_update.go index 2628b7f2f..592ad4b7d 100644 --- a/cmd/helm/repo_update.go +++ b/cmd/helm/repo_update.go @@ -125,6 +125,6 @@ func updateCharts(repos []*repo.ChartRepository, out io.Writer, home helmpath.Ho return errors.New("Update Failed. Check log for details") } - fmt.Fprintln(out, "Update Complete. ⎈ Happy Helming! ⎈") + fmt.Fprintln(out, "Update Complete.") return nil } diff --git a/cmd/helm/rollback.go b/cmd/helm/rollback.go index 4cffd43d5..95a2b2c8c 100644 --- a/cmd/helm/rollback.go +++ b/cmd/helm/rollback.go @@ -112,7 +112,7 @@ func (r *rollbackCmd) run() error { return prettyError(err) } - fmt.Fprintf(r.out, "Rollback was a success! Happy Helming!\n") + fmt.Fprintf(r.out, "Rollback was a success.\n") return nil } diff --git a/cmd/helm/rollback_test.go b/cmd/helm/rollback_test.go index a98a4096a..5d97dca4b 100644 --- a/cmd/helm/rollback_test.go +++ b/cmd/helm/rollback_test.go @@ -31,25 +31,25 @@ func TestRollbackCmd(t *testing.T) { { name: "rollback a release", args: []string{"funny-honey", "1"}, - expected: "Rollback was a success! Happy Helming!", + expected: "Rollback was a success.", }, { name: "rollback a release with timeout", args: []string{"funny-honey", "1"}, flags: []string{"--timeout", "120"}, - expected: "Rollback was a success! Happy Helming!", + expected: "Rollback was a success.", }, { name: "rollback a release with wait", args: []string{"funny-honey", "1"}, flags: []string{"--wait"}, - expected: "Rollback was a success! Happy Helming!", + expected: "Rollback was a success.", }, { name: "rollback a release with description", args: []string{"funny-honey", "1"}, flags: []string{"--description", "foo"}, - expected: "Rollback was a success! Happy Helming!", + expected: "Rollback was a success.", }, { name: "rollback a release without revision", diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index f07a5c4a7..683b1f54d 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -307,7 +307,7 @@ func (u *upgradeCmd) run() error { printRelease(u.out, resp.Release) } - fmt.Fprintf(u.out, "Release %q has been upgraded. Happy Helming!\n", u.release) + fmt.Fprintf(u.out, "Release %q has been upgraded.\n", u.release) // Print the status like status command does status, err := u.client.ReleaseStatus(u.release) diff --git a/cmd/helm/upgrade_test.go b/cmd/helm/upgrade_test.go index c2b1b4ea6..433f3bd2c 100644 --- a/cmd/helm/upgrade_test.go +++ b/cmd/helm/upgrade_test.go @@ -96,7 +96,7 @@ func TestUpgradeCmd(t *testing.T) { name: "upgrade a release", args: []string{"funny-bunny", chartPath}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 2, Chart: ch}), - expected: "Release \"funny-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"funny-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 2, Chart: ch})}, }, { @@ -104,7 +104,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"funny-bunny", chartPath}, flags: []string{"--timeout", "120"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 3, Chart: ch2}), - expected: "Release \"funny-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"funny-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 3, Chart: ch2})}, }, { @@ -112,7 +112,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"funny-bunny", chartPath}, flags: []string{"--reset-values", "true"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 4, Chart: ch2}), - expected: "Release \"funny-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"funny-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 4, Chart: ch2})}, }, { @@ -120,7 +120,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"funny-bunny", chartPath}, flags: []string{"--reuse-values", "true"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 5, Chart: ch2}), - expected: "Release \"funny-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"funny-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 5, Chart: ch2})}, }, { @@ -128,7 +128,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"funny-bunny", chartPath}, flags: []string{"--atomic"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 6, Chart: ch}), - expected: "Release \"funny-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"funny-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 6, Chart: ch})}, }, { @@ -136,7 +136,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"zany-bunny", chartPath}, flags: []string{"-i"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "zany-bunny", Version: 1, Chart: ch}), - expected: "Release \"zany-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"zany-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "zany-bunny", Version: 1, Chart: ch})}, }, { @@ -144,7 +144,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"crazy-bunny", chartPath}, flags: []string{"-i", "--timeout", "120"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 1, Chart: ch}), - expected: "Release \"crazy-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"crazy-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 1, Chart: ch})}, }, { @@ -152,7 +152,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"crazy-bunny", chartPath}, flags: []string{"-i", "--description", "foo"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 1, Chart: ch, Description: "foo"}), - expected: "Release \"crazy-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"crazy-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 1, Chart: ch, Description: "foo"})}, }, { @@ -160,7 +160,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"crazy-bunny", chartPath}, flags: []string{"--wait"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 2, Chart: ch2}), - expected: "Release \"crazy-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"crazy-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 2, Chart: ch2})}, }, { @@ -168,7 +168,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"crazy-bunny", chartPath}, flags: []string{"--description", "foo"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 2, Chart: ch2}), - expected: "Release \"crazy-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"crazy-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 2, Chart: ch2, Description: "foo"})}, }, { diff --git a/docs/charts.md b/docs/charts.md index 6137898c2..ed2e2f9eb 100644 --- a/docs/charts.md +++ b/docs/charts.md @@ -191,7 +191,7 @@ Hang tight while we grab the latest from your chart repositories... ...Successfully got an update from the "stable" chart repository ...Successfully got an update from the "example" chart repository ...Successfully got an update from the "another" chart repository -Update Complete. Happy Helming! +Update Complete. Saving 2 charts Downloading apache from repo http://example.com/charts Downloading mysql from repo http://another.example.com/charts diff --git a/docs/rbac.md b/docs/rbac.md index d53edda49..9d4531ffe 100644 --- a/docs/rbac.md +++ b/docs/rbac.md @@ -106,7 +106,6 @@ $ helm init --service-account tiller --tiller-namespace tiller-world $HELM_HOME has been configured at /Users/awesome-user/.helm. Tiller (the Helm server side component) has been installed into your Kubernetes Cluster. -Happy Helming! $ helm install nginx --tiller-namespace tiller-world --namespace tiller-world NAME: wayfaring-yak diff --git a/docs/using_helm.md b/docs/using_helm.md index faf3cc20f..ad693472e 100755 --- a/docs/using_helm.md +++ b/docs/using_helm.md @@ -359,7 +359,7 @@ update things that have changed since the last release. ```console $ helm upgrade -f panda.yaml happy-panda stable/mariadb Fetched stable/mariadb-0.3.0.tgz to /Users/mattbutcher/Code/Go/src/k8s.io/helm/mariadb-0.3.0.tgz -happy-panda has been upgraded. Happy Helming! +happy-panda has been upgraded. Last Deployed: Wed Sep 28 12:47:54 2016 Namespace: default Status: DEPLOYED diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 372940880..970bd9546 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -465,7 +465,7 @@ func (m *Manager) parallelRepoUpdate(repos []*repo.Entry) error { }(r) } wg.Wait() - fmt.Fprintln(out, "Update Complete. ⎈Happy Helming!⎈") + fmt.Fprintln(out, "Update Complete.") return nil } From 290a9fca18de9defeb3bff9e728bb1f603a8269a Mon Sep 17 00:00:00 2001 From: Panic Stevenson Date: Sat, 20 Apr 2019 18:22:21 -0500 Subject: [PATCH 25/56] Update hapi.version Description in Protobuf README Signed-off-by: Panic Stevenson --- _proto/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_proto/README.md b/_proto/README.md index 7704572eb..f43c1e11e 100644 --- a/_proto/README.md +++ b/_proto/README.md @@ -7,4 +7,4 @@ Packages - `hapi.release` Information about installed charts (Releases) such as metadata about when they were installed, their status, and how they were configured. - `hapi.services.rudder` Definition for the ReleaseModuleService used by Tiller to manipulate releases on a given node - `hapi.services.tiller` Definition of the ReleaseService provided by Tiller and used by Helm clients to manipulate releases cluster wide. - - `hapi.version` Version meta-data used by tiller to express it's version + - `hapi.version` Version metadata used by Tiller to express its version From a602d70842e63f761e13777095b89edb163367e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Lafarge?= Date: Wed, 27 Feb 2019 14:30:12 +0100 Subject: [PATCH 26/56] [storage] Add an SQL storage driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commits adds the possibility to back Tiller (or the future Tiller-less Helm CLI) with any SQL database (only postgres has been tested so far) to store release information. The main motivation for this commit was to use a storage backend that would allow releases larger that 1MB in size (ConfigMap or Secret drivers don't, because of limits on value size in the underlying etcd key-value store). Signed-off-by: Étienne Lafarge Co-authored-by: Elliot Maincourt (@emaincourt) Co-authored-by: Paul Borensztein (@commit-master) --- cmd/tiller/tiller.go | 40 +++- docs/install.md | 34 +++- docs/sql-storage.md | 89 +++++++++ glide.lock | 16 ++ glide.yaml | 19 +- pkg/storage/driver/mock_test.go | 16 ++ pkg/storage/driver/sql.go | 322 ++++++++++++++++++++++++++++++ pkg/storage/driver/sql_test.go | 344 ++++++++++++++++++++++++++++++++ 8 files changed, 858 insertions(+), 22 deletions(-) create mode 100644 docs/sql-storage.md create mode 100644 pkg/storage/driver/sql.go create mode 100644 pkg/storage/driver/sql_test.go diff --git a/cmd/tiller/tiller.go b/cmd/tiller/tiller.go index ba26cc238..a2ef2764b 100644 --- a/cmd/tiller/tiller.go +++ b/cmd/tiller/tiller.go @@ -66,6 +66,7 @@ const ( storageMemory = "memory" storageConfigMap = "configmap" storageSecret = "secret" + storageSQL = "sql" traceAddr = ":44136" @@ -74,18 +75,23 @@ const ( ) var ( - grpcAddr = flag.String("listen", fmt.Sprintf(":%v", environment.DefaultTillerPort), "address:port to listen on") - probeAddr = flag.String("probe-listen", fmt.Sprintf(":%v", environment.DefaultTillerProbePort), "address:port to listen on for probes") - enableTracing = flag.Bool("trace", false, "enable rpc tracing") - store = flag.String("storage", storageConfigMap, "storage driver to use. One of 'configmap', 'memory', or 'secret'") + grpcAddr = flag.String("listen", fmt.Sprintf(":%v", environment.DefaultTillerPort), "address:port to listen on") + probeAddr = flag.String("probe-listen", fmt.Sprintf(":%v", environment.DefaultTillerProbePort), "address:port to listen on for probes") + enableTracing = flag.Bool("trace", false, "enable rpc tracing") + store = flag.String("storage", storageConfigMap, "storage driver to use. One of 'configmap', 'memory', 'sql' or 'secret'") + + sqlDialect = flag.String("sql-dialect", "postgres", "SQL dialect to use (only postgres is supported for now") + sqlConnectionString = flag.String("sql-connection-string", "", "SQL connection string to use") + remoteReleaseModules = flag.Bool("experimental-release", false, "enable experimental release modules") - tlsEnable = flag.Bool("tls", tlsEnableEnvVarDefault(), "enable TLS") - tlsVerify = flag.Bool("tls-verify", tlsVerifyEnvVarDefault(), "enable TLS and verify remote certificate") - keyFile = flag.String("tls-key", tlsDefaultsFromEnv("tls-key"), "path to TLS private key file") - certFile = flag.String("tls-cert", tlsDefaultsFromEnv("tls-cert"), "path to TLS certificate file") - caCertFile = flag.String("tls-ca-cert", tlsDefaultsFromEnv("tls-ca-cert"), "trust certificates signed by this CA") - maxHistory = flag.Int("history-max", historyMaxFromEnv(), "maximum number of releases kept in release history, with 0 meaning no limit") - printVersion = flag.Bool("version", false, "print the version number") + + tlsEnable = flag.Bool("tls", tlsEnableEnvVarDefault(), "enable TLS") + tlsVerify = flag.Bool("tls-verify", tlsVerifyEnvVarDefault(), "enable TLS and verify remote certificate") + keyFile = flag.String("tls-key", tlsDefaultsFromEnv("tls-key"), "path to TLS private key file") + certFile = flag.String("tls-cert", tlsDefaultsFromEnv("tls-cert"), "path to TLS certificate file") + caCertFile = flag.String("tls-ca-cert", tlsDefaultsFromEnv("tls-ca-cert"), "trust certificates signed by this CA") + maxHistory = flag.Int("history-max", historyMaxFromEnv(), "maximum number of releases kept in release history, with 0 meaning no limit") + printVersion = flag.Bool("version", false, "print the version number") // rootServer is the root gRPC server. // @@ -143,6 +149,18 @@ func start() { env.Releases = storage.Init(secrets) env.Releases.Log = newLogger("storage").Printf + case storageSQL: + sqlDriver, err := driver.NewSQL( + *sqlDialect, + *sqlConnectionString, + newLogger("storage/driver").Printf, + ) + if err != nil { + logger.Fatalf("Cannot initialize SQL storage driver: %v", err) + } + + env.Releases = storage.Init(sqlDriver) + env.Releases.Log = newLogger("storage").Printf } if *maxHistory > 0 { diff --git a/docs/install.md b/docs/install.md index ab8268bcd..9a3bc33f0 100755 --- a/docs/install.md +++ b/docs/install.md @@ -353,10 +353,13 @@ in JSON format. ### Storage backends By default, `tiller` stores release information in `ConfigMaps` in the namespace -where it is running. As of Helm 2.7.0, there is now a beta storage backend that +where it is running. + +#### Secret storage backend +As of Helm 2.7.0, there is now a beta storage backend that uses `Secrets` for storing release information. This was added for additional -security in protecting charts in conjunction with the release of `Secret` -encryption in Kubernetes. +security in protecting charts in conjunction with the release of `Secret` +encryption in Kubernetes. To enable the secrets backend, you'll need to init Tiller with the following options: @@ -369,6 +372,31 @@ Currently, if you want to switch from the default backend to the secrets backend, you'll have to do the migration for this on your own. When this backend graduates from beta, there will be a more official path of migration +#### SQL storage backend +As of Helm 2.14.0 there is now a beta SQL storage backend that stores release +information in an SQL database (only postgres has been tested so far). + +Using such a storage backend is particularly useful if your release information +weighs more than 1MB (in which case, it can't be stored in ConfigMaps/Secrets +because of internal limits in Kubernetes' underlying etcd key-value store). + +To enable the SQL backend, you'll need to [deploy an SQL +database](./sql-storage.md) and init Tiller with the following options: + +```shell +helm init \ + --override \ + 'spec.template.spec.containers[0].args'='{--storage=sql,--sql-dialect=postgres,--sql-connection-string=postgresql://tiller-postgres:5432/helm?user=helm&password=changemeforgodssake&sslmode=disable}' +``` + +**PRODUCTION NOTES**: it's recommended to change the username and password of +the SQL database in production deployments. Enabling SSL is also a good idea. +Last, but not least, perform regular backups/snapshots of your SQL database. + +Currently, if you want to switch from the default backend to the SQL backend, +you'll have to do the migration for this on your own. When this backend +graduates from beta, there will be a more official migration path. + ## Conclusion In most cases, installation is as simple as getting a pre-built `helm` binary diff --git a/docs/sql-storage.md b/docs/sql-storage.md new file mode 100644 index 000000000..19f7a5eb1 --- /dev/null +++ b/docs/sql-storage.md @@ -0,0 +1,89 @@ +# Store release information in an SQL database + +You may be willing to store release information in an SQL database - in +particular, if your releases weigh more than 1MB and therefore [can't be stored in ConfigMaps or Secrets](https://github.com/helm/helm/issues/1413). + +We recommend using [PostgreSQL](https://www.postgresql.org/). + +This document describes how to deploy `postgres` atop Kubernetes. This being +said, using an out-of-cluster (managed or not) PostreSQL instance is totally +possible as well. + +Here's a Kubernetes manifest you can apply to get a minimal PostreSQL pod +running on your Kubernetes cluster. **Don't forget to change the credentials +and, optionally, enable TLS in production deployments**. + +```yaml +apiVersion: v1 +kind: Service +metadata: + name: tiller-postgres + namespace: kube-system +spec: + ports: + - port: 5432 + selector: + app: helm + name: postgres +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: tiller-postgres + namespace: kube-system +spec: + serviceName: tiller-postgres + selector: + matchLabels: + app: helm + name: postgres + replicas: 1 + template: + metadata: + labels: + app: helm + name: postgres + spec: + containers: + - name: postgres + image: postgres:11-alpine + imagePullPolicy: Always + ports: + - containerPort: 5432 + env: + - name: POSTGRES_DB + value: helm + - name: POSTGRES_USER + value: helm + - name: POSTGRES_PASSWORD + value: changemeforgodssake + - name: PGDATA + value: /var/lib/postgresql/data/pgdata + resources: + limits: + memory: 128Mi + requests: + cpu: 50m + memory: 128Mi + volumeMounts: + - mountPath: /var/lib/postgresql/data + name: tiller-postgres-data + volumeClaimTemplates: + - metadata: + name: tiller-postgres-data + spec: + accessModes: ["ReadWriteOnce"] + storageClassName: default + resources: + requests: + storage: 5Gi +``` + +Once postgres is deployed, you'll need to install Tiller using `helm init`, with +a few custom CLI flags: + +```shell +helm init \ + --override \ + 'spec.template.spec.containers[0].args'='{--storage=sql,--sql-dialect=postgres,--sql-connection-string=postgresql://tiller-postgres:5432/helm?user=helm&password=changemeforgodssake&sslmode=disable}' +``` diff --git a/glide.lock b/glide.lock index 5d4a6a9f8..1a1649e80 100644 --- a/glide.lock +++ b/glide.lock @@ -173,10 +173,18 @@ imports: version: 9316a62528ac99aaecb4e47eadd6dc8aa6533d58 - name: github.com/inconshreveable/mousetrap version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 +- name: github.com/jmoiron/sqlx + version: d161d7a76b5661016ad0b085869f77fd410f3e6a + subpackages: + - reflectx - name: github.com/json-iterator/go version: ab8a2e0c74be9d3be70b3184d9acc634935ded82 - name: github.com/liggitt/tabwriter version: 89fcab3d43de07060e4fd4c1547430ed57e87f24 +- name: github.com/lib/pq + version: 88edab0803230a3898347e77b474f8c1820a1f20 + subpackages: + - oid - name: github.com/mailru/easyjson version: 2f5df55504ebc322e4d52d34df6a1f5b503bf26d subpackages: @@ -235,6 +243,10 @@ imports: version: 8a290539e2e8629dbc4e6bad948158f790ec31f4 - name: github.com/PuerkitoBio/urlesc version: 5bd2802263f21d8788851d5305584c82a5c75d7e +- name: github.com/rubenv/sql-migrate + version: 1007f53448d75fe14190968f5de4d95ed63ebb83 + subpackages: + - sqlparse - name: github.com/russross/blackfriday version: 300106c228d52c8941d4b3de6054a6062a86dda3 - name: github.com/shurcooL/sanitized_anchor_name @@ -366,6 +378,8 @@ imports: - stats - status - tap +- name: gopkg.in/gorp.v1 + version: 6a667da9c028871f98598d85413e3fc4c6daa52e - name: gopkg.in/inf.v0 version: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 - name: gopkg.in/square/go-jose.v2 @@ -807,6 +821,8 @@ imports: subpackages: - sortorder testImports: +- name: github.com/DATA-DOG/go-sqlmock + version: 472e287dbafe67e526a3797165b64cb14f34705a - name: github.com/pmezard/go-difflib version: 5d4384ee4fb2527b0a1256a821ebfc92f91efefc subpackages: diff --git a/glide.yaml b/glide.yaml index 19024aecf..5e6026077 100644 --- a/glide.yaml +++ b/glide.yaml @@ -2,11 +2,10 @@ package: k8s.io/helm import: - package: golang.org/x/net subpackages: - - context + - context - package: golang.org/x/sync subpackages: - semaphore - # This is temporary and can probably be removed the next time gRPC is updated - package: golang.org/x/sys version: b90733256f2e882e81d52f9126de08df5615afd9 subpackages: @@ -17,7 +16,6 @@ import: - package: github.com/spf13/pflag version: ~1.0.1 - package: github.com/Masterminds/vcs - # Pin version of mergo that is compatible with both sprig and Kubernetes - package: github.com/imdario/mergo version: v0.3.5 - package: github.com/Masterminds/sprig @@ -30,9 +28,9 @@ import: - package: github.com/golang/protobuf version: 1.2.0 subpackages: - - proto - - ptypes/any - - ptypes/timestamp + - proto + - ptypes/any + - ptypes/timestamp - package: google.golang.org/grpc version: 1.18.0 - package: github.com/gosuri/uitable @@ -40,8 +38,8 @@ import: version: ^4.0.0 - package: golang.org/x/crypto subpackages: - - openpgp - - ssh/terminal + - openpgp + - ssh/terminal - package: github.com/gobwas/glob version: ^0.2.1 - package: github.com/evanphx/json-patch @@ -66,9 +64,14 @@ import: version: kubernetes-1.14.1 - package: github.com/cyphar/filepath-securejoin version: ^0.2.1 + - package: github.com/jmoiron/sqlx + version: ^1.2.0 + - package: github.com/rubenv/sql-migrate testImports: - package: github.com/stretchr/testify version: ^1.1.4 subpackages: - assert + - package: github.com/DATA-DOG/go-sqlmock + version: ^1.3.2 diff --git a/pkg/storage/driver/mock_test.go b/pkg/storage/driver/mock_test.go index 363d9dd5d..d012aaafe 100644 --- a/pkg/storage/driver/mock_test.go +++ b/pkg/storage/driver/mock_test.go @@ -20,6 +20,8 @@ import ( "fmt" "testing" + sqlmock "github.com/DATA-DOG/go-sqlmock" + "github.com/jmoiron/sqlx" "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -221,3 +223,17 @@ func (mock *MockSecretsInterface) Delete(name string, opts *metav1.DeleteOptions delete(mock.objects, name) return nil } + +// newTestFixtureSQL mocks the SQL database (for testing purposes) +func newTestFixtureSQL(t *testing.T, releases ...*rspb.Release) (*SQL, sqlmock.Sqlmock) { + sqlDB, mock, err := sqlmock.New() + if err != nil { + t.Fatalf("error when opening stub database connection: %v", err) + } + + sqlxDB := sqlx.NewDb(sqlDB, "sqlmock") + return &SQL{ + db: sqlxDB, + Log: func(_ string, _ ...interface{}) {}, + }, mock +} diff --git a/pkg/storage/driver/sql.go b/pkg/storage/driver/sql.go new file mode 100644 index 000000000..3b3438577 --- /dev/null +++ b/pkg/storage/driver/sql.go @@ -0,0 +1,322 @@ +/* +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. +*/ + +package driver + +import ( + "fmt" + "sort" + "strings" + "time" + + "github.com/jmoiron/sqlx" + migrate "github.com/rubenv/sql-migrate" + + // Import pq for potgres dialect + _ "github.com/lib/pq" + + rspb "k8s.io/helm/pkg/proto/hapi/release" + storageerrors "k8s.io/helm/pkg/storage/errors" +) + +var _ Driver = (*SQL)(nil) + +var labelMap = map[string]string{ + "MODIFIED_AT": "modified_at", + "CREATED_AT": "created_at", + "VERSION": "version", + "STATUS": "status", + "OWNER": "owner", + "NAME": "name", +} + +// SQLDriverName is the string name of this driver. +const SQLDriverName = "SQL" + +// SQL is the sql storage driver implementation. +type SQL struct { + db *sqlx.DB + Log func(string, ...interface{}) +} + +// Name returns the name of the driver. +func (s *SQL) Name() string { + return SQLDriverName +} + +func (s *SQL) ensureDBSetup() error { + // Populate the database with the relations we need if they don't exist yet + migrations := &migrate.MemoryMigrationSource{ + Migrations: []*migrate.Migration{ + { + Id: "init", + Up: []string{ + ` + CREATE TABLE releases ( + key VARCHAR(67) PRIMARY KEY, + body TEXT NOT NULL, + + name VARCHAR(64) NOT NULL, + version INTEGER NOT NULL, + status TEXT NOT NULL, + owner TEXT NOT NULL, + created_at INTEGER NOT NULL, + modified_at INTEGER NOT NULL DEFAULT 0 + ); + + CREATE INDEX ON releases (key); + CREATE INDEX ON releases (version); + CREATE INDEX ON releases (status); + CREATE INDEX ON releases (owner); + CREATE INDEX ON releases (created_at); + CREATE INDEX ON releases (modified_at); + `, + }, + Down: []string{ + ` + DROP TABLE releases; + `, + }, + }, + }, + } + + _, err := migrate.Exec(s.db.DB, "postgres", migrations, migrate.Up) + return err +} + +// Release describes a Helm release +type Release struct { + Key string `db:"key"` + Body string `db:"body"` + + Name string `db:"name"` + Version int `db:"version"` + Status string `db:"status"` + Owner string `db:"owner"` + CreatedAt int `db:"created_at"` + ModifiedAt int `db:"modified_at"` +} + +// NewSQL initializes a new memory driver. +func NewSQL(dialect, connectionString string, logger func(string, ...interface{})) (*SQL, error) { + db, err := sqlx.Connect(dialect, connectionString) + if err != nil { + return nil, err + } + + driver := &SQL{ + db: db, + Log: logger, + } + + if err := driver.ensureDBSetup(); err != nil { + return nil, err + } + + return driver, nil +} + +// Get returns the release named by key. +func (s *SQL) Get(key string) (*rspb.Release, error) { + var record Release + // Get will return an error if the result is empty + err := s.db.Get(&record, "SELECT body FROM releases WHERE key = $1", key) + if err != nil { + s.Log("got SQL error when getting release %s: %v", key, err) + return nil, storageerrors.ErrReleaseNotFound(key) + } + + release, err := decodeRelease(record.Body) + if err != nil { + s.Log("get: failed to decode data %q: %v", key, err) + return nil, err + } + + return release, nil +} + +// List returns the list of all releases such that filter(release) == true +func (s *SQL) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error) { + var records = []Release{} + if err := s.db.Select(&records, "SELECT body FROM releases WHERE owner = 'TILLER'"); err != nil { + s.Log("list: failed to list: %v", err) + return nil, err + } + + var releases []*rspb.Release + for _, record := range records { + release, err := decodeRelease(record.Body) + if err != nil { + s.Log("list: failed to decode release: %v: %v", record, err) + continue + } + if filter(release) { + releases = append(releases, release) + } + } + + return releases, nil +} + +// Query returns the set of releases that match the provided set of labels. +func (s *SQL) Query(labels map[string]string) ([]*rspb.Release, error) { + var sqlFilterKeys []string + sqlFilter := map[string]interface{}{} + for key, val := range labels { + // Build a slice of where filters e.g + // labels = map[string]string{ "foo": "foo", "bar": "bar" } + // []string{ "foo=?", "bar=?" } + if dbField, ok := labelMap[key]; ok { + sqlFilterKeys = append(sqlFilterKeys, strings.Join([]string{dbField, "=:", dbField}, "")) + sqlFilter[dbField] = val + } else { + s.Log("unknown label %s", key) + return nil, fmt.Errorf("unknow label %s", key) + } + } + sort.Strings(sqlFilterKeys) + + // Build our query + query := strings.Join([]string{ + "SELECT body FROM releases", + "WHERE", + strings.Join(sqlFilterKeys, " AND "), + }, " ") + + rows, err := s.db.NamedQuery(query, sqlFilter) + if err != nil { + s.Log("failed to query with labels: %v", err) + return nil, err + } + + var releases []*rspb.Release + for rows.Next() { + var record Release + if err = rows.StructScan(&record); err != nil { + s.Log("failed to scan record %q: %v", record, err) + return nil, err + } + + release, err := decodeRelease(record.Body) + if err != nil { + s.Log("failed to decode release: %v", err) + continue + } + releases = append(releases, release) + } + + if len(releases) == 0 { + return nil, storageerrors.ErrReleaseNotFound(labels["NAME"]) + } + + return releases, nil +} + +// Create creates a new release. +func (s *SQL) Create(key string, rls *rspb.Release) error { + body, err := encodeRelease(rls) + if err != nil { + s.Log("failed to encode release: %v", err) + return err + } + + transaction, err := s.db.Beginx() + if err != nil { + s.Log("failed to start SQL transaction: %v", err) + return fmt.Errorf("error beginning transaction: %v", err) + } + + if _, err := transaction.NamedExec("INSERT INTO releases (key, body, name, version, status, owner, created_at) VALUES (:key, :body, :name, :version, :status, :owner, :created_at)", + &Release{ + Key: key, + Body: body, + + Name: rls.Name, + Version: int(rls.Version), + Status: rspb.Status_Code_name[int32(rls.Info.Status.Code)], + Owner: "TILLER", + CreatedAt: int(time.Now().Unix()), + }, + ); err != nil { + defer transaction.Rollback() + var record Release + if err := transaction.Get(&record, "SELECT key FROM releases WHERE key = ?", key); err == nil { + s.Log("release %s already exists", key) + return storageerrors.ErrReleaseExists(key) + } + + s.Log("failed to store release %s in SQL database: %v", key, err) + return err + } + defer transaction.Commit() + + return nil +} + +// Update updates a release. +func (s *SQL) Update(key string, rls *rspb.Release) error { + body, err := encodeRelease(rls) + if err != nil { + s.Log("failed to encode release: %v", err) + return err + } + + if _, err := s.db.NamedExec("UPDATE releases SET body=:body, name=:name, version=:version, status=:status, owner=:owner, modified_at=:modified_at WHERE key=:key", + &Release{ + Key: key, + Body: body, + + Name: rls.Name, + Version: int(rls.Version), + Status: rspb.Status_Code_name[int32(rls.Info.Status.Code)], + Owner: "TILLER", + ModifiedAt: int(time.Now().Unix()), + }, + ); err != nil { + s.Log("failed to update release %s in SQL database: %v", key, err) + return err + } + + return nil +} + +// Delete deletes a release or returns ErrReleaseNotFound. +func (s *SQL) Delete(key string) (*rspb.Release, error) { + transaction, err := s.db.Beginx() + if err != nil { + s.Log("failed to start SQL transaction: %v", err) + return nil, fmt.Errorf("error beginning transaction: %v", err) + } + + var record Release + err = transaction.Get(&record, "SELECT body FROM releases WHERE key = $1", key) + if err != nil { + s.Log("release %s not found: %v", key, err) + return nil, storageerrors.ErrReleaseNotFound(key) + } + + release, err := decodeRelease(record.Body) + if err != nil { + s.Log("failed to decode release %s: %v", key, err) + transaction.Rollback() + return nil, err + } + defer transaction.Commit() + + _, err = transaction.Exec("DELETE FROM releases WHERE key = $1", key) + return release, err +} diff --git a/pkg/storage/driver/sql_test.go b/pkg/storage/driver/sql_test.go new file mode 100644 index 000000000..4d669c1b5 --- /dev/null +++ b/pkg/storage/driver/sql_test.go @@ -0,0 +1,344 @@ +/* +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. +*/ + +package driver + +import ( + "fmt" + "reflect" + "regexp" + "testing" + "time" + + sqlmock "github.com/DATA-DOG/go-sqlmock" + rspb "k8s.io/helm/pkg/proto/hapi/release" +) + +func TestSQLName(t *testing.T) { + sqlDriver, _ := newTestFixtureSQL(t) + if sqlDriver.Name() != SQLDriverName { + t.Errorf("Expected name to be %q, got %q", SQLDriverName, sqlDriver.Name()) + } +} + +func TestSQLGet(t *testing.T) { + vers := int32(1) + name := "smug-pigeon" + namespace := "default" + key := testKey(name, vers) + rel := releaseStub(name, vers, namespace, rspb.Status_DEPLOYED) + + body, _ := encodeRelease(rel) + + sqlDriver, mock := newTestFixtureSQL(t) + mock. + ExpectQuery("SELECT body FROM releases WHERE key = ?"). + WithArgs(key). + WillReturnRows( + mock.NewRows([]string{ + "body", + }).AddRow( + body, + ), + ).RowsWillBeClosed() + + got, err := sqlDriver.Get(key) + if err != nil { + t.Fatalf("Failed to get release: %v", err) + } + + if !reflect.DeepEqual(rel, got) { + t.Errorf("Expected release {%q}, got {%q}", rel, got) + } + + if err := mock.ExpectationsWereMet(); err != nil { + t.Errorf("sql expectations weren't met: %v", err) + } +} + +func TestSQLList(t *testing.T) { + body1, _ := encodeRelease(releaseStub("key-1", 1, "default", rspb.Status_DELETED)) + body2, _ := encodeRelease(releaseStub("key-2", 1, "default", rspb.Status_DELETED)) + body3, _ := encodeRelease(releaseStub("key-3", 1, "default", rspb.Status_DEPLOYED)) + body4, _ := encodeRelease(releaseStub("key-4", 1, "default", rspb.Status_DEPLOYED)) + body5, _ := encodeRelease(releaseStub("key-5", 1, "default", rspb.Status_SUPERSEDED)) + body6, _ := encodeRelease(releaseStub("key-6", 1, "default", rspb.Status_SUPERSEDED)) + + sqlDriver, mock := newTestFixtureSQL(t) + + for i := 0; i < 3; i++ { + mock. + ExpectQuery("SELECT body FROM releases WHERE owner = 'TILLER'"). + WillReturnRows( + mock.NewRows([]string{ + "body", + }). + AddRow(body1). + AddRow(body2). + AddRow(body3). + AddRow(body4). + AddRow(body5). + AddRow(body6), + ).RowsWillBeClosed() + } + + // list all deleted releases + del, err := sqlDriver.List(func(rel *rspb.Release) bool { + return rel.Info.Status.Code == rspb.Status_DELETED + }) + // check + if err != nil { + t.Errorf("Failed to list deleted: %v", err) + } + if len(del) != 2 { + t.Errorf("Expected 2 deleted, got %d:\n%v\n", len(del), del) + } + + // list all deployed releases + dpl, err := sqlDriver.List(func(rel *rspb.Release) bool { + return rel.Info.Status.Code == rspb.Status_DEPLOYED + }) + // check + if err != nil { + t.Errorf("Failed to list deployed: %v", err) + } + if len(dpl) != 2 { + t.Errorf("Expected 2 deployed, got %d:\n%v\n", len(dpl), dpl) + } + + // list all superseded releases + ssd, err := sqlDriver.List(func(rel *rspb.Release) bool { + return rel.Info.Status.Code == rspb.Status_SUPERSEDED + }) + // check + if err != nil { + t.Errorf("Failed to list superseded: %v", err) + } + if len(ssd) != 2 { + t.Errorf("Expected 2 superseded, got %d:\n%v\n", len(ssd), ssd) + } + + if err := mock.ExpectationsWereMet(); err != nil { + t.Errorf("sql expectations weren't met: %v", err) + } +} + +func TestSqlCreate(t *testing.T) { + vers := int32(1) + name := "smug-pigeon" + namespace := "default" + key := testKey(name, vers) + rel := releaseStub(name, vers, namespace, rspb.Status_DEPLOYED) + + sqlDriver, mock := newTestFixtureSQL(t) + body, _ := encodeRelease(rel) + + mock.ExpectBegin() + mock. + ExpectExec(regexp.QuoteMeta("INSERT INTO releases (key, body, name, version, status, owner, created_at) VALUES (?, ?, ?, ?, ?, ?, ?)")). + WithArgs(key, body, rel.Name, int(rel.Version), rspb.Status_Code_name[int32(rel.Info.Status.Code)], "TILLER", int(time.Now().Unix())). + WillReturnResult(sqlmock.NewResult(1, 1)) + mock.ExpectCommit() + + if err := sqlDriver.Create(key, rel); err != nil { + t.Fatalf("failed to create release with key %q: %v", key, err) + } + + if err := mock.ExpectationsWereMet(); err != nil { + t.Errorf("sql expectations weren't met: %v", err) + } +} + +func TestSqlCreateAlreadyExists(t *testing.T) { + vers := int32(1) + name := "smug-pigeon" + namespace := "default" + key := testKey(name, vers) + rel := releaseStub(name, vers, namespace, rspb.Status_DEPLOYED) + + sqlDriver, mock := newTestFixtureSQL(t) + body, _ := encodeRelease(rel) + + // Insert fails (primary key already exists) + mock.ExpectBegin() + mock. + ExpectExec(regexp.QuoteMeta("INSERT INTO releases (key, body, name, version, status, owner, created_at) VALUES (?, ?, ?, ?, ?, ?, ?)")). + WithArgs(key, body, rel.Name, int(rel.Version), rspb.Status_Code_name[int32(rel.Info.Status.Code)], "TILLER", int(time.Now().Unix())). + WillReturnError(fmt.Errorf("dialect dependent SQL error")) + + // Let's check that we do make sure the error is due to a release already existing + mock. + ExpectQuery(regexp.QuoteMeta("SELECT key FROM releases WHERE key = ?")). + WithArgs(key). + WillReturnRows( + mock.NewRows([]string{ + "body", + }).AddRow( + body, + ), + ).RowsWillBeClosed() + mock.ExpectRollback() + + if err := sqlDriver.Create(key, rel); err == nil { + t.Fatalf("failed to create release with key %q: %v", key, err) + } + + if err := mock.ExpectationsWereMet(); err != nil { + t.Errorf("sql expectations weren't met: %v", err) + } +} + +func TestSqlUpdate(t *testing.T) { + vers := int32(1) + name := "smug-pigeon" + namespace := "default" + key := testKey(name, vers) + rel := releaseStub(name, vers, namespace, rspb.Status_DEPLOYED) + + sqlDriver, mock := newTestFixtureSQL(t) + body, _ := encodeRelease(rel) + + mock. + ExpectExec(regexp.QuoteMeta("UPDATE releases SET body=?, name=?, version=?, status=?, owner=?, modified_at=? WHERE key=?")). + WithArgs(body, rel.Name, int(rel.Version), rspb.Status_Code_name[int32(rel.Info.Status.Code)], "TILLER", int(time.Now().Unix()), key). + WillReturnResult(sqlmock.NewResult(0, 1)) + + if err := sqlDriver.Update(key, rel); err != nil { + t.Fatalf("failed to update release with key %q: %v", key, err) + } + + if err := mock.ExpectationsWereMet(); err != nil { + t.Errorf("sql expectations weren't met: %v", err) + } +} + +func TestSqlQuery(t *testing.T) { + // Reflect actual use cases in ../storage.go + labelSetDeployed := map[string]string{ + "NAME": "smug-pigeon", + "OWNER": "TILLER", + "STATUS": "DEPLOYED", + } + labelSetAll := map[string]string{ + "NAME": "smug-pigeon", + "OWNER": "TILLER", + } + + supersededRelease := releaseStub("smug-pigeon", 1, "default", rspb.Status_SUPERSEDED) + supersededReleaseBody, _ := encodeRelease(supersededRelease) + deployedRelease := releaseStub("smug-pigeon", 2, "default", rspb.Status_DEPLOYED) + deployedReleaseBody, _ := encodeRelease(deployedRelease) + + // Let's actually start our test + sqlDriver, mock := newTestFixtureSQL(t) + + mock. + ExpectQuery(regexp.QuoteMeta("SELECT body FROM releases WHERE name=? AND owner=? AND status=?")). + WithArgs("smug-pigeon", "TILLER", "DEPLOYED"). + WillReturnRows( + mock.NewRows([]string{ + "body", + }).AddRow( + deployedReleaseBody, + ), + ).RowsWillBeClosed() + + mock. + ExpectQuery(regexp.QuoteMeta("SELECT body FROM releases WHERE name=? AND owner=?")). + WithArgs("smug-pigeon", "TILLER"). + WillReturnRows( + mock.NewRows([]string{ + "body", + }).AddRow( + supersededReleaseBody, + ).AddRow( + deployedReleaseBody, + ), + ).RowsWillBeClosed() + + results, err := sqlDriver.Query(labelSetDeployed) + if err != nil { + t.Fatalf("failed to query for deployed smug-pigeon release: %v", err) + } + + for _, res := range results { + if !reflect.DeepEqual(res, deployedRelease) { + t.Errorf("Expected release {%q}, got {%q}", deployedRelease, res) + } + } + + results, err = sqlDriver.Query(labelSetAll) + if err != nil { + t.Fatalf("failed to query release history for smug-pigeon: %v", err) + } + + if len(results) != 2 { + t.Errorf("expected a resultset of size 2, got %d", len(results)) + } + + for _, res := range results { + if !reflect.DeepEqual(res, deployedRelease) && !reflect.DeepEqual(res, supersededRelease) { + t.Errorf("Expected release {%q} or {%q}, got {%q}", deployedRelease, supersededRelease, res) + } + } + + if err := mock.ExpectationsWereMet(); err != nil { + t.Errorf("sql expectations weren't met: %v", err) + } +} + +func TestSqlDelete(t *testing.T) { + vers := int32(1) + name := "smug-pigeon" + namespace := "default" + key := testKey(name, vers) + rel := releaseStub(name, vers, namespace, rspb.Status_DEPLOYED) + + body, _ := encodeRelease(rel) + + sqlDriver, mock := newTestFixtureSQL(t) + + mock.ExpectBegin() + mock. + ExpectQuery("SELECT body FROM releases WHERE key = ?"). + WithArgs(key). + WillReturnRows( + mock.NewRows([]string{ + "body", + }).AddRow( + body, + ), + ).RowsWillBeClosed() + + mock. + ExpectExec(regexp.QuoteMeta("DELETE FROM releases WHERE key = $1")). + WithArgs(key). + WillReturnResult(sqlmock.NewResult(0, 1)) + mock.ExpectCommit() + + deletedRelease, err := sqlDriver.Delete(key) + if err != nil { + t.Fatalf("failed to delete release with key %q: %v", key, err) + } + + if !reflect.DeepEqual(rel, deletedRelease) { + t.Errorf("Expected release {%q}, got {%q}", rel, deletedRelease) + } + + if err := mock.ExpectationsWereMet(); err != nil { + t.Errorf("sql expectations weren't met: %v", err) + } +} From 6c396880ade35ac6c47149bf2159e929de737423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Lafarge?= Date: Sat, 2 Mar 2019 11:56:40 +0100 Subject: [PATCH 27/56] [pr-review] Lighten docs & validate SQL dialect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Étienne Lafarge --- docs/install.md | 6 +-- docs/sql-storage.md | 89 --------------------------------------- pkg/storage/driver/sql.go | 8 ++++ 3 files changed, 11 insertions(+), 92 deletions(-) delete mode 100644 docs/sql-storage.md diff --git a/docs/install.md b/docs/install.md index 9a3bc33f0..db6539995 100755 --- a/docs/install.md +++ b/docs/install.md @@ -380,13 +380,13 @@ Using such a storage backend is particularly useful if your release information weighs more than 1MB (in which case, it can't be stored in ConfigMaps/Secrets because of internal limits in Kubernetes' underlying etcd key-value store). -To enable the SQL backend, you'll need to [deploy an SQL -database](./sql-storage.md) and init Tiller with the following options: +To enable the SQL backend, you'll need to deploy a SQL database and init Tiller +with the following options: ```shell helm init \ --override \ - 'spec.template.spec.containers[0].args'='{--storage=sql,--sql-dialect=postgres,--sql-connection-string=postgresql://tiller-postgres:5432/helm?user=helm&password=changemeforgodssake&sslmode=disable}' + 'spec.template.spec.containers[0].args'='{--storage=sql,--sql-dialect=postgres,--sql-connection-string=postgresql://tiller-postgres:5432/helm?user=helm&password=changeme}' ``` **PRODUCTION NOTES**: it's recommended to change the username and password of diff --git a/docs/sql-storage.md b/docs/sql-storage.md deleted file mode 100644 index 19f7a5eb1..000000000 --- a/docs/sql-storage.md +++ /dev/null @@ -1,89 +0,0 @@ -# Store release information in an SQL database - -You may be willing to store release information in an SQL database - in -particular, if your releases weigh more than 1MB and therefore [can't be stored in ConfigMaps or Secrets](https://github.com/helm/helm/issues/1413). - -We recommend using [PostgreSQL](https://www.postgresql.org/). - -This document describes how to deploy `postgres` atop Kubernetes. This being -said, using an out-of-cluster (managed or not) PostreSQL instance is totally -possible as well. - -Here's a Kubernetes manifest you can apply to get a minimal PostreSQL pod -running on your Kubernetes cluster. **Don't forget to change the credentials -and, optionally, enable TLS in production deployments**. - -```yaml -apiVersion: v1 -kind: Service -metadata: - name: tiller-postgres - namespace: kube-system -spec: - ports: - - port: 5432 - selector: - app: helm - name: postgres ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: tiller-postgres - namespace: kube-system -spec: - serviceName: tiller-postgres - selector: - matchLabels: - app: helm - name: postgres - replicas: 1 - template: - metadata: - labels: - app: helm - name: postgres - spec: - containers: - - name: postgres - image: postgres:11-alpine - imagePullPolicy: Always - ports: - - containerPort: 5432 - env: - - name: POSTGRES_DB - value: helm - - name: POSTGRES_USER - value: helm - - name: POSTGRES_PASSWORD - value: changemeforgodssake - - name: PGDATA - value: /var/lib/postgresql/data/pgdata - resources: - limits: - memory: 128Mi - requests: - cpu: 50m - memory: 128Mi - volumeMounts: - - mountPath: /var/lib/postgresql/data - name: tiller-postgres-data - volumeClaimTemplates: - - metadata: - name: tiller-postgres-data - spec: - accessModes: ["ReadWriteOnce"] - storageClassName: default - resources: - requests: - storage: 5Gi -``` - -Once postgres is deployed, you'll need to install Tiller using `helm init`, with -a few custom CLI flags: - -```shell -helm init \ - --override \ - 'spec.template.spec.containers[0].args'='{--storage=sql,--sql-dialect=postgres,--sql-connection-string=postgresql://tiller-postgres:5432/helm?user=helm&password=changemeforgodssake&sslmode=disable}' -``` diff --git a/pkg/storage/driver/sql.go b/pkg/storage/driver/sql.go index 3b3438577..7849f84b4 100644 --- a/pkg/storage/driver/sql.go +++ b/pkg/storage/driver/sql.go @@ -43,6 +43,10 @@ var labelMap = map[string]string{ "NAME": "name", } +var supportedSQLDialects = map[string]struct{}{ + "postgres": struct{}{}, +} + // SQLDriverName is the string name of this driver. const SQLDriverName = "SQL" @@ -113,6 +117,10 @@ type Release struct { // NewSQL initializes a new memory driver. func NewSQL(dialect, connectionString string, logger func(string, ...interface{})) (*SQL, error) { + if _, ok := supportedSQLDialects[dialect]; !ok { + return nil, fmt.Errorf("%s dialect isn't supported, only \"postgres\" is available for now", dialect) + } + db, err := sqlx.Connect(dialect, connectionString) if err != nil { return nil, err From 13e82d2039a9d69978fa80135e3c76ae734a821a Mon Sep 17 00:00:00 2001 From: Elliot Maincourt Date: Mon, 4 Mar 2019 18:14:41 +0100 Subject: [PATCH 28/56] Clarify our SQL Release binding struct naming and purpose Signed-off-by: Elliot Maincourt --- pkg/storage/driver/sql.go | 68 +++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/pkg/storage/driver/sql.go b/pkg/storage/driver/sql.go index 7849f84b4..d3d49ee22 100644 --- a/pkg/storage/driver/sql.go +++ b/pkg/storage/driver/sql.go @@ -69,30 +69,30 @@ func (s *SQL) ensureDBSetup() error { Id: "init", Up: []string{ ` - CREATE TABLE releases ( - key VARCHAR(67) PRIMARY KEY, - body TEXT NOT NULL, - - name VARCHAR(64) NOT NULL, - version INTEGER NOT NULL, - status TEXT NOT NULL, - owner TEXT NOT NULL, - created_at INTEGER NOT NULL, - modified_at INTEGER NOT NULL DEFAULT 0 - ); - - CREATE INDEX ON releases (key); - CREATE INDEX ON releases (version); - CREATE INDEX ON releases (status); - CREATE INDEX ON releases (owner); - CREATE INDEX ON releases (created_at); - CREATE INDEX ON releases (modified_at); - `, + CREATE TABLE releases ( + key VARCHAR(67) PRIMARY KEY, + body TEXT NOT NULL, + + name VARCHAR(64) NOT NULL, + version INTEGER NOT NULL, + status TEXT NOT NULL, + owner TEXT NOT NULL, + created_at INTEGER NOT NULL, + modified_at INTEGER NOT NULL DEFAULT 0 + ); + + CREATE INDEX ON releases (key); + CREATE INDEX ON releases (version); + CREATE INDEX ON releases (status); + CREATE INDEX ON releases (owner); + CREATE INDEX ON releases (created_at); + CREATE INDEX ON releases (modified_at); + `, }, Down: []string{ ` - DROP TABLE releases; - `, + DROP TABLE releases; + `, }, }, }, @@ -102,11 +102,17 @@ func (s *SQL) ensureDBSetup() error { return err } -// Release describes a Helm release -type Release struct { - Key string `db:"key"` +// SQLReleaseWrapper describes how Helm releases are stored in an SQL database +type SQLReleaseWrapper struct { + // The primary key, made of {release-name}.{release-version} + Key string `db:"key"` + + // The rspb.Release body, as a base64-encoded string Body string `db:"body"` + // Release "labels" that can be used as filters in the storage.Query(labels map[string]string) + // we implemented. Note that allowing Helm users to filter against new dimensions will require a + // new migration to be added, and the Create and/or update functions to be updated accordingly. Name string `db:"name"` Version int `db:"version"` Status string `db:"status"` @@ -140,7 +146,7 @@ func NewSQL(dialect, connectionString string, logger func(string, ...interface{} // Get returns the release named by key. func (s *SQL) Get(key string) (*rspb.Release, error) { - var record Release + var record SQLReleaseWrapper // Get will return an error if the result is empty err := s.db.Get(&record, "SELECT body FROM releases WHERE key = $1", key) if err != nil { @@ -159,7 +165,7 @@ func (s *SQL) Get(key string) (*rspb.Release, error) { // List returns the list of all releases such that filter(release) == true func (s *SQL) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error) { - var records = []Release{} + var records = []SQLReleaseWrapper{} if err := s.db.Select(&records, "SELECT body FROM releases WHERE owner = 'TILLER'"); err != nil { s.Log("list: failed to list: %v", err) return nil, err @@ -213,7 +219,7 @@ func (s *SQL) Query(labels map[string]string) ([]*rspb.Release, error) { var releases []*rspb.Release for rows.Next() { - var record Release + var record SQLReleaseWrapper if err = rows.StructScan(&record); err != nil { s.Log("failed to scan record %q: %v", record, err) return nil, err @@ -249,7 +255,7 @@ func (s *SQL) Create(key string, rls *rspb.Release) error { } if _, err := transaction.NamedExec("INSERT INTO releases (key, body, name, version, status, owner, created_at) VALUES (:key, :body, :name, :version, :status, :owner, :created_at)", - &Release{ + &SQLReleaseWrapper{ Key: key, Body: body, @@ -261,7 +267,7 @@ func (s *SQL) Create(key string, rls *rspb.Release) error { }, ); err != nil { defer transaction.Rollback() - var record Release + var record SQLReleaseWrapper if err := transaction.Get(&record, "SELECT key FROM releases WHERE key = ?", key); err == nil { s.Log("release %s already exists", key) return storageerrors.ErrReleaseExists(key) @@ -284,7 +290,7 @@ func (s *SQL) Update(key string, rls *rspb.Release) error { } if _, err := s.db.NamedExec("UPDATE releases SET body=:body, name=:name, version=:version, status=:status, owner=:owner, modified_at=:modified_at WHERE key=:key", - &Release{ + &SQLReleaseWrapper{ Key: key, Body: body, @@ -310,7 +316,7 @@ func (s *SQL) Delete(key string) (*rspb.Release, error) { return nil, fmt.Errorf("error beginning transaction: %v", err) } - var record Release + var record SQLReleaseWrapper err = transaction.Get(&record, "SELECT body FROM releases WHERE key = $1", key) if err != nil { s.Log("release %s not found: %v", key, err) From f4052821c9b89eac9412f1f77b0242879d0400d8 Mon Sep 17 00:00:00 2001 From: Elliot Maincourt Date: Tue, 5 Mar 2019 12:17:32 +0100 Subject: [PATCH 29/56] Fix formatting issue Signed-off-by: Elliot Maincourt --- pkg/storage/driver/sql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storage/driver/sql.go b/pkg/storage/driver/sql.go index d3d49ee22..46bcccc32 100644 --- a/pkg/storage/driver/sql.go +++ b/pkg/storage/driver/sql.go @@ -44,7 +44,7 @@ var labelMap = map[string]string{ } var supportedSQLDialects = map[string]struct{}{ - "postgres": struct{}{}, + "postgres": {}, } // SQLDriverName is the string name of this driver. From 8bc521fd545fc2d43742ba1e602e8ee9165517e2 Mon Sep 17 00:00:00 2001 From: Duffie Cooley Date: Fri, 19 Apr 2019 16:27:34 -0700 Subject: [PATCH 30/56] Updating to use git.io short url I've added an alias to git.io the github url shortening service from git.io/get_helm.sh -> https://raw.githubusercontent.com/helm/helm/master/scripts/get Like this: ``` $ curl -i https://git.io/ -F url=https://raw.githubusercontent.com/helm/helm/master/scripts/get -F code=get_helm.sh HTTP/1.1 201 Created Server: Cowboy Connection: keep-alive Date: Fri, 19 Apr 2019 23:20:39 GMT Status: 201 Created Content-Type: text/html;charset=utf-8 Location: https://git.io/get_helm.sh Content-Length: 62 X-Xss-Protection: 1; mode=block X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-Runtime: 0.008310 X-Node: f065811c-e0e8-4384-bf09-9d9d28586c4d X-Revision: 392798d237fc1aa5cd55cada10d2945773e741a8 Strict-Transport-Security: max-age=31536000; includeSubDomains Via: 1.1 vegur ``` I think it's a little easier to remember and use. There is also no way to overwrite or modify alias. Once it's there it's there in perpetuity. Thanks! Signed-off-by: Duffie Cooley --- docs/install.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/install.md b/docs/install.md index ab8268bcd..985189b85 100755 --- a/docs/install.md +++ b/docs/install.md @@ -63,18 +63,18 @@ scoop install helm ### From Script Helm now has an installer script that will automatically grab the latest version -of the Helm client and [install it locally](https://raw.githubusercontent.com/helm/helm/master/scripts/get). +of the Helm client and [install it locally](https://git.io/get_helm.sh). You can fetch that script, and then execute it locally. It's well documented so that you can read through it and understand what it is doing before you run it. ``` -$ curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > get_helm.sh +$ curl -LO https://git.io/get_helm.sh $ chmod 700 get_helm.sh $ ./get_helm.sh ``` -Yes, you can `curl https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash` that if you want to live on the edge. +Yes, you can `curl -L https://git.io/get_helm.sh | bash` that if you want to live on the edge. ### From Canary Builds From 792af434e6f71d70a752f2fbed9e4550b69eb937 Mon Sep 17 00:00:00 2001 From: Jintao Zhang Date: Tue, 23 Apr 2019 16:49:06 +0800 Subject: [PATCH 31/56] ref(rootfs): remove useless action. Signed-off-by: Jintao Zhang --- rootfs/Dockerfile | 5 ++--- rootfs/Dockerfile.experimental | 5 ++--- rootfs/Dockerfile.rudder | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/rootfs/Dockerfile b/rootfs/Dockerfile index f918c4d51..2aa775a55 100644 --- a/rootfs/Dockerfile +++ b/rootfs/Dockerfile @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.7 +FROM alpine:3.9 -RUN apk update && apk add ca-certificates socat && rm -rf /var/cache/apk/* +RUN apk add --no-cache ca-certificates socat ENV HOME /tmp @@ -24,4 +24,3 @@ COPY tiller /tiller EXPOSE 44134 USER 65534 ENTRYPOINT ["/tiller"] - diff --git a/rootfs/Dockerfile.experimental b/rootfs/Dockerfile.experimental index 61e49ab67..9c1cab126 100644 --- a/rootfs/Dockerfile.experimental +++ b/rootfs/Dockerfile.experimental @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.7 +FROM alpine:3.9 -RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* +RUN apk add --no-cache ca-certificates ENV HOME /tmp @@ -23,4 +23,3 @@ COPY tiller /tiller EXPOSE 44134 USER 65534 ENTRYPOINT ["/tiller", "--experimental-release"] - diff --git a/rootfs/Dockerfile.rudder b/rootfs/Dockerfile.rudder index 61afb8af8..87efba401 100644 --- a/rootfs/Dockerfile.rudder +++ b/rootfs/Dockerfile.rudder @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.3 +FROM alpine:3.9 -RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* +RUN apk add --no-cache ca-certificates ENV HOME /tmp From 77185d31a95e5e66bb65a082ab0ed5cbf27a6192 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Fri, 12 Apr 2019 11:52:32 +0100 Subject: [PATCH 32/56] Fix reset force which hangs Tiller pod removed Closes #5592 Signed-off-by: Martin Hickey --- cmd/helm/reset.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/helm/reset.go b/cmd/helm/reset.go index 887ce34d0..8093d3e69 100644 --- a/cmd/helm/reset.go +++ b/cmd/helm/reset.go @@ -21,6 +21,7 @@ import ( "fmt" "io" "os" + "strings" "github.com/spf13/cobra" @@ -59,7 +60,11 @@ func newResetCmd(client helm.Interface, out io.Writer) *cobra.Command { Short: "uninstalls Tiller from a cluster", Long: resetDesc, PreRunE: func(cmd *cobra.Command, args []string) error { - if err := setupConnection(); !d.force && err != nil { + err := setupConnection() + if !d.force && err != nil { + return err + } + if d.force && err != nil && strings.EqualFold(err.Error(), "could not find tiller") { return err } return nil From 0270f2e2b5d75439d8c835969ec8d8d80bb55bcf Mon Sep 17 00:00:00 2001 From: Luis Davim Date: Wed, 6 Mar 2019 12:45:57 +0000 Subject: [PATCH 33/56] Reduce template code duplication. Fixes #5372 Signed-off-by: Luis Davim --- .../testdata/testcharts/alpine/Chart.yaml | 1 + .../testdata/testcharts/novals/Chart.yaml | 1 + .../prerelease/templates/alpine-pod.yaml | 1 - docs/chart_template_guide/variables.md | 3 +- .../examples/alpine/templates/alpine-pod.yaml | 2 +- docs/examples/nginx/templates/configmap.yaml | 1 - docs/examples/nginx/templates/deployment.yaml | 1 - .../nginx/templates/post-install-job.yaml | 1 - .../nginx/templates/pre-install-secret.yaml | 1 - .../nginx/templates/service-test.yaml | 1 - docs/examples/nginx/templates/service.yaml | 1 - pkg/chartutil/create.go | 37 +++++++++---------- .../testdata/albatross/templates/svc.yaml | 1 - 13 files changed, 22 insertions(+), 30 deletions(-) diff --git a/cmd/helm/testdata/testcharts/alpine/Chart.yaml b/cmd/helm/testdata/testcharts/alpine/Chart.yaml index fea865aa5..feaa1d78f 100644 --- a/cmd/helm/testdata/testcharts/alpine/Chart.yaml +++ b/cmd/helm/testdata/testcharts/alpine/Chart.yaml @@ -1,3 +1,4 @@ +appVersion: "3.3" description: Deploy a basic Alpine Linux pod home: https://k8s.io/helm name: alpine diff --git a/cmd/helm/testdata/testcharts/novals/Chart.yaml b/cmd/helm/testdata/testcharts/novals/Chart.yaml index 85f7a5d83..a1b1a0d59 100644 --- a/cmd/helm/testdata/testcharts/novals/Chart.yaml +++ b/cmd/helm/testdata/testcharts/novals/Chart.yaml @@ -4,3 +4,4 @@ name: novals sources: - https://github.com/helm/helm version: 0.2.0 +appVersion: 3.3 diff --git a/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml b/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml index 564429dea..f569d556c 100644 --- a/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml +++ b/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml @@ -10,7 +10,6 @@ metadata: # The "release" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{.Release.Name | quote }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" annotations: diff --git a/docs/chart_template_guide/variables.md b/docs/chart_template_guide/variables.md index 984b9b4e5..65f754faf 100644 --- a/docs/chart_template_guide/variables.md +++ b/docs/chart_template_guide/variables.md @@ -114,7 +114,8 @@ metadata: # I cannot reference .Chart.Name, but I can do $.Chart.Name helm.sh/chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}" app.kubernetes.io/instance: "{{ $.Release.Name }}" - app.kubernetes.io/version: {{ .Chart.AppVersion }} + # Value from appVersion in Chart.yaml + app.kubernetes.io/version: "{{ $.Chart.AppVersion }}" app.kubernetes.io/managed-by: "{{ $.Release.Service }}" type: kubernetes.io/tls data: diff --git a/docs/examples/alpine/templates/alpine-pod.yaml b/docs/examples/alpine/templates/alpine-pod.yaml index 2b54811fd..0f48e4059 100644 --- a/docs/examples/alpine/templates/alpine-pod.yaml +++ b/docs/examples/alpine/templates/alpine-pod.yaml @@ -10,7 +10,7 @@ metadata: # The "app.kubernetes.io/instance" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{ .Release.Name | quote }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} # This makes it easy to audit chart usage. helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "alpine.name" . }} diff --git a/docs/examples/nginx/templates/configmap.yaml b/docs/examples/nginx/templates/configmap.yaml index d47992024..0141cbc69 100644 --- a/docs/examples/nginx/templates/configmap.yaml +++ b/docs/examples/nginx/templates/configmap.yaml @@ -6,7 +6,6 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} data: diff --git a/docs/examples/nginx/templates/deployment.yaml b/docs/examples/nginx/templates/deployment.yaml index cc4d4ea85..5bb30f9af 100644 --- a/docs/examples/nginx/templates/deployment.yaml +++ b/docs/examples/nginx/templates/deployment.yaml @@ -14,7 +14,6 @@ metadata: # to all of the Kubernetes resources that were created as part of that # release. app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} diff --git a/docs/examples/nginx/templates/post-install-job.yaml b/docs/examples/nginx/templates/post-install-job.yaml index 856782a4d..3562e6cf5 100644 --- a/docs/examples/nginx/templates/post-install-job.yaml +++ b/docs/examples/nginx/templates/post-install-job.yaml @@ -10,7 +10,6 @@ metadata: # The "app.kubernetes.io/instance" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} diff --git a/docs/examples/nginx/templates/pre-install-secret.yaml b/docs/examples/nginx/templates/pre-install-secret.yaml index 40451800d..07a9504b5 100644 --- a/docs/examples/nginx/templates/pre-install-secret.yaml +++ b/docs/examples/nginx/templates/pre-install-secret.yaml @@ -7,7 +7,6 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} # This declares the resource to be a hook. By convention, we also name the diff --git a/docs/examples/nginx/templates/service-test.yaml b/docs/examples/nginx/templates/service-test.yaml index 867f077ee..ffb37e9f4 100644 --- a/docs/examples/nginx/templates/service-test.yaml +++ b/docs/examples/nginx/templates/service-test.yaml @@ -5,7 +5,6 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} annotations: diff --git a/docs/examples/nginx/templates/service.yaml b/docs/examples/nginx/templates/service.yaml index e8eb8e51e..a12cb0982 100644 --- a/docs/examples/nginx/templates/service.yaml +++ b/docs/examples/nginx/templates/service.yaml @@ -10,7 +10,6 @@ metadata: helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} name: {{ template "nginx.fullname" . }} spec: # Provides options for the service so chart users have the full choice diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 415e6f97b..0d260627e 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -134,11 +134,7 @@ kind: Ingress metadata: name: {{ $fullName }} labels: - app.kubernetes.io/name: {{ include ".name" . }} - helm.sh/chart: {{ include ".chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include ".labels" . | indent 4 }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -174,11 +170,7 @@ kind: Deployment metadata: name: {{ include ".fullname" . }} labels: - app.kubernetes.io/name: {{ include ".name" . }} - helm.sh/chart: {{ include ".chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include ".labels" . | indent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: @@ -228,11 +220,7 @@ kind: Service metadata: name: {{ include ".fullname" . }} labels: - app.kubernetes.io/name: {{ include ".name" . }} - helm.sh/chart: {{ include ".chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include ".labels" . | indent 4 }} spec: type: {{ .Values.service.type }} ports: @@ -300,6 +288,19 @@ Create chart name and version as used by the chart label. {{- define ".chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} + +{{/* +Common labels +*/}} +{{- define ".labels" -}} +app.kubernetes.io/name: {{ include ".name" . }} +helm.sh/chart: {{ include ".chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Chart.AppVersion -}} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end -}} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} ` const defaultTestConnection = `apiVersion: v1 @@ -307,11 +308,7 @@ kind: Pod metadata: name: "{{ include ".fullname" . }}-test-connection" labels: - app.kubernetes.io/name: {{ include ".name" . }} - helm.sh/chart: {{ include ".chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include ".labels" . | indent 4 }} annotations: "helm.sh/hook": test-success spec: diff --git a/pkg/lint/rules/testdata/albatross/templates/svc.yaml b/pkg/lint/rules/testdata/albatross/templates/svc.yaml index a976b4fdd..aea11d833 100644 --- a/pkg/lint/rules/testdata/albatross/templates/svc.yaml +++ b/pkg/lint/rules/testdata/albatross/templates/svc.yaml @@ -7,7 +7,6 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service | quote }} app.kubernetes.io/instance: {{ .Release.Name | quote }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" kubeVersion: {{ .Capabilities.KubeVersion.Major }} tillerVersion: {{ .Capabilities.TillerVersion }} From d082754b1ad9b93349e572cb6cee1a0e95dc49e5 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Thu, 25 Apr 2019 15:29:09 +0100 Subject: [PATCH 34/56] Fix environment list in helm doc Closes #5344 Signed-off-by: Martin Hickey --- cmd/helm/helm.go | 26 +++++++++++++------------- docs/helm/helm.md | 28 ++++++++++++++-------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index b815568cb..d3337404a 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -61,19 +61,19 @@ Common actions from this point include: - helm list: list releases of charts Environment: - $HELM_HOME set an alternative location for Helm files. By default, these are stored in ~/.helm - $HELM_HOST set an alternative Tiller host. The format is host:port - $HELM_NO_PLUGINS disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. - $TILLER_NAMESPACE set an alternative Tiller namespace (default "kube-system") - $KUBECONFIG set an alternative Kubernetes configuration file (default "~/.kube/config") - $HELM_TLS_CA_CERT path to TLS CA certificate used to verify the Helm client and Tiller server certificates (default "$HELM_HOME/ca.pem") - $HELM_TLS_CERT path to TLS client certificate file for authenticating to Tiller (default "$HELM_HOME/cert.pem") - $HELM_TLS_KEY path to TLS client key file for authenticating to Tiller (default "$HELM_HOME/key.pem") - $HELM_TLS_ENABLE enable TLS connection between Helm and Tiller (default "false") - $HELM_TLS_VERIFY enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") - $HELM_TLS_HOSTNAME the hostname or IP address used to verify the Tiller server certificate (default "127.0.0.1") - $HELM_KEY_PASSPHRASE set HELM_KEY_PASSPHRASE to the passphrase of your PGP private key. If set, you will not be prompted for - the passphrase while signing helm charts + +- $HELM_HOME: set an alternative location for Helm files. By default, these are stored in ~/.helm +- $HELM_HOST: set an alternative Tiller host. The format is host:port +- $HELM_NO_PLUGINS: disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. +- $TILLER_NAMESPACE: set an alternative Tiller namespace (default "kube-system") +- $KUBECONFIG: set an alternative Kubernetes configuration file (default "~/.kube/config") +- $HELM_TLS_CA_CERT: path to TLS CA certificate used to verify the Helm client and Tiller server certificates (default "$HELM_HOME/ca.pem") +- $HELM_TLS_CERT: path to TLS client certificate file for authenticating to Tiller (default "$HELM_HOME/cert.pem") +- $HELM_TLS_KEY: path to TLS client key file for authenticating to Tiller (default "$HELM_HOME/key.pem") +- $HELM_TLS_ENABLE: enable TLS connection between Helm and Tiller (default "false") +- $HELM_TLS_VERIFY: enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") +- $HELM_TLS_HOSTNAME: the hostname or IP address used to verify the Tiller server certificate (default "127.0.0.1") +- $HELM_KEY_PASSPHRASE: set HELM_KEY_PASSPHRASE to the passphrase of your PGP private key. If set, you will not be prompted for the passphrase while signing helm charts ` diff --git a/docs/helm/helm.md b/docs/helm/helm.md index b00ae91d6..b57be9f9d 100644 --- a/docs/helm/helm.md +++ b/docs/helm/helm.md @@ -21,19 +21,19 @@ Common actions from this point include: - helm list: list releases of charts Environment: - $HELM_HOME set an alternative location for Helm files. By default, these are stored in ~/.helm - $HELM_HOST set an alternative Tiller host. The format is host:port - $HELM_NO_PLUGINS disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. - $TILLER_NAMESPACE set an alternative Tiller namespace (default "kube-system") - $KUBECONFIG set an alternative Kubernetes configuration file (default "~/.kube/config") - $HELM_TLS_CA_CERT path to TLS CA certificate used to verify the Helm client and Tiller server certificates (default "$HELM_HOME/ca.pem") - $HELM_TLS_CERT path to TLS client certificate file for authenticating to Tiller (default "$HELM_HOME/cert.pem") - $HELM_TLS_KEY path to TLS client key file for authenticating to Tiller (default "$HELM_HOME/key.pem") - $HELM_TLS_ENABLE enable TLS connection between Helm and Tiller (default "false") - $HELM_TLS_VERIFY enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") - $HELM_TLS_HOSTNAME the hostname or IP address used to verify the Tiller server certificate (default "127.0.0.1") - $HELM_KEY_PASSPHRASE set HELM_KEY_PASSPHRASE to the passphrase of your PGP private key. If set, you will not be prompted for - the passphrase while signing helm charts + +- $HELM_HOME: set an alternative location for Helm files. By default, these are stored in ~/.helm +- $HELM_HOST: set an alternative Tiller host. The format is host:port +- $HELM_NO_PLUGINS: disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. +- $TILLER_NAMESPACE: set an alternative Tiller namespace (default "kube-system") +- $KUBECONFIG: set an alternative Kubernetes configuration file (default "~/.kube/config") +- $HELM_TLS_CA_CERT: path to TLS CA certificate used to verify the Helm client and Tiller server certificates (default "$HELM_HOME/ca.pem") +- $HELM_TLS_CERT: path to TLS client certificate file for authenticating to Tiller (default "$HELM_HOME/cert.pem") +- $HELM_TLS_KEY: path to TLS client key file for authenticating to Tiller (default "$HELM_HOME/key.pem") +- $HELM_TLS_ENABLE: enable TLS connection between Helm and Tiller (default "false") +- $HELM_TLS_VERIFY: enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") +- $HELM_TLS_HOSTNAME: the hostname or IP address used to verify the Tiller server certificate (default "127.0.0.1") +- $HELM_KEY_PASSPHRASE: set HELM_KEY_PASSPHRASE to the passphrase of your PGP private key. If set, you will not be prompted for the passphrase while signing helm charts @@ -79,4 +79,4 @@ Environment: * [helm verify](helm_verify.md) - verify that a chart at the given path has been signed and is valid * [helm version](helm_version.md) - print the client/server version information -###### Auto generated by spf13/cobra on 4-Feb-2019 +###### Auto generated by spf13/cobra on 25-Apr-2019 From 5ba61df4c01f090e886619c7eba9fdd7c52680bb Mon Sep 17 00:00:00 2001 From: Patrick Carey Date: Mon, 29 Apr 2019 10:57:26 +0100 Subject: [PATCH 35/56] Update Masterminds/semver to allow >32bit version numbers Signed-off-by: Patrick Carey --- glide.lock | 8 ++++---- glide.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/glide.lock b/glide.lock index 5d4a6a9f8..5c5671268 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: d92d7faee5c7ecbb241dadcd993e5dd8dfba226739d20d97fabf23168613f3ac -updated: 2019-04-16T15:32:58.609105-07:00 +hash: 8a007d8993bdffd14a1a2d674848bd085a27b09d7f177fab1dc55783059c4dce +updated: 2019-04-29T12:23:33.902435+01:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -188,7 +188,7 @@ imports: - name: github.com/Masterminds/goutils version: 41ac8693c5c10a92ea1ff5ac3a7f95646f6123b0 - name: github.com/Masterminds/semver - version: 517734cc7d6470c0d07130e40fd40bdeb9bcd3fd + version: c7af12943936e8c39859482e61f0574c2fd7fc75 - name: github.com/Masterminds/sprig version: 9f8fceff796fb9f4e992cd2bece016be0121ab74 - name: github.com/Masterminds/vcs @@ -647,7 +647,7 @@ imports: - pkg/util/proto/testing - pkg/util/proto/validation - name: k8s.io/kubernetes - version: 3c949c7d419670cd99fe92f60e6f4d251898bdf2 + version: b8f2b772e38a15165a6247256d650e8b04178318 subpackages: - pkg/api/legacyscheme - pkg/api/service diff --git a/glide.yaml b/glide.yaml index 19024aecf..aeabbc724 100644 --- a/glide.yaml +++ b/glide.yaml @@ -24,7 +24,7 @@ import: version: ^2.19.0 - package: github.com/ghodss/yaml - package: github.com/Masterminds/semver - version: ~1.3.1 + version: ~1.4.2 - package: github.com/technosophos/moniker version: ~0.2 - package: github.com/golang/protobuf From 470d92e126968478d4e7a0d96207f102d174d545 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Tue, 30 Apr 2019 11:09:11 +0100 Subject: [PATCH 36/56] Fix scaffold chart label in helper template The 'app.kubernetes.io/version' label was not being rendered as expected. It was appending onto the label before it and also the next label label was appending onto it on the same line. Signed-off-by: Martin Hickey --- pkg/chartutil/create.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 8cb0493f3..f8e0356e4 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -301,9 +301,9 @@ Common labels app.kubernetes.io/name: {{ include ".name" . }} helm.sh/chart: {{ include ".chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} -{{- if .Chart.AppVersion -}} +{{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end -}} +{{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} ` From acb759c07911491f6860619ce3037cec03d275a7 Mon Sep 17 00:00:00 2001 From: Jeff Knurek Date: Thu, 21 Mar 2019 16:19:02 +0100 Subject: [PATCH 37/56] feat(helm) add 'get version' to get the chart version Signed-off-by: Jeff Knurek --- cmd/helm/get.go | 1 + cmd/helm/get_version.go | 75 ++++++++++++++++++++++++++++++++++++ cmd/helm/get_version_test.go | 47 ++++++++++++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 cmd/helm/get_version.go create mode 100644 cmd/helm/get_version_test.go diff --git a/cmd/helm/get.go b/cmd/helm/get.go index 20a4c042f..f9ed6fb91 100644 --- a/cmd/helm/get.go +++ b/cmd/helm/get.go @@ -78,6 +78,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command { cmd.AddCommand(newGetManifestCmd(nil, out)) cmd.AddCommand(newGetHooksCmd(nil, out)) cmd.AddCommand(newGetNotesCmd(nil, out)) + cmd.AddCommand(newGetVersionCmd(nil, out)) // set defaults from environment settings.InitTLS(f) diff --git a/cmd/helm/get_version.go b/cmd/helm/get_version.go new file mode 100644 index 000000000..c76c6245d --- /dev/null +++ b/cmd/helm/get_version.go @@ -0,0 +1,75 @@ +/* +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. +*/ + +package main + +import ( + "fmt" + "io" + + "github.com/spf13/cobra" + + "k8s.io/helm/pkg/helm" +) + +var getVersionHelp = "This command fetches the chart version for a given release." + +type getVersionCmd struct { + release string + out io.Writer + client helm.Interface + revision int32 +} + +func newGetVersionCmd(client helm.Interface, out io.Writer) *cobra.Command { + get := &getVersionCmd{ + out: out, + client: client, + } + cmd := &cobra.Command{ + Use: "version [flags] RELEASE_NAME", + Short: "download the chart version for a named release", + Long: getVersionHelp, + PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, + RunE: func(cmd *cobra.Command, args []string) error { + if len(args) == 0 { + return errReleaseRequired + } + get.release = args[0] + get.client = ensureHelmClient(get.client) + return get.run() + }, + } + + f := cmd.Flags() + settings.AddFlagsTLS(f) + f.Int32Var(&get.revision, "revision", 0, "get the named release with revision") + + // set defaults from environment + settings.InitTLS(f) + + return cmd +} + +// getVersion implements 'helm get version' +func (g *getVersionCmd) run() error { + res, err := g.client.ReleaseContent(g.release, helm.ContentReleaseVersion(g.revision)) + if err != nil { + return prettyError(err) + } + fmt.Fprintln(g.out, res.Release.Chart.Metadata.Version) + return nil +} diff --git a/cmd/helm/get_version_test.go b/cmd/helm/get_version_test.go new file mode 100644 index 000000000..81c9cdfd9 --- /dev/null +++ b/cmd/helm/get_version_test.go @@ -0,0 +1,47 @@ +/* +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. +*/ + +package main + +import ( + "io" + "testing" + + "github.com/spf13/cobra" + + "k8s.io/helm/pkg/helm" + "k8s.io/helm/pkg/proto/hapi/release" +) + +func TestGetVersion(t *testing.T) { + tests := []releaseCase{ + { + name: "get chart version of release", + args: []string{"kodiak"}, + expected: "0.1.0-beta.1", + resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "kodiak"}), + rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "kodiak"})}, + }, + { + name: "get version without args", + args: []string{}, + err: true, + }, + } + runReleaseCases(t, tests, func(c *helm.FakeClient, out io.Writer) *cobra.Command { + return newGetVersionCmd(c, out) + }) +} From 6c760297c04aa7eac6cb47829ac6fc7b01c4b3f9 Mon Sep 17 00:00:00 2001 From: Jeff Knurek Date: Thu, 21 Mar 2019 16:40:38 +0100 Subject: [PATCH 38/56] DOCS: ci failed and taught me how the docs get autogenerated Signed-off-by: Jeff Knurek --- docs/helm/helm_get.md | 3 ++- docs/helm/helm_get_version.md | 42 +++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 docs/helm/helm_get_version.md diff --git a/docs/helm/helm_get.md b/docs/helm/helm_get.md index 3b99c93d5..e113db53f 100644 --- a/docs/helm/helm_get.md +++ b/docs/helm/helm_get.md @@ -53,5 +53,6 @@ helm get [flags] RELEASE_NAME * [helm get manifest](helm_get_manifest.md) - download the manifest for a named release * [helm get notes](helm_get_notes.md) - displays the notes of the named release * [helm get values](helm_get_values.md) - download the values file for a named release +* [helm get version](helm_get_version.md) - download the chart version for a named release -###### Auto generated by spf13/cobra on 1-Sep-2018 +###### Auto generated by spf13/cobra on 21-Mar-2019 diff --git a/docs/helm/helm_get_version.md b/docs/helm/helm_get_version.md new file mode 100644 index 000000000..36695e464 --- /dev/null +++ b/docs/helm/helm_get_version.md @@ -0,0 +1,42 @@ +## helm get version + +download the chart version for a named release + +### Synopsis + +This command fetches the chart version for a given release. + +``` +helm get version [flags] RELEASE_NAME +``` + +### Options + +``` + -h, --help help for version + --revision int32 get the named release with revision + --tls enable TLS for request + --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string the server name used to verify the hostname on the returned certificates from the server + --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify enable TLS for request and verify remote +``` + +### Options inherited from parent commands + +``` + --debug enable verbose output + --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") + --host string address of Tiller. Overrides $HELM_HOST + --kube-context string name of the kubeconfig context to use + --kubeconfig string absolute path to the kubeconfig file to use + --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) + --tiller-namespace string namespace of Tiller (default "kube-system") +``` + +### SEE ALSO + +* [helm get](helm_get.md) - download a named release + +###### Auto generated by spf13/cobra on 21-Mar-2019 From 0a3ebb816b76ae2425ec2a8ceb242b0660db9c53 Mon Sep 17 00:00:00 2001 From: Jeff Knurek Date: Mon, 25 Mar 2019 14:21:55 +0100 Subject: [PATCH 39/56] feat(helm) add '--template' option to 'helm get' for custom formatting Signed-off-by: Jeff Knurek --- cmd/helm/get.go | 15 +++++--- cmd/helm/get_test.go | 7 ++++ cmd/helm/get_version.go | 75 ------------------------------------ cmd/helm/get_version_test.go | 47 ---------------------- cmd/helm/printer.go | 2 +- docs/helm/helm_get.md | 4 +- 6 files changed, 20 insertions(+), 130 deletions(-) delete mode 100644 cmd/helm/get_version.go delete mode 100644 cmd/helm/get_version_test.go diff --git a/cmd/helm/get.go b/cmd/helm/get.go index f9ed6fb91..6829122b7 100644 --- a/cmd/helm/get.go +++ b/cmd/helm/get.go @@ -41,10 +41,11 @@ chart, the supplied values, and the generated manifest file. var errReleaseRequired = errors.New("release name is required") type getCmd struct { - release string - out io.Writer - client helm.Interface - version int32 + release string + out io.Writer + client helm.Interface + version int32 + template string } func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command { @@ -73,12 +74,12 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) f.Int32Var(&get.version, "revision", 0, "get the named release with revision") + f.StringVar(&get.template, "template", "", "go template for formatting the output, eg: {{.Release.Name}}") cmd.AddCommand(newGetValuesCmd(nil, out)) cmd.AddCommand(newGetManifestCmd(nil, out)) cmd.AddCommand(newGetHooksCmd(nil, out)) cmd.AddCommand(newGetNotesCmd(nil, out)) - cmd.AddCommand(newGetVersionCmd(nil, out)) // set defaults from environment settings.InitTLS(f) @@ -92,5 +93,9 @@ func (g *getCmd) run() error { if err != nil { return prettyError(err) } + + if g.template != "" { + return tpl(g.template, res, g.out) + } return printRelease(g.out, res.Release) } diff --git a/cmd/helm/get_test.go b/cmd/helm/get_test.go index cb230a8a5..d83c85e1e 100644 --- a/cmd/helm/get_test.go +++ b/cmd/helm/get_test.go @@ -35,6 +35,13 @@ func TestGetCmd(t *testing.T) { expected: "REVISION: 1\nRELEASED: (.*)\nCHART: foo-0.1.0-beta.1\nUSER-SUPPLIED VALUES:\nname: \"value\"\nCOMPUTED VALUES:\nname: value\n\nHOOKS:\n---\n# pre-install-hook\n" + helm.MockHookTemplate + "\nMANIFEST:", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "thomas-guide"})}, }, + { + name: "get with a formatted release", + resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "elevated-turkey"}), + args: []string{"elevated-turkey", "--template", "{{.Release.Chart.Metadata.Version}}"}, + expected: "0.1.0-beta.1", + rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "elevated-turkey"})}, + }, { name: "get requires release name arg", err: true, diff --git a/cmd/helm/get_version.go b/cmd/helm/get_version.go deleted file mode 100644 index c76c6245d..000000000 --- a/cmd/helm/get_version.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -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. -*/ - -package main - -import ( - "fmt" - "io" - - "github.com/spf13/cobra" - - "k8s.io/helm/pkg/helm" -) - -var getVersionHelp = "This command fetches the chart version for a given release." - -type getVersionCmd struct { - release string - out io.Writer - client helm.Interface - revision int32 -} - -func newGetVersionCmd(client helm.Interface, out io.Writer) *cobra.Command { - get := &getVersionCmd{ - out: out, - client: client, - } - cmd := &cobra.Command{ - Use: "version [flags] RELEASE_NAME", - Short: "download the chart version for a named release", - Long: getVersionHelp, - PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, - RunE: func(cmd *cobra.Command, args []string) error { - if len(args) == 0 { - return errReleaseRequired - } - get.release = args[0] - get.client = ensureHelmClient(get.client) - return get.run() - }, - } - - f := cmd.Flags() - settings.AddFlagsTLS(f) - f.Int32Var(&get.revision, "revision", 0, "get the named release with revision") - - // set defaults from environment - settings.InitTLS(f) - - return cmd -} - -// getVersion implements 'helm get version' -func (g *getVersionCmd) run() error { - res, err := g.client.ReleaseContent(g.release, helm.ContentReleaseVersion(g.revision)) - if err != nil { - return prettyError(err) - } - fmt.Fprintln(g.out, res.Release.Chart.Metadata.Version) - return nil -} diff --git a/cmd/helm/get_version_test.go b/cmd/helm/get_version_test.go deleted file mode 100644 index 81c9cdfd9..000000000 --- a/cmd/helm/get_version_test.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -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. -*/ - -package main - -import ( - "io" - "testing" - - "github.com/spf13/cobra" - - "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/release" -) - -func TestGetVersion(t *testing.T) { - tests := []releaseCase{ - { - name: "get chart version of release", - args: []string{"kodiak"}, - expected: "0.1.0-beta.1", - resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "kodiak"}), - rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "kodiak"})}, - }, - { - name: "get version without args", - args: []string{}, - err: true, - }, - } - runReleaseCases(t, tests, func(c *helm.FakeClient, out io.Writer) *cobra.Command { - return newGetVersionCmd(c, out) - }) -} diff --git a/cmd/helm/printer.go b/cmd/helm/printer.go index e98b71c64..2f42bdab0 100644 --- a/cmd/helm/printer.go +++ b/cmd/helm/printer.go @@ -66,7 +66,7 @@ func printRelease(out io.Writer, rel *release.Release) error { return tpl(printReleaseTemplate, data, out) } -func tpl(t string, vals map[string]interface{}, out io.Writer) error { +func tpl(t string, vals interface{}, out io.Writer) error { tt, err := template.New("_").Parse(t) if err != nil { return err diff --git a/docs/helm/helm_get.md b/docs/helm/helm_get.md index e113db53f..3ce0ff191 100644 --- a/docs/helm/helm_get.md +++ b/docs/helm/helm_get.md @@ -26,6 +26,7 @@ helm get [flags] RELEASE_NAME ``` -h, --help help for get --revision int32 get the named release with revision + --template string go template for formatting the output, eg: {{.Release.Name}} --tls enable TLS for request --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") @@ -53,6 +54,5 @@ helm get [flags] RELEASE_NAME * [helm get manifest](helm_get_manifest.md) - download the manifest for a named release * [helm get notes](helm_get_notes.md) - displays the notes of the named release * [helm get values](helm_get_values.md) - download the values file for a named release -* [helm get version](helm_get_version.md) - download the chart version for a named release -###### Auto generated by spf13/cobra on 21-Mar-2019 +###### Auto generated by spf13/cobra on 25-Mar-2019 From 072cd6af37bb9856aaabebe02b7489cd18a80293 Mon Sep 17 00:00:00 2001 From: Morten Torkildsen Date: Thu, 2 May 2019 11:32:01 -0700 Subject: [PATCH 40/56] fix(helm): Regenerate go types from proto Signed-off-by: Morten Torkildsen --- cmd/helm/version.go | 2 +- pkg/proto/hapi/chart/chart.pb.go | 65 +- pkg/proto/hapi/chart/config.pb.go | 77 +- pkg/proto/hapi/chart/metadata.pb.go | 115 ++- pkg/proto/hapi/chart/template.pb.go | 44 +- pkg/proto/hapi/release/hook.pb.go | 81 ++- pkg/proto/hapi/release/info.pb.go | 58 +- pkg/proto/hapi/release/release.pb.go | 63 +- pkg/proto/hapi/release/status.pb.go | 52 +- pkg/proto/hapi/release/test_run.pb.go | 62 +- pkg/proto/hapi/release/test_suite.pb.go | 54 +- pkg/proto/hapi/rudder/rudder.pb.go | 530 ++++++++++---- pkg/proto/hapi/services/tiller.pb.go | 891 ++++++++++++++++++------ pkg/proto/hapi/version/version.pb.go | 49 +- pkg/storage/driver/cfgmaps_test.go | 7 +- pkg/storage/driver/mock_test.go | 10 + pkg/storage/driver/secrets_test.go | 7 +- pkg/version/version_test.go | 12 +- 18 files changed, 1599 insertions(+), 580 deletions(-) diff --git a/cmd/helm/version.go b/cmd/helm/version.go index a803a990b..a5360ea36 100644 --- a/cmd/helm/version.go +++ b/cmd/helm/version.go @@ -151,5 +151,5 @@ func formatVersion(v *pb.Version, short bool) string { if short && v.GitCommit != "" { return fmt.Sprintf("%s+g%s", v.SemVer, v.GitCommit[:7]) } - return fmt.Sprintf("%#v", v) + return fmt.Sprintf("&version.Version{SemVer:\"%s\", GitCommit:\"%s\", GitTreeState:\"%s\"}", v.SemVer, v.GitCommit, v.GitTreeState) } diff --git a/pkg/proto/hapi/chart/chart.pb.go b/pkg/proto/hapi/chart/chart.pb.go index a884ed552..f54c717fb 100644 --- a/pkg/proto/hapi/chart/chart.pb.go +++ b/pkg/proto/hapi/chart/chart.pb.go @@ -1,29 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: hapi/chart/chart.proto -/* -Package chart is a generated protocol buffer package. - -It is generated from these files: - hapi/chart/chart.proto - hapi/chart/config.proto - hapi/chart/metadata.proto - hapi/chart/template.proto - -It has these top-level messages: - Chart - Config - Value - Maintainer - Metadata - Template -*/ package chart import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/any" +import any "github.com/golang/protobuf/ptypes/any" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -40,22 +23,44 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // optionally parameterizable templates, and zero or more charts (dependencies). type Chart struct { // Contents of the Chartfile. - Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"` + Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` // Templates for this chart. - Templates []*Template `protobuf:"bytes,2,rep,name=templates" json:"templates,omitempty"` + Templates []*Template `protobuf:"bytes,2,rep,name=templates,proto3" json:"templates,omitempty"` // Charts that this chart depends on. - Dependencies []*Chart `protobuf:"bytes,3,rep,name=dependencies" json:"dependencies,omitempty"` + Dependencies []*Chart `protobuf:"bytes,3,rep,name=dependencies,proto3" json:"dependencies,omitempty"` // Default config for this template. - Values *Config `protobuf:"bytes,4,opt,name=values" json:"values,omitempty"` + Values *Config `protobuf:"bytes,4,opt,name=values,proto3" json:"values,omitempty"` // Miscellaneous files in a chart archive, // e.g. README, LICENSE, etc. - Files []*google_protobuf.Any `protobuf:"bytes,5,rep,name=files" json:"files,omitempty"` + Files []*any.Any `protobuf:"bytes,5,rep,name=files,proto3" json:"files,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Chart) Reset() { *m = Chart{} } +func (m *Chart) String() string { return proto.CompactTextString(m) } +func (*Chart) ProtoMessage() {} +func (*Chart) Descriptor() ([]byte, []int) { + return fileDescriptor_chart_829b474cf208a7f0, []int{0} +} +func (m *Chart) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Chart.Unmarshal(m, b) +} +func (m *Chart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Chart.Marshal(b, m, deterministic) +} +func (dst *Chart) XXX_Merge(src proto.Message) { + xxx_messageInfo_Chart.Merge(dst, src) +} +func (m *Chart) XXX_Size() int { + return xxx_messageInfo_Chart.Size(m) +} +func (m *Chart) XXX_DiscardUnknown() { + xxx_messageInfo_Chart.DiscardUnknown(m) } -func (m *Chart) Reset() { *m = Chart{} } -func (m *Chart) String() string { return proto.CompactTextString(m) } -func (*Chart) ProtoMessage() {} -func (*Chart) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +var xxx_messageInfo_Chart proto.InternalMessageInfo func (m *Chart) GetMetadata() *Metadata { if m != nil { @@ -85,7 +90,7 @@ func (m *Chart) GetValues() *Config { return nil } -func (m *Chart) GetFiles() []*google_protobuf.Any { +func (m *Chart) GetFiles() []*any.Any { if m != nil { return m.Files } @@ -96,9 +101,9 @@ func init() { proto.RegisterType((*Chart)(nil), "hapi.chart.Chart") } -func init() { proto.RegisterFile("hapi/chart/chart.proto", fileDescriptor0) } +func init() { proto.RegisterFile("hapi/chart/chart.proto", fileDescriptor_chart_829b474cf208a7f0) } -var fileDescriptor0 = []byte{ +var fileDescriptor_chart_829b474cf208a7f0 = []byte{ // 242 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xb1, 0x4e, 0xc3, 0x30, 0x10, 0x86, 0x15, 0x4a, 0x0a, 0x1c, 0x2c, 0x58, 0x08, 0x4c, 0xa7, 0x8a, 0x09, 0x75, 0x70, 0x50, diff --git a/pkg/proto/hapi/chart/config.pb.go b/pkg/proto/hapi/chart/config.pb.go index 30c652700..fce589b14 100644 --- a/pkg/proto/hapi/chart/config.pb.go +++ b/pkg/proto/hapi/chart/config.pb.go @@ -12,16 +12,44 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + // Config supplies values to the parametrizable templates of a chart. type Config struct { - Raw string `protobuf:"bytes,1,opt,name=raw" json:"raw,omitempty"` - Values map[string]*Value `protobuf:"bytes,2,rep,name=values" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Raw string `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"` + Values map[string]*Value `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Config) Reset() { *m = Config{} } +func (m *Config) String() string { return proto.CompactTextString(m) } +func (*Config) ProtoMessage() {} +func (*Config) Descriptor() ([]byte, []int) { + return fileDescriptor_config_332ead17c4feed84, []int{0} +} +func (m *Config) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Config.Unmarshal(m, b) +} +func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Config.Marshal(b, m, deterministic) +} +func (dst *Config) XXX_Merge(src proto.Message) { + xxx_messageInfo_Config.Merge(dst, src) +} +func (m *Config) XXX_Size() int { + return xxx_messageInfo_Config.Size(m) +} +func (m *Config) XXX_DiscardUnknown() { + xxx_messageInfo_Config.DiscardUnknown(m) } -func (m *Config) Reset() { *m = Config{} } -func (m *Config) String() string { return proto.CompactTextString(m) } -func (*Config) ProtoMessage() {} -func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } +var xxx_messageInfo_Config proto.InternalMessageInfo func (m *Config) GetRaw() string { if m != nil { @@ -39,13 +67,35 @@ func (m *Config) GetValues() map[string]*Value { // Value describes a configuration value as a string. type Value struct { - Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Value) Reset() { *m = Value{} } +func (m *Value) String() string { return proto.CompactTextString(m) } +func (*Value) ProtoMessage() {} +func (*Value) Descriptor() ([]byte, []int) { + return fileDescriptor_config_332ead17c4feed84, []int{1} +} +func (m *Value) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Value.Unmarshal(m, b) +} +func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Value.Marshal(b, m, deterministic) +} +func (dst *Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Value.Merge(dst, src) +} +func (m *Value) XXX_Size() int { + return xxx_messageInfo_Value.Size(m) +} +func (m *Value) XXX_DiscardUnknown() { + xxx_messageInfo_Value.DiscardUnknown(m) } -func (m *Value) Reset() { *m = Value{} } -func (m *Value) String() string { return proto.CompactTextString(m) } -func (*Value) ProtoMessage() {} -func (*Value) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } +var xxx_messageInfo_Value proto.InternalMessageInfo func (m *Value) GetValue() string { if m != nil { @@ -56,12 +106,13 @@ func (m *Value) GetValue() string { func init() { proto.RegisterType((*Config)(nil), "hapi.chart.Config") + proto.RegisterMapType((map[string]*Value)(nil), "hapi.chart.Config.ValuesEntry") proto.RegisterType((*Value)(nil), "hapi.chart.Value") } -func init() { proto.RegisterFile("hapi/chart/config.proto", fileDescriptor1) } +func init() { proto.RegisterFile("hapi/chart/config.proto", fileDescriptor_config_332ead17c4feed84) } -var fileDescriptor1 = []byte{ +var fileDescriptor_config_332ead17c4feed84 = []byte{ // 182 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0x48, 0x2c, 0xc8, 0xd4, 0x4f, 0xce, 0x48, 0x2c, 0x2a, 0xd1, 0x4f, 0xce, 0xcf, 0x4b, 0xcb, 0x4c, 0xd7, 0x2b, 0x28, diff --git a/pkg/proto/hapi/chart/metadata.pb.go b/pkg/proto/hapi/chart/metadata.pb.go index 9daeaa9e5..ebf59fd9f 100644 --- a/pkg/proto/hapi/chart/metadata.pb.go +++ b/pkg/proto/hapi/chart/metadata.pb.go @@ -12,6 +12,12 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + type Metadata_Engine int32 const ( @@ -31,22 +37,46 @@ var Metadata_Engine_value = map[string]int32{ func (x Metadata_Engine) String() string { return proto.EnumName(Metadata_Engine_name, int32(x)) } -func (Metadata_Engine) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{1, 0} } +func (Metadata_Engine) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_metadata_d6c714c73a051dcb, []int{1, 0} +} // Maintainer describes a Chart maintainer. type Maintainer struct { // Name is a user name or organization name - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Email is an optional email address to contact the named maintainer - Email string `protobuf:"bytes,2,opt,name=email" json:"email,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // Url is an optional URL to an address for the named maintainer - Url string `protobuf:"bytes,3,opt,name=url" json:"url,omitempty"` + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Maintainer) Reset() { *m = Maintainer{} } +func (m *Maintainer) String() string { return proto.CompactTextString(m) } +func (*Maintainer) ProtoMessage() {} +func (*Maintainer) Descriptor() ([]byte, []int) { + return fileDescriptor_metadata_d6c714c73a051dcb, []int{0} +} +func (m *Maintainer) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Maintainer.Unmarshal(m, b) +} +func (m *Maintainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Maintainer.Marshal(b, m, deterministic) +} +func (dst *Maintainer) XXX_Merge(src proto.Message) { + xxx_messageInfo_Maintainer.Merge(dst, src) +} +func (m *Maintainer) XXX_Size() int { + return xxx_messageInfo_Maintainer.Size(m) +} +func (m *Maintainer) XXX_DiscardUnknown() { + xxx_messageInfo_Maintainer.DiscardUnknown(m) } -func (m *Maintainer) Reset() { *m = Maintainer{} } -func (m *Maintainer) String() string { return proto.CompactTextString(m) } -func (*Maintainer) ProtoMessage() {} -func (*Maintainer) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } +var xxx_messageInfo_Maintainer proto.InternalMessageInfo func (m *Maintainer) GetName() string { if m != nil { @@ -74,47 +104,69 @@ func (m *Maintainer) GetUrl() string { // Spec: https://k8s.io/helm/blob/master/docs/design/chart_format.md#the-chart-file type Metadata struct { // The name of the chart - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The URL to a relevant project page, git repo, or contact person - Home string `protobuf:"bytes,2,opt,name=home" json:"home,omitempty"` + Home string `protobuf:"bytes,2,opt,name=home,proto3" json:"home,omitempty"` // Source is the URL to the source code of this chart - Sources []string `protobuf:"bytes,3,rep,name=sources" json:"sources,omitempty"` + Sources []string `protobuf:"bytes,3,rep,name=sources,proto3" json:"sources,omitempty"` // A SemVer 2 conformant version string of the chart - Version string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` // A one-sentence description of the chart - Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // A list of string keywords - Keywords []string `protobuf:"bytes,6,rep,name=keywords" json:"keywords,omitempty"` + Keywords []string `protobuf:"bytes,6,rep,name=keywords,proto3" json:"keywords,omitempty"` // A list of name and URL/email address combinations for the maintainer(s) - Maintainers []*Maintainer `protobuf:"bytes,7,rep,name=maintainers" json:"maintainers,omitempty"` + Maintainers []*Maintainer `protobuf:"bytes,7,rep,name=maintainers,proto3" json:"maintainers,omitempty"` // The name of the template engine to use. Defaults to 'gotpl'. - Engine string `protobuf:"bytes,8,opt,name=engine" json:"engine,omitempty"` + Engine string `protobuf:"bytes,8,opt,name=engine,proto3" json:"engine,omitempty"` // The URL to an icon file. - Icon string `protobuf:"bytes,9,opt,name=icon" json:"icon,omitempty"` + Icon string `protobuf:"bytes,9,opt,name=icon,proto3" json:"icon,omitempty"` // The API Version of this chart. - ApiVersion string `protobuf:"bytes,10,opt,name=apiVersion" json:"apiVersion,omitempty"` + ApiVersion string `protobuf:"bytes,10,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` // The condition to check to enable chart - Condition string `protobuf:"bytes,11,opt,name=condition" json:"condition,omitempty"` + Condition string `protobuf:"bytes,11,opt,name=condition,proto3" json:"condition,omitempty"` // The tags to check to enable chart - Tags string `protobuf:"bytes,12,opt,name=tags" json:"tags,omitempty"` + Tags string `protobuf:"bytes,12,opt,name=tags,proto3" json:"tags,omitempty"` // The version of the application enclosed inside of this chart. - AppVersion string `protobuf:"bytes,13,opt,name=appVersion" json:"appVersion,omitempty"` + AppVersion string `protobuf:"bytes,13,opt,name=appVersion,proto3" json:"appVersion,omitempty"` // Whether or not this chart is deprecated - Deprecated bool `protobuf:"varint,14,opt,name=deprecated" json:"deprecated,omitempty"` + Deprecated bool `protobuf:"varint,14,opt,name=deprecated,proto3" json:"deprecated,omitempty"` // TillerVersion is a SemVer constraints on what version of Tiller is required. // See SemVer ranges here: https://github.com/Masterminds/semver#basic-comparisons - TillerVersion string `protobuf:"bytes,15,opt,name=tillerVersion" json:"tillerVersion,omitempty"` + TillerVersion string `protobuf:"bytes,15,opt,name=tillerVersion,proto3" json:"tillerVersion,omitempty"` // Annotations are additional mappings uninterpreted by Tiller, // made available for inspection by other applications. - Annotations map[string]string `protobuf:"bytes,16,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Annotations map[string]string `protobuf:"bytes,16,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // KubeVersion is a SemVer constraint specifying the version of Kubernetes required. - KubeVersion string `protobuf:"bytes,17,opt,name=kubeVersion" json:"kubeVersion,omitempty"` + KubeVersion string `protobuf:"bytes,17,opt,name=kubeVersion,proto3" json:"kubeVersion,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Metadata) Reset() { *m = Metadata{} } +func (m *Metadata) String() string { return proto.CompactTextString(m) } +func (*Metadata) ProtoMessage() {} +func (*Metadata) Descriptor() ([]byte, []int) { + return fileDescriptor_metadata_d6c714c73a051dcb, []int{1} +} +func (m *Metadata) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Metadata.Unmarshal(m, b) +} +func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Metadata.Marshal(b, m, deterministic) +} +func (dst *Metadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metadata.Merge(dst, src) +} +func (m *Metadata) XXX_Size() int { + return xxx_messageInfo_Metadata.Size(m) +} +func (m *Metadata) XXX_DiscardUnknown() { + xxx_messageInfo_Metadata.DiscardUnknown(m) } -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } +var xxx_messageInfo_Metadata proto.InternalMessageInfo func (m *Metadata) GetName() string { if m != nil { @@ -238,12 +290,13 @@ func (m *Metadata) GetKubeVersion() string { func init() { proto.RegisterType((*Maintainer)(nil), "hapi.chart.Maintainer") proto.RegisterType((*Metadata)(nil), "hapi.chart.Metadata") + proto.RegisterMapType((map[string]string)(nil), "hapi.chart.Metadata.AnnotationsEntry") proto.RegisterEnum("hapi.chart.Metadata_Engine", Metadata_Engine_name, Metadata_Engine_value) } -func init() { proto.RegisterFile("hapi/chart/metadata.proto", fileDescriptor2) } +func init() { proto.RegisterFile("hapi/chart/metadata.proto", fileDescriptor_metadata_d6c714c73a051dcb) } -var fileDescriptor2 = []byte{ +var fileDescriptor_metadata_d6c714c73a051dcb = []byte{ // 435 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0x5d, 0x6b, 0xd4, 0x40, 0x14, 0x35, 0xcd, 0x66, 0x77, 0x73, 0x63, 0x35, 0x0e, 0x52, 0xc6, 0x22, 0x12, 0x16, 0x85, 0x7d, diff --git a/pkg/proto/hapi/chart/template.pb.go b/pkg/proto/hapi/chart/template.pb.go index 439aec5a8..4b77dddd0 100644 --- a/pkg/proto/hapi/chart/template.pb.go +++ b/pkg/proto/hapi/chart/template.pb.go @@ -12,21 +12,49 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + // Template represents a template as a name/value pair. // // By convention, name is a relative path within the scope of the chart's // base directory. type Template struct { // Name is the path-like name of the template. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Data is the template as byte data. - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Template) Reset() { *m = Template{} } +func (m *Template) String() string { return proto.CompactTextString(m) } +func (*Template) ProtoMessage() {} +func (*Template) Descriptor() ([]byte, []int) { + return fileDescriptor_template_051845a7e9227d35, []int{0} +} +func (m *Template) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Template.Unmarshal(m, b) +} +func (m *Template) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Template.Marshal(b, m, deterministic) +} +func (dst *Template) XXX_Merge(src proto.Message) { + xxx_messageInfo_Template.Merge(dst, src) +} +func (m *Template) XXX_Size() int { + return xxx_messageInfo_Template.Size(m) +} +func (m *Template) XXX_DiscardUnknown() { + xxx_messageInfo_Template.DiscardUnknown(m) } -func (m *Template) Reset() { *m = Template{} } -func (m *Template) String() string { return proto.CompactTextString(m) } -func (*Template) ProtoMessage() {} -func (*Template) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} } +var xxx_messageInfo_Template proto.InternalMessageInfo func (m *Template) GetName() string { if m != nil { @@ -46,9 +74,9 @@ func init() { proto.RegisterType((*Template)(nil), "hapi.chart.Template") } -func init() { proto.RegisterFile("hapi/chart/template.proto", fileDescriptor3) } +func init() { proto.RegisterFile("hapi/chart/template.proto", fileDescriptor_template_051845a7e9227d35) } -var fileDescriptor3 = []byte{ +var fileDescriptor_template_051845a7e9227d35 = []byte{ // 107 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0x48, 0x2c, 0xc8, 0xd4, 0x4f, 0xce, 0x48, 0x2c, 0x2a, 0xd1, 0x2f, 0x49, 0xcd, 0x2d, 0xc8, 0x49, 0x2c, 0x49, 0xd5, diff --git a/pkg/proto/hapi/release/hook.pb.go b/pkg/proto/hapi/release/hook.pb.go index 0a44165c8..bec2049b6 100644 --- a/pkg/proto/hapi/release/hook.pb.go +++ b/pkg/proto/hapi/release/hook.pb.go @@ -1,31 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: hapi/release/hook.proto -/* -Package release is a generated protocol buffer package. - -It is generated from these files: - hapi/release/hook.proto - hapi/release/info.proto - hapi/release/release.proto - hapi/release/status.proto - hapi/release/test_run.proto - hapi/release/test_suite.proto - -It has these top-level messages: - Hook - Info - Release - Status - TestRun - TestSuite -*/ package release import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -87,7 +68,9 @@ var Hook_Event_value = map[string]int32{ func (x Hook_Event) String() string { return proto.EnumName(Hook_Event_name, int32(x)) } -func (Hook_Event) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } +func (Hook_Event) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_hook_8076b1a80af16030, []int{0, 0} +} type Hook_DeletePolicy int32 @@ -111,31 +94,55 @@ var Hook_DeletePolicy_value = map[string]int32{ func (x Hook_DeletePolicy) String() string { return proto.EnumName(Hook_DeletePolicy_name, int32(x)) } -func (Hook_DeletePolicy) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 1} } +func (Hook_DeletePolicy) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_hook_8076b1a80af16030, []int{0, 1} +} // Hook defines a hook object. type Hook struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Kind is the Kubernetes kind. - Kind string `protobuf:"bytes,2,opt,name=kind" json:"kind,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` // Path is the chart-relative path to the template. - Path string `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"` + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` // Manifest is the manifest contents. - Manifest string `protobuf:"bytes,4,opt,name=manifest" json:"manifest,omitempty"` + Manifest string `protobuf:"bytes,4,opt,name=manifest,proto3" json:"manifest,omitempty"` // Events are the events that this hook fires on. - Events []Hook_Event `protobuf:"varint,5,rep,packed,name=events,enum=hapi.release.Hook_Event" json:"events,omitempty"` + Events []Hook_Event `protobuf:"varint,5,rep,packed,name=events,proto3,enum=hapi.release.Hook_Event" json:"events,omitempty"` // LastRun indicates the date/time this was last run. - LastRun *google_protobuf.Timestamp `protobuf:"bytes,6,opt,name=last_run,json=lastRun" json:"last_run,omitempty"` + LastRun *timestamp.Timestamp `protobuf:"bytes,6,opt,name=last_run,json=lastRun,proto3" json:"last_run,omitempty"` // Weight indicates the sort order for execution among similar Hook type - Weight int32 `protobuf:"varint,7,opt,name=weight" json:"weight,omitempty"` + Weight int32 `protobuf:"varint,7,opt,name=weight,proto3" json:"weight,omitempty"` // DeletePolicies are the policies that indicate when to delete the hook - DeletePolicies []Hook_DeletePolicy `protobuf:"varint,8,rep,packed,name=delete_policies,json=deletePolicies,enum=hapi.release.Hook_DeletePolicy" json:"delete_policies,omitempty"` + DeletePolicies []Hook_DeletePolicy `protobuf:"varint,8,rep,packed,name=delete_policies,json=deletePolicies,proto3,enum=hapi.release.Hook_DeletePolicy" json:"delete_policies,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Hook) Reset() { *m = Hook{} } +func (m *Hook) String() string { return proto.CompactTextString(m) } +func (*Hook) ProtoMessage() {} +func (*Hook) Descriptor() ([]byte, []int) { + return fileDescriptor_hook_8076b1a80af16030, []int{0} +} +func (m *Hook) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Hook.Unmarshal(m, b) +} +func (m *Hook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Hook.Marshal(b, m, deterministic) +} +func (dst *Hook) XXX_Merge(src proto.Message) { + xxx_messageInfo_Hook.Merge(dst, src) +} +func (m *Hook) XXX_Size() int { + return xxx_messageInfo_Hook.Size(m) +} +func (m *Hook) XXX_DiscardUnknown() { + xxx_messageInfo_Hook.DiscardUnknown(m) } -func (m *Hook) Reset() { *m = Hook{} } -func (m *Hook) String() string { return proto.CompactTextString(m) } -func (*Hook) ProtoMessage() {} -func (*Hook) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +var xxx_messageInfo_Hook proto.InternalMessageInfo func (m *Hook) GetName() string { if m != nil { @@ -172,7 +179,7 @@ func (m *Hook) GetEvents() []Hook_Event { return nil } -func (m *Hook) GetLastRun() *google_protobuf.Timestamp { +func (m *Hook) GetLastRun() *timestamp.Timestamp { if m != nil { return m.LastRun } @@ -199,9 +206,9 @@ func init() { proto.RegisterEnum("hapi.release.Hook_DeletePolicy", Hook_DeletePolicy_name, Hook_DeletePolicy_value) } -func init() { proto.RegisterFile("hapi/release/hook.proto", fileDescriptor0) } +func init() { proto.RegisterFile("hapi/release/hook.proto", fileDescriptor_hook_8076b1a80af16030) } -var fileDescriptor0 = []byte{ +var fileDescriptor_hook_8076b1a80af16030 = []byte{ // 453 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x51, 0x8f, 0x9a, 0x40, 0x10, 0x80, 0x8f, 0x53, 0x41, 0x47, 0xcf, 0xdb, 0x6e, 0x9a, 0x76, 0xe3, 0xcb, 0x19, 0x9f, 0x7c, diff --git a/pkg/proto/hapi/release/info.pb.go b/pkg/proto/hapi/release/info.pb.go index 7a7ccdd74..5ce2845a6 100644 --- a/pkg/proto/hapi/release/info.pb.go +++ b/pkg/proto/hapi/release/info.pb.go @@ -6,28 +6,56 @@ package release import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + // Info describes release information. type Info struct { - Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` - FirstDeployed *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=first_deployed,json=firstDeployed" json:"first_deployed,omitempty"` - LastDeployed *google_protobuf.Timestamp `protobuf:"bytes,3,opt,name=last_deployed,json=lastDeployed" json:"last_deployed,omitempty"` + Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + FirstDeployed *timestamp.Timestamp `protobuf:"bytes,2,opt,name=first_deployed,json=firstDeployed,proto3" json:"first_deployed,omitempty"` + LastDeployed *timestamp.Timestamp `protobuf:"bytes,3,opt,name=last_deployed,json=lastDeployed,proto3" json:"last_deployed,omitempty"` // Deleted tracks when this object was deleted. - Deleted *google_protobuf.Timestamp `protobuf:"bytes,4,opt,name=deleted" json:"deleted,omitempty"` + Deleted *timestamp.Timestamp `protobuf:"bytes,4,opt,name=deleted,proto3" json:"deleted,omitempty"` // Description is human-friendly "log entry" about this release. - Description string `protobuf:"bytes,5,opt,name=Description" json:"Description,omitempty"` + Description string `protobuf:"bytes,5,opt,name=Description,proto3" json:"Description,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Info) Reset() { *m = Info{} } +func (m *Info) String() string { return proto.CompactTextString(m) } +func (*Info) ProtoMessage() {} +func (*Info) Descriptor() ([]byte, []int) { + return fileDescriptor_info_1c62b71ed76c67c1, []int{0} +} +func (m *Info) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Info.Unmarshal(m, b) +} +func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Info.Marshal(b, m, deterministic) +} +func (dst *Info) XXX_Merge(src proto.Message) { + xxx_messageInfo_Info.Merge(dst, src) +} +func (m *Info) XXX_Size() int { + return xxx_messageInfo_Info.Size(m) +} +func (m *Info) XXX_DiscardUnknown() { + xxx_messageInfo_Info.DiscardUnknown(m) } -func (m *Info) Reset() { *m = Info{} } -func (m *Info) String() string { return proto.CompactTextString(m) } -func (*Info) ProtoMessage() {} -func (*Info) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } +var xxx_messageInfo_Info proto.InternalMessageInfo func (m *Info) GetStatus() *Status { if m != nil { @@ -36,21 +64,21 @@ func (m *Info) GetStatus() *Status { return nil } -func (m *Info) GetFirstDeployed() *google_protobuf.Timestamp { +func (m *Info) GetFirstDeployed() *timestamp.Timestamp { if m != nil { return m.FirstDeployed } return nil } -func (m *Info) GetLastDeployed() *google_protobuf.Timestamp { +func (m *Info) GetLastDeployed() *timestamp.Timestamp { if m != nil { return m.LastDeployed } return nil } -func (m *Info) GetDeleted() *google_protobuf.Timestamp { +func (m *Info) GetDeleted() *timestamp.Timestamp { if m != nil { return m.Deleted } @@ -68,9 +96,9 @@ func init() { proto.RegisterType((*Info)(nil), "hapi.release.Info") } -func init() { proto.RegisterFile("hapi/release/info.proto", fileDescriptor1) } +func init() { proto.RegisterFile("hapi/release/info.proto", fileDescriptor_info_1c62b71ed76c67c1) } -var fileDescriptor1 = []byte{ +var fileDescriptor_info_1c62b71ed76c67c1 = []byte{ // 235 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0x31, 0x4f, 0xc3, 0x30, 0x10, 0x85, 0x95, 0x52, 0x5a, 0xd5, 0x6d, 0x19, 0x2c, 0x24, 0x42, 0x16, 0x22, 0xa6, 0x0e, 0xc8, diff --git a/pkg/proto/hapi/release/release.pb.go b/pkg/proto/hapi/release/release.pb.go index 511b543d7..e9578f00a 100644 --- a/pkg/proto/hapi/release/release.pb.go +++ b/pkg/proto/hapi/release/release.pb.go @@ -6,40 +6,67 @@ package release import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import hapi_chart "k8s.io/helm/pkg/proto/hapi/chart" -import hapi_chart3 "k8s.io/helm/pkg/proto/hapi/chart" +import chart "k8s.io/helm/pkg/proto/hapi/chart" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + // Release describes a deployment of a chart, together with the chart // and the variables used to deploy that chart. type Release struct { // Name is the name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Info provides information about a release - Info *Info `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` + Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` // Chart is the chart that was released. - Chart *hapi_chart3.Chart `protobuf:"bytes,3,opt,name=chart" json:"chart,omitempty"` + Chart *chart.Chart `protobuf:"bytes,3,opt,name=chart,proto3" json:"chart,omitempty"` // Config is the set of extra Values added to the chart. // These values override the default values inside of the chart. - Config *hapi_chart.Config `protobuf:"bytes,4,opt,name=config" json:"config,omitempty"` + Config *chart.Config `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"` // Manifest is the string representation of the rendered template. - Manifest string `protobuf:"bytes,5,opt,name=manifest" json:"manifest,omitempty"` + Manifest string `protobuf:"bytes,5,opt,name=manifest,proto3" json:"manifest,omitempty"` // Hooks are all of the hooks declared for this release. - Hooks []*Hook `protobuf:"bytes,6,rep,name=hooks" json:"hooks,omitempty"` + Hooks []*Hook `protobuf:"bytes,6,rep,name=hooks,proto3" json:"hooks,omitempty"` // Version is an int32 which represents the version of the release. - Version int32 `protobuf:"varint,7,opt,name=version" json:"version,omitempty"` + Version int32 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"` // Namespace is the kubernetes namespace of the release. - Namespace string `protobuf:"bytes,8,opt,name=namespace" json:"namespace,omitempty"` + Namespace string `protobuf:"bytes,8,opt,name=namespace,proto3" json:"namespace,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Release) Reset() { *m = Release{} } +func (m *Release) String() string { return proto.CompactTextString(m) } +func (*Release) ProtoMessage() {} +func (*Release) Descriptor() ([]byte, []int) { + return fileDescriptor_release_4bea5d16ba219619, []int{0} +} +func (m *Release) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Release.Unmarshal(m, b) +} +func (m *Release) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Release.Marshal(b, m, deterministic) +} +func (dst *Release) XXX_Merge(src proto.Message) { + xxx_messageInfo_Release.Merge(dst, src) +} +func (m *Release) XXX_Size() int { + return xxx_messageInfo_Release.Size(m) +} +func (m *Release) XXX_DiscardUnknown() { + xxx_messageInfo_Release.DiscardUnknown(m) } -func (m *Release) Reset() { *m = Release{} } -func (m *Release) String() string { return proto.CompactTextString(m) } -func (*Release) ProtoMessage() {} -func (*Release) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } +var xxx_messageInfo_Release proto.InternalMessageInfo func (m *Release) GetName() string { if m != nil { @@ -55,14 +82,14 @@ func (m *Release) GetInfo() *Info { return nil } -func (m *Release) GetChart() *hapi_chart3.Chart { +func (m *Release) GetChart() *chart.Chart { if m != nil { return m.Chart } return nil } -func (m *Release) GetConfig() *hapi_chart.Config { +func (m *Release) GetConfig() *chart.Config { if m != nil { return m.Config } @@ -101,9 +128,9 @@ func init() { proto.RegisterType((*Release)(nil), "hapi.release.Release") } -func init() { proto.RegisterFile("hapi/release/release.proto", fileDescriptor2) } +func init() { proto.RegisterFile("hapi/release/release.proto", fileDescriptor_release_4bea5d16ba219619) } -var fileDescriptor2 = []byte{ +var fileDescriptor_release_4bea5d16ba219619 = []byte{ // 256 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xbf, 0x4e, 0xc3, 0x40, 0x0c, 0xc6, 0x95, 0x36, 0x7f, 0x1a, 0xc3, 0x82, 0x07, 0xb0, 0x22, 0x86, 0x88, 0x01, 0x22, 0x86, diff --git a/pkg/proto/hapi/release/status.pb.go b/pkg/proto/hapi/release/status.pb.go index bc75e64b2..c5ed59202 100644 --- a/pkg/proto/hapi/release/status.pb.go +++ b/pkg/proto/hapi/release/status.pb.go @@ -13,6 +13,12 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + type Status_Code int32 const ( @@ -62,23 +68,47 @@ var Status_Code_value = map[string]int32{ func (x Status_Code) String() string { return proto.EnumName(Status_Code_name, int32(x)) } -func (Status_Code) EnumDescriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 0} } +func (Status_Code) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_status_933517e5a50981ed, []int{0, 0} +} // Status defines the status of a release. type Status struct { - Code Status_Code `protobuf:"varint,1,opt,name=code,enum=hapi.release.Status_Code" json:"code,omitempty"` + Code Status_Code `protobuf:"varint,1,opt,name=code,proto3,enum=hapi.release.Status_Code" json:"code,omitempty"` // Cluster resources as kubectl would print them. - Resources string `protobuf:"bytes,3,opt,name=resources" json:"resources,omitempty"` + Resources string `protobuf:"bytes,3,opt,name=resources,proto3" json:"resources,omitempty"` // Contains the rendered templates/NOTES.txt if available - Notes string `protobuf:"bytes,4,opt,name=notes" json:"notes,omitempty"` + Notes string `protobuf:"bytes,4,opt,name=notes,proto3" json:"notes,omitempty"` // LastTestSuiteRun provides results on the last test run on a release - LastTestSuiteRun *TestSuite `protobuf:"bytes,5,opt,name=last_test_suite_run,json=lastTestSuiteRun" json:"last_test_suite_run,omitempty"` + LastTestSuiteRun *TestSuite `protobuf:"bytes,5,opt,name=last_test_suite_run,json=lastTestSuiteRun,proto3" json:"last_test_suite_run,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Status) Reset() { *m = Status{} } +func (m *Status) String() string { return proto.CompactTextString(m) } +func (*Status) ProtoMessage() {} +func (*Status) Descriptor() ([]byte, []int) { + return fileDescriptor_status_933517e5a50981ed, []int{0} +} +func (m *Status) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Status.Unmarshal(m, b) +} +func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Status.Marshal(b, m, deterministic) +} +func (dst *Status) XXX_Merge(src proto.Message) { + xxx_messageInfo_Status.Merge(dst, src) +} +func (m *Status) XXX_Size() int { + return xxx_messageInfo_Status.Size(m) +} +func (m *Status) XXX_DiscardUnknown() { + xxx_messageInfo_Status.DiscardUnknown(m) } -func (m *Status) Reset() { *m = Status{} } -func (m *Status) String() string { return proto.CompactTextString(m) } -func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} } +var xxx_messageInfo_Status proto.InternalMessageInfo func (m *Status) GetCode() Status_Code { if m != nil { @@ -113,9 +143,9 @@ func init() { proto.RegisterEnum("hapi.release.Status_Code", Status_Code_name, Status_Code_value) } -func init() { proto.RegisterFile("hapi/release/status.proto", fileDescriptor3) } +func init() { proto.RegisterFile("hapi/release/status.proto", fileDescriptor_status_933517e5a50981ed) } -var fileDescriptor3 = []byte{ +var fileDescriptor_status_933517e5a50981ed = []byte{ // 333 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xd1, 0x6e, 0xa2, 0x40, 0x14, 0x86, 0x17, 0x45, 0xd4, 0xa3, 0x71, 0x27, 0xa3, 0xc9, 0xa2, 0xd9, 0x4d, 0x8c, 0x57, 0xde, diff --git a/pkg/proto/hapi/release/test_run.pb.go b/pkg/proto/hapi/release/test_run.pb.go index 4d39d17c2..f43be231d 100644 --- a/pkg/proto/hapi/release/test_run.pb.go +++ b/pkg/proto/hapi/release/test_run.pb.go @@ -6,13 +6,19 @@ package release import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + type TestRun_Status int32 const ( @@ -38,20 +44,44 @@ var TestRun_Status_value = map[string]int32{ func (x TestRun_Status) String() string { return proto.EnumName(TestRun_Status_name, int32(x)) } -func (TestRun_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor4, []int{0, 0} } +func (TestRun_Status) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_run_31b133e40c63664e, []int{0, 0} +} type TestRun struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Status TestRun_Status `protobuf:"varint,2,opt,name=status,enum=hapi.release.TestRun_Status" json:"status,omitempty"` - Info string `protobuf:"bytes,3,opt,name=info" json:"info,omitempty"` - StartedAt *google_protobuf.Timestamp `protobuf:"bytes,4,opt,name=started_at,json=startedAt" json:"started_at,omitempty"` - CompletedAt *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=completed_at,json=completedAt" json:"completed_at,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Status TestRun_Status `protobuf:"varint,2,opt,name=status,proto3,enum=hapi.release.TestRun_Status" json:"status,omitempty"` + Info string `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` + StartedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + CompletedAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *TestRun) Reset() { *m = TestRun{} } -func (m *TestRun) String() string { return proto.CompactTextString(m) } -func (*TestRun) ProtoMessage() {} -func (*TestRun) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} } +func (m *TestRun) Reset() { *m = TestRun{} } +func (m *TestRun) String() string { return proto.CompactTextString(m) } +func (*TestRun) ProtoMessage() {} +func (*TestRun) Descriptor() ([]byte, []int) { + return fileDescriptor_test_run_31b133e40c63664e, []int{0} +} +func (m *TestRun) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestRun.Unmarshal(m, b) +} +func (m *TestRun) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestRun.Marshal(b, m, deterministic) +} +func (dst *TestRun) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestRun.Merge(dst, src) +} +func (m *TestRun) XXX_Size() int { + return xxx_messageInfo_TestRun.Size(m) +} +func (m *TestRun) XXX_DiscardUnknown() { + xxx_messageInfo_TestRun.DiscardUnknown(m) +} + +var xxx_messageInfo_TestRun proto.InternalMessageInfo func (m *TestRun) GetName() string { if m != nil { @@ -74,14 +104,14 @@ func (m *TestRun) GetInfo() string { return "" } -func (m *TestRun) GetStartedAt() *google_protobuf.Timestamp { +func (m *TestRun) GetStartedAt() *timestamp.Timestamp { if m != nil { return m.StartedAt } return nil } -func (m *TestRun) GetCompletedAt() *google_protobuf.Timestamp { +func (m *TestRun) GetCompletedAt() *timestamp.Timestamp { if m != nil { return m.CompletedAt } @@ -93,9 +123,11 @@ func init() { proto.RegisterEnum("hapi.release.TestRun_Status", TestRun_Status_name, TestRun_Status_value) } -func init() { proto.RegisterFile("hapi/release/test_run.proto", fileDescriptor4) } +func init() { + proto.RegisterFile("hapi/release/test_run.proto", fileDescriptor_test_run_31b133e40c63664e) +} -var fileDescriptor4 = []byte{ +var fileDescriptor_test_run_31b133e40c63664e = []byte{ // 274 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0xc1, 0x4b, 0xfb, 0x30, 0x1c, 0xc5, 0x7f, 0xe9, 0xf6, 0x6b, 0x69, 0x3a, 0xa4, 0xe4, 0x54, 0xa6, 0x60, 0xd9, 0xa9, 0xa7, diff --git a/pkg/proto/hapi/release/test_suite.pb.go b/pkg/proto/hapi/release/test_suite.pb.go index b7fa26147..d2cf3a979 100644 --- a/pkg/proto/hapi/release/test_suite.pb.go +++ b/pkg/proto/hapi/release/test_suite.pb.go @@ -6,36 +6,64 @@ package release import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + // TestSuite comprises of the last run of the pre-defined test suite of a release version type TestSuite struct { // StartedAt indicates the date/time this test suite was kicked off - StartedAt *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=started_at,json=startedAt" json:"started_at,omitempty"` + StartedAt *timestamp.Timestamp `protobuf:"bytes,1,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` // CompletedAt indicates the date/time this test suite was completed - CompletedAt *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=completed_at,json=completedAt" json:"completed_at,omitempty"` + CompletedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"` // Results are the results of each segment of the test - Results []*TestRun `protobuf:"bytes,3,rep,name=results" json:"results,omitempty"` + Results []*TestRun `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TestSuite) Reset() { *m = TestSuite{} } +func (m *TestSuite) String() string { return proto.CompactTextString(m) } +func (*TestSuite) ProtoMessage() {} +func (*TestSuite) Descriptor() ([]byte, []int) { + return fileDescriptor_test_suite_06a0016f2c6417b8, []int{0} +} +func (m *TestSuite) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestSuite.Unmarshal(m, b) +} +func (m *TestSuite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestSuite.Marshal(b, m, deterministic) +} +func (dst *TestSuite) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestSuite.Merge(dst, src) +} +func (m *TestSuite) XXX_Size() int { + return xxx_messageInfo_TestSuite.Size(m) +} +func (m *TestSuite) XXX_DiscardUnknown() { + xxx_messageInfo_TestSuite.DiscardUnknown(m) } -func (m *TestSuite) Reset() { *m = TestSuite{} } -func (m *TestSuite) String() string { return proto.CompactTextString(m) } -func (*TestSuite) ProtoMessage() {} -func (*TestSuite) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0} } +var xxx_messageInfo_TestSuite proto.InternalMessageInfo -func (m *TestSuite) GetStartedAt() *google_protobuf.Timestamp { +func (m *TestSuite) GetStartedAt() *timestamp.Timestamp { if m != nil { return m.StartedAt } return nil } -func (m *TestSuite) GetCompletedAt() *google_protobuf.Timestamp { +func (m *TestSuite) GetCompletedAt() *timestamp.Timestamp { if m != nil { return m.CompletedAt } @@ -53,9 +81,11 @@ func init() { proto.RegisterType((*TestSuite)(nil), "hapi.release.TestSuite") } -func init() { proto.RegisterFile("hapi/release/test_suite.proto", fileDescriptor5) } +func init() { + proto.RegisterFile("hapi/release/test_suite.proto", fileDescriptor_test_suite_06a0016f2c6417b8) +} -var fileDescriptor5 = []byte{ +var fileDescriptor_test_suite_06a0016f2c6417b8 = []byte{ // 207 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0xc1, 0x4a, 0x86, 0x40, 0x14, 0x85, 0x31, 0x21, 0x71, 0x74, 0x35, 0x10, 0x88, 0x11, 0x49, 0x2b, 0x57, 0x33, 0x60, 0xab, diff --git a/pkg/proto/hapi/rudder/rudder.pb.go b/pkg/proto/hapi/rudder/rudder.pb.go index 3a0de7746..d594836c4 100644 --- a/pkg/proto/hapi/rudder/rudder.pb.go +++ b/pkg/proto/hapi/rudder/rudder.pb.go @@ -1,34 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: hapi/rudder/rudder.proto -/* -Package rudder is a generated protocol buffer package. - -It is generated from these files: - hapi/rudder/rudder.proto - -It has these top-level messages: - Result - VersionReleaseRequest - VersionReleaseResponse - InstallReleaseRequest - InstallReleaseResponse - DeleteReleaseRequest - DeleteReleaseResponse - UpgradeReleaseRequest - UpgradeReleaseResponse - RollbackReleaseRequest - RollbackReleaseResponse - ReleaseStatusRequest - ReleaseStatusResponse -*/ package rudder import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import hapi_release3 "k8s.io/helm/pkg/proto/hapi/release" -import hapi_release5 "k8s.io/helm/pkg/proto/hapi/release" +import release "k8s.io/helm/pkg/proto/hapi/release" import ( context "golang.org/x/net/context" @@ -75,17 +53,41 @@ var Result_Status_value = map[string]int32{ func (x Result_Status) String() string { return proto.EnumName(Result_Status_name, int32(x)) } -func (Result_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } +func (Result_Status) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{0, 0} +} type Result struct { - Info string `protobuf:"bytes,1,opt,name=info" json:"info,omitempty"` - Log []string `protobuf:"bytes,2,rep,name=log" json:"log,omitempty"` + Info string `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` + Log []string `protobuf:"bytes,2,rep,name=log,proto3" json:"log,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Result) Reset() { *m = Result{} } +func (m *Result) String() string { return proto.CompactTextString(m) } +func (*Result) ProtoMessage() {} +func (*Result) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{0} +} +func (m *Result) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Result.Unmarshal(m, b) +} +func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Result.Marshal(b, m, deterministic) +} +func (dst *Result) XXX_Merge(src proto.Message) { + xxx_messageInfo_Result.Merge(dst, src) +} +func (m *Result) XXX_Size() int { + return xxx_messageInfo_Result.Size(m) +} +func (m *Result) XXX_DiscardUnknown() { + xxx_messageInfo_Result.DiscardUnknown(m) } -func (m *Result) Reset() { *m = Result{} } -func (m *Result) String() string { return proto.CompactTextString(m) } -func (*Result) ProtoMessage() {} -func (*Result) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +var xxx_messageInfo_Result proto.InternalMessageInfo func (m *Result) GetInfo() string { if m != nil { @@ -102,22 +104,66 @@ func (m *Result) GetLog() []string { } type VersionReleaseRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VersionReleaseRequest) Reset() { *m = VersionReleaseRequest{} } +func (m *VersionReleaseRequest) String() string { return proto.CompactTextString(m) } +func (*VersionReleaseRequest) ProtoMessage() {} +func (*VersionReleaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{1} +} +func (m *VersionReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VersionReleaseRequest.Unmarshal(m, b) +} +func (m *VersionReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VersionReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *VersionReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VersionReleaseRequest.Merge(dst, src) +} +func (m *VersionReleaseRequest) XXX_Size() int { + return xxx_messageInfo_VersionReleaseRequest.Size(m) +} +func (m *VersionReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VersionReleaseRequest.DiscardUnknown(m) } -func (m *VersionReleaseRequest) Reset() { *m = VersionReleaseRequest{} } -func (m *VersionReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*VersionReleaseRequest) ProtoMessage() {} -func (*VersionReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +var xxx_messageInfo_VersionReleaseRequest proto.InternalMessageInfo type VersionReleaseResponse struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VersionReleaseResponse) Reset() { *m = VersionReleaseResponse{} } +func (m *VersionReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*VersionReleaseResponse) ProtoMessage() {} +func (*VersionReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{2} +} +func (m *VersionReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VersionReleaseResponse.Unmarshal(m, b) +} +func (m *VersionReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VersionReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *VersionReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_VersionReleaseResponse.Merge(dst, src) +} +func (m *VersionReleaseResponse) XXX_Size() int { + return xxx_messageInfo_VersionReleaseResponse.Size(m) +} +func (m *VersionReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_VersionReleaseResponse.DiscardUnknown(m) } -func (m *VersionReleaseResponse) Reset() { *m = VersionReleaseResponse{} } -func (m *VersionReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*VersionReleaseResponse) ProtoMessage() {} -func (*VersionReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +var xxx_messageInfo_VersionReleaseResponse proto.InternalMessageInfo func (m *VersionReleaseResponse) GetName() string { if m != nil { @@ -134,15 +180,37 @@ func (m *VersionReleaseResponse) GetVersion() string { } type InstallReleaseRequest struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *InstallReleaseRequest) Reset() { *m = InstallReleaseRequest{} } -func (m *InstallReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*InstallReleaseRequest) ProtoMessage() {} -func (*InstallReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +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_rudder_dd8cdbe38a210d28, []int{3} +} +func (m *InstallReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InstallReleaseRequest.Unmarshal(m, b) +} +func (m *InstallReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InstallReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *InstallReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_InstallReleaseRequest.Merge(dst, src) +} +func (m *InstallReleaseRequest) XXX_Size() int { + return xxx_messageInfo_InstallReleaseRequest.Size(m) +} +func (m *InstallReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_InstallReleaseRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_InstallReleaseRequest proto.InternalMessageInfo -func (m *InstallReleaseRequest) GetRelease() *hapi_release5.Release { +func (m *InstallReleaseRequest) GetRelease() *release.Release { if m != nil { return m.Release } @@ -150,16 +218,38 @@ func (m *InstallReleaseRequest) GetRelease() *hapi_release5.Release { } type InstallReleaseResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` - Result *Result `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + Result *Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_rudder_dd8cdbe38a210d28, []int{4} +} +func (m *InstallReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InstallReleaseResponse.Unmarshal(m, b) +} +func (m *InstallReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InstallReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *InstallReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_InstallReleaseResponse.Merge(dst, src) +} +func (m *InstallReleaseResponse) XXX_Size() int { + return xxx_messageInfo_InstallReleaseResponse.Size(m) +} +func (m *InstallReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_InstallReleaseResponse.DiscardUnknown(m) } -func (m *InstallReleaseResponse) Reset() { *m = InstallReleaseResponse{} } -func (m *InstallReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*InstallReleaseResponse) ProtoMessage() {} -func (*InstallReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +var xxx_messageInfo_InstallReleaseResponse proto.InternalMessageInfo -func (m *InstallReleaseResponse) GetRelease() *hapi_release5.Release { +func (m *InstallReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -174,15 +264,37 @@ func (m *InstallReleaseResponse) GetResult() *Result { } type DeleteReleaseRequest struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *DeleteReleaseRequest) Reset() { *m = DeleteReleaseRequest{} } -func (m *DeleteReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteReleaseRequest) ProtoMessage() {} -func (*DeleteReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (m *DeleteReleaseRequest) Reset() { *m = DeleteReleaseRequest{} } +func (m *DeleteReleaseRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteReleaseRequest) ProtoMessage() {} +func (*DeleteReleaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{5} +} +func (m *DeleteReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteReleaseRequest.Unmarshal(m, b) +} +func (m *DeleteReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *DeleteReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteReleaseRequest.Merge(dst, src) +} +func (m *DeleteReleaseRequest) XXX_Size() int { + return xxx_messageInfo_DeleteReleaseRequest.Size(m) +} +func (m *DeleteReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteReleaseRequest.DiscardUnknown(m) +} -func (m *DeleteReleaseRequest) GetRelease() *hapi_release5.Release { +var xxx_messageInfo_DeleteReleaseRequest proto.InternalMessageInfo + +func (m *DeleteReleaseRequest) GetRelease() *release.Release { if m != nil { return m.Release } @@ -190,16 +302,38 @@ func (m *DeleteReleaseRequest) GetRelease() *hapi_release5.Release { } type DeleteReleaseResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` - Result *Result `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + Result *Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteReleaseResponse) Reset() { *m = DeleteReleaseResponse{} } +func (m *DeleteReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteReleaseResponse) ProtoMessage() {} +func (*DeleteReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{6} +} +func (m *DeleteReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteReleaseResponse.Unmarshal(m, b) +} +func (m *DeleteReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *DeleteReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteReleaseResponse.Merge(dst, src) +} +func (m *DeleteReleaseResponse) XXX_Size() int { + return xxx_messageInfo_DeleteReleaseResponse.Size(m) +} +func (m *DeleteReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteReleaseResponse.DiscardUnknown(m) } -func (m *DeleteReleaseResponse) Reset() { *m = DeleteReleaseResponse{} } -func (m *DeleteReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteReleaseResponse) ProtoMessage() {} -func (*DeleteReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +var xxx_messageInfo_DeleteReleaseResponse proto.InternalMessageInfo -func (m *DeleteReleaseResponse) GetRelease() *hapi_release5.Release { +func (m *DeleteReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -214,28 +348,50 @@ func (m *DeleteReleaseResponse) GetResult() *Result { } type UpgradeReleaseRequest struct { - Current *hapi_release5.Release `protobuf:"bytes,1,opt,name=current" json:"current,omitempty"` - Target *hapi_release5.Release `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"` - Timeout int64 `protobuf:"varint,3,opt,name=Timeout" json:"Timeout,omitempty"` - Wait bool `protobuf:"varint,4,opt,name=Wait" json:"Wait,omitempty"` - Recreate bool `protobuf:"varint,5,opt,name=Recreate" json:"Recreate,omitempty"` - Force bool `protobuf:"varint,6,opt,name=Force" json:"Force,omitempty"` - CleanupOnFail bool `protobuf:"varint,7,opt,name=CleanupOnFail" json:"CleanupOnFail,omitempty"` + Current *release.Release `protobuf:"bytes,1,opt,name=current,proto3" json:"current,omitempty"` + Target *release.Release `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` + Timeout int64 `protobuf:"varint,3,opt,name=Timeout,proto3" json:"Timeout,omitempty"` + Wait bool `protobuf:"varint,4,opt,name=Wait,proto3" json:"Wait,omitempty"` + Recreate bool `protobuf:"varint,5,opt,name=Recreate,proto3" json:"Recreate,omitempty"` + Force bool `protobuf:"varint,6,opt,name=Force,proto3" json:"Force,omitempty"` + CleanupOnFail bool `protobuf:"varint,7,opt,name=CleanupOnFail,proto3" json:"CleanupOnFail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpgradeReleaseRequest) Reset() { *m = UpgradeReleaseRequest{} } +func (m *UpgradeReleaseRequest) String() string { return proto.CompactTextString(m) } +func (*UpgradeReleaseRequest) ProtoMessage() {} +func (*UpgradeReleaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{7} +} +func (m *UpgradeReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpgradeReleaseRequest.Unmarshal(m, b) +} +func (m *UpgradeReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpgradeReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *UpgradeReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpgradeReleaseRequest.Merge(dst, src) +} +func (m *UpgradeReleaseRequest) XXX_Size() int { + return xxx_messageInfo_UpgradeReleaseRequest.Size(m) +} +func (m *UpgradeReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpgradeReleaseRequest.DiscardUnknown(m) } -func (m *UpgradeReleaseRequest) Reset() { *m = UpgradeReleaseRequest{} } -func (m *UpgradeReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*UpgradeReleaseRequest) ProtoMessage() {} -func (*UpgradeReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +var xxx_messageInfo_UpgradeReleaseRequest proto.InternalMessageInfo -func (m *UpgradeReleaseRequest) GetCurrent() *hapi_release5.Release { +func (m *UpgradeReleaseRequest) GetCurrent() *release.Release { if m != nil { return m.Current } return nil } -func (m *UpgradeReleaseRequest) GetTarget() *hapi_release5.Release { +func (m *UpgradeReleaseRequest) GetTarget() *release.Release { if m != nil { return m.Target } @@ -278,16 +434,38 @@ func (m *UpgradeReleaseRequest) GetCleanupOnFail() bool { } type UpgradeReleaseResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` - Result *Result `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + Result *Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpgradeReleaseResponse) Reset() { *m = UpgradeReleaseResponse{} } +func (m *UpgradeReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*UpgradeReleaseResponse) ProtoMessage() {} +func (*UpgradeReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{8} +} +func (m *UpgradeReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpgradeReleaseResponse.Unmarshal(m, b) +} +func (m *UpgradeReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpgradeReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *UpgradeReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpgradeReleaseResponse.Merge(dst, src) +} +func (m *UpgradeReleaseResponse) XXX_Size() int { + return xxx_messageInfo_UpgradeReleaseResponse.Size(m) +} +func (m *UpgradeReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UpgradeReleaseResponse.DiscardUnknown(m) } -func (m *UpgradeReleaseResponse) Reset() { *m = UpgradeReleaseResponse{} } -func (m *UpgradeReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*UpgradeReleaseResponse) ProtoMessage() {} -func (*UpgradeReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +var xxx_messageInfo_UpgradeReleaseResponse proto.InternalMessageInfo -func (m *UpgradeReleaseResponse) GetRelease() *hapi_release5.Release { +func (m *UpgradeReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -302,28 +480,50 @@ func (m *UpgradeReleaseResponse) GetResult() *Result { } type RollbackReleaseRequest struct { - Current *hapi_release5.Release `protobuf:"bytes,1,opt,name=current" json:"current,omitempty"` - Target *hapi_release5.Release `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"` - Timeout int64 `protobuf:"varint,3,opt,name=Timeout" json:"Timeout,omitempty"` - Wait bool `protobuf:"varint,4,opt,name=Wait" json:"Wait,omitempty"` - Recreate bool `protobuf:"varint,5,opt,name=Recreate" json:"Recreate,omitempty"` - Force bool `protobuf:"varint,6,opt,name=Force" json:"Force,omitempty"` - CleanupOnFail bool `protobuf:"varint,7,opt,name=CleanupOnFail" json:"CleanupOnFail,omitempty"` + Current *release.Release `protobuf:"bytes,1,opt,name=current,proto3" json:"current,omitempty"` + Target *release.Release `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` + Timeout int64 `protobuf:"varint,3,opt,name=Timeout,proto3" json:"Timeout,omitempty"` + Wait bool `protobuf:"varint,4,opt,name=Wait,proto3" json:"Wait,omitempty"` + Recreate bool `protobuf:"varint,5,opt,name=Recreate,proto3" json:"Recreate,omitempty"` + Force bool `protobuf:"varint,6,opt,name=Force,proto3" json:"Force,omitempty"` + CleanupOnFail bool `protobuf:"varint,7,opt,name=CleanupOnFail,proto3" json:"CleanupOnFail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_rudder_dd8cdbe38a210d28, []int{9} +} +func (m *RollbackReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RollbackReleaseRequest.Unmarshal(m, b) +} +func (m *RollbackReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RollbackReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *RollbackReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollbackReleaseRequest.Merge(dst, src) +} +func (m *RollbackReleaseRequest) XXX_Size() int { + return xxx_messageInfo_RollbackReleaseRequest.Size(m) +} +func (m *RollbackReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RollbackReleaseRequest.DiscardUnknown(m) } -func (m *RollbackReleaseRequest) Reset() { *m = RollbackReleaseRequest{} } -func (m *RollbackReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*RollbackReleaseRequest) ProtoMessage() {} -func (*RollbackReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +var xxx_messageInfo_RollbackReleaseRequest proto.InternalMessageInfo -func (m *RollbackReleaseRequest) GetCurrent() *hapi_release5.Release { +func (m *RollbackReleaseRequest) GetCurrent() *release.Release { if m != nil { return m.Current } return nil } -func (m *RollbackReleaseRequest) GetTarget() *hapi_release5.Release { +func (m *RollbackReleaseRequest) GetTarget() *release.Release { if m != nil { return m.Target } @@ -366,16 +566,38 @@ func (m *RollbackReleaseRequest) GetCleanupOnFail() bool { } type RollbackReleaseResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` - Result *Result `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + Result *Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *RollbackReleaseResponse) Reset() { *m = RollbackReleaseResponse{} } -func (m *RollbackReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*RollbackReleaseResponse) ProtoMessage() {} -func (*RollbackReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +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_rudder_dd8cdbe38a210d28, []int{10} +} +func (m *RollbackReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RollbackReleaseResponse.Unmarshal(m, b) +} +func (m *RollbackReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RollbackReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *RollbackReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollbackReleaseResponse.Merge(dst, src) +} +func (m *RollbackReleaseResponse) XXX_Size() int { + return xxx_messageInfo_RollbackReleaseResponse.Size(m) +} +func (m *RollbackReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RollbackReleaseResponse.DiscardUnknown(m) +} -func (m *RollbackReleaseResponse) GetRelease() *hapi_release5.Release { +var xxx_messageInfo_RollbackReleaseResponse proto.InternalMessageInfo + +func (m *RollbackReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -390,15 +612,37 @@ func (m *RollbackReleaseResponse) GetResult() *Result { } type ReleaseStatusRequest struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ReleaseStatusRequest) Reset() { *m = ReleaseStatusRequest{} } -func (m *ReleaseStatusRequest) String() string { return proto.CompactTextString(m) } -func (*ReleaseStatusRequest) ProtoMessage() {} -func (*ReleaseStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (m *ReleaseStatusRequest) Reset() { *m = ReleaseStatusRequest{} } +func (m *ReleaseStatusRequest) String() string { return proto.CompactTextString(m) } +func (*ReleaseStatusRequest) ProtoMessage() {} +func (*ReleaseStatusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{11} +} +func (m *ReleaseStatusRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReleaseStatusRequest.Unmarshal(m, b) +} +func (m *ReleaseStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReleaseStatusRequest.Marshal(b, m, deterministic) +} +func (dst *ReleaseStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReleaseStatusRequest.Merge(dst, src) +} +func (m *ReleaseStatusRequest) XXX_Size() int { + return xxx_messageInfo_ReleaseStatusRequest.Size(m) +} +func (m *ReleaseStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReleaseStatusRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReleaseStatusRequest proto.InternalMessageInfo -func (m *ReleaseStatusRequest) GetRelease() *hapi_release5.Release { +func (m *ReleaseStatusRequest) GetRelease() *release.Release { if m != nil { return m.Release } @@ -406,23 +650,45 @@ func (m *ReleaseStatusRequest) GetRelease() *hapi_release5.Release { } type ReleaseStatusResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` - Info *hapi_release3.Info `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + Info *release.Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ReleaseStatusResponse) Reset() { *m = ReleaseStatusResponse{} } -func (m *ReleaseStatusResponse) String() string { return proto.CompactTextString(m) } -func (*ReleaseStatusResponse) ProtoMessage() {} -func (*ReleaseStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (m *ReleaseStatusResponse) Reset() { *m = ReleaseStatusResponse{} } +func (m *ReleaseStatusResponse) String() string { return proto.CompactTextString(m) } +func (*ReleaseStatusResponse) ProtoMessage() {} +func (*ReleaseStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{12} +} +func (m *ReleaseStatusResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReleaseStatusResponse.Unmarshal(m, b) +} +func (m *ReleaseStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReleaseStatusResponse.Marshal(b, m, deterministic) +} +func (dst *ReleaseStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReleaseStatusResponse.Merge(dst, src) +} +func (m *ReleaseStatusResponse) XXX_Size() int { + return xxx_messageInfo_ReleaseStatusResponse.Size(m) +} +func (m *ReleaseStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReleaseStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReleaseStatusResponse proto.InternalMessageInfo -func (m *ReleaseStatusResponse) GetRelease() *hapi_release5.Release { +func (m *ReleaseStatusResponse) GetRelease() *release.Release { if m != nil { return m.Release } return nil } -func (m *ReleaseStatusResponse) GetInfo() *hapi_release3.Info { +func (m *ReleaseStatusResponse) GetInfo() *release.Info { if m != nil { return m.Info } @@ -454,8 +720,9 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for ReleaseModuleService service - +// ReleaseModuleServiceClient is the client API for ReleaseModuleService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ReleaseModuleServiceClient interface { Version(ctx context.Context, in *VersionReleaseRequest, opts ...grpc.CallOption) (*VersionReleaseResponse, error) // InstallRelease requests installation of a chart as a new release. @@ -480,7 +747,7 @@ func NewReleaseModuleServiceClient(cc *grpc.ClientConn) ReleaseModuleServiceClie func (c *releaseModuleServiceClient) Version(ctx context.Context, in *VersionReleaseRequest, opts ...grpc.CallOption) (*VersionReleaseResponse, error) { out := new(VersionReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/Version", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/Version", in, out, opts...) if err != nil { return nil, err } @@ -489,7 +756,7 @@ func (c *releaseModuleServiceClient) Version(ctx context.Context, in *VersionRel func (c *releaseModuleServiceClient) InstallRelease(ctx context.Context, in *InstallReleaseRequest, opts ...grpc.CallOption) (*InstallReleaseResponse, error) { out := new(InstallReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/InstallRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/InstallRelease", in, out, opts...) if err != nil { return nil, err } @@ -498,7 +765,7 @@ func (c *releaseModuleServiceClient) InstallRelease(ctx context.Context, in *Ins func (c *releaseModuleServiceClient) DeleteRelease(ctx context.Context, in *DeleteReleaseRequest, opts ...grpc.CallOption) (*DeleteReleaseResponse, error) { out := new(DeleteReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/DeleteRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/DeleteRelease", in, out, opts...) if err != nil { return nil, err } @@ -507,7 +774,7 @@ func (c *releaseModuleServiceClient) DeleteRelease(ctx context.Context, in *Dele func (c *releaseModuleServiceClient) RollbackRelease(ctx context.Context, in *RollbackReleaseRequest, opts ...grpc.CallOption) (*RollbackReleaseResponse, error) { out := new(RollbackReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/RollbackRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/RollbackRelease", in, out, opts...) if err != nil { return nil, err } @@ -516,7 +783,7 @@ func (c *releaseModuleServiceClient) RollbackRelease(ctx context.Context, in *Ro func (c *releaseModuleServiceClient) UpgradeRelease(ctx context.Context, in *UpgradeReleaseRequest, opts ...grpc.CallOption) (*UpgradeReleaseResponse, error) { out := new(UpgradeReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/UpgradeRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/UpgradeRelease", in, out, opts...) if err != nil { return nil, err } @@ -525,15 +792,14 @@ func (c *releaseModuleServiceClient) UpgradeRelease(ctx context.Context, in *Upg func (c *releaseModuleServiceClient) ReleaseStatus(ctx context.Context, in *ReleaseStatusRequest, opts ...grpc.CallOption) (*ReleaseStatusResponse, error) { out := new(ReleaseStatusResponse) - err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/ReleaseStatus", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/ReleaseStatus", in, out, opts...) if err != nil { return nil, err } return out, nil } -// Server API for ReleaseModuleService service - +// ReleaseModuleServiceServer is the server API for ReleaseModuleService service. type ReleaseModuleServiceServer interface { Version(context.Context, *VersionReleaseRequest) (*VersionReleaseResponse, error) // InstallRelease requests installation of a chart as a new release. @@ -693,9 +959,9 @@ var _ReleaseModuleService_serviceDesc = grpc.ServiceDesc{ Metadata: "hapi/rudder/rudder.proto", } -func init() { proto.RegisterFile("hapi/rudder/rudder.proto", fileDescriptor0) } +func init() { proto.RegisterFile("hapi/rudder/rudder.proto", fileDescriptor_rudder_dd8cdbe38a210d28) } -var fileDescriptor0 = []byte{ +var fileDescriptor_rudder_dd8cdbe38a210d28 = []byte{ // 615 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0x4d, 0x6f, 0xd3, 0x40, 0x10, 0x8d, 0x9b, 0xc6, 0x69, 0xa6, 0x2a, 0x44, 0xab, 0xba, 0xb5, 0x2c, 0x0e, 0x91, 0x85, 0x50, diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go index ab6e573e5..894d2eb03 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -1,47 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: hapi/services/tiller.proto -/* -Package services is a generated protocol buffer package. - -It is generated from these files: - hapi/services/tiller.proto - -It has these top-level messages: - ListReleasesRequest - ListSort - ListReleasesResponse - GetReleaseStatusRequest - GetReleaseStatusResponse - GetReleaseContentRequest - GetReleaseContentResponse - UpdateReleaseRequest - UpdateReleaseResponse - RollbackReleaseRequest - RollbackReleaseResponse - InstallReleaseRequest - InstallReleaseResponse - UninstallReleaseRequest - UninstallReleaseResponse - GetVersionRequest - GetVersionResponse - GetHistoryRequest - GetHistoryResponse - TestReleaseRequest - TestReleaseResponse -*/ package services import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import hapi_chart3 "k8s.io/helm/pkg/proto/hapi/chart" -import hapi_chart "k8s.io/helm/pkg/proto/hapi/chart" -import hapi_release5 "k8s.io/helm/pkg/proto/hapi/release" -import hapi_release4 "k8s.io/helm/pkg/proto/hapi/release" -import hapi_release1 "k8s.io/helm/pkg/proto/hapi/release" -import hapi_release3 "k8s.io/helm/pkg/proto/hapi/release" -import hapi_version "k8s.io/helm/pkg/proto/hapi/version" +import chart "k8s.io/helm/pkg/proto/hapi/chart" +import release "k8s.io/helm/pkg/proto/hapi/release" +import version "k8s.io/helm/pkg/proto/hapi/version" import ( context "golang.org/x/net/context" @@ -85,7 +52,9 @@ var ListSort_SortBy_value = map[string]int32{ func (x ListSort_SortBy) String() string { return proto.EnumName(ListSort_SortBy_name, int32(x)) } -func (ListSort_SortBy) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} } +func (ListSort_SortBy) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{1, 0} +} // SortOrder defines sort orders to augment sorting operations. type ListSort_SortOrder int32 @@ -107,7 +76,9 @@ var ListSort_SortOrder_value = map[string]int32{ func (x ListSort_SortOrder) String() string { return proto.EnumName(ListSort_SortOrder_name, int32(x)) } -func (ListSort_SortOrder) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 1} } +func (ListSort_SortOrder) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{1, 1} +} // ListReleasesRequest requests a list of releases. // @@ -116,30 +87,52 @@ func (ListSort_SortOrder) EnumDescriptor() ([]byte, []int) { return fileDescript // Releases can be sorted according to a few pre-determined sort strategies. type ListReleasesRequest struct { // Limit is the maximum number of releases to be returned. - Limit int64 `protobuf:"varint,1,opt,name=limit" json:"limit,omitempty"` + Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` // Offset is the last release name that was seen. The next listing // operation will start with the name after this one. // Example: If list one returns albert, bernie, carl, and sets 'next: dennis'. // dennis is the offset. Supplying 'dennis' for the next request should // cause the next batch to return a set of results starting with 'dennis'. - Offset string `protobuf:"bytes,2,opt,name=offset" json:"offset,omitempty"` + Offset string `protobuf:"bytes,2,opt,name=offset,proto3" json:"offset,omitempty"` // SortBy is the sort field that the ListReleases server should sort data before returning. - SortBy ListSort_SortBy `protobuf:"varint,3,opt,name=sort_by,json=sortBy,enum=hapi.services.tiller.ListSort_SortBy" json:"sort_by,omitempty"` + SortBy ListSort_SortBy `protobuf:"varint,3,opt,name=sort_by,json=sortBy,proto3,enum=hapi.services.tiller.ListSort_SortBy" json:"sort_by,omitempty"` // Filter is a regular expression used to filter which releases should be listed. // // Anything that matches the regexp will be included in the results. - Filter string `protobuf:"bytes,4,opt,name=filter" json:"filter,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` // SortOrder is the ordering directive used for sorting. - SortOrder ListSort_SortOrder `protobuf:"varint,5,opt,name=sort_order,json=sortOrder,enum=hapi.services.tiller.ListSort_SortOrder" json:"sort_order,omitempty"` - StatusCodes []hapi_release3.Status_Code `protobuf:"varint,6,rep,packed,name=status_codes,json=statusCodes,enum=hapi.release.Status_Code" json:"status_codes,omitempty"` + SortOrder ListSort_SortOrder `protobuf:"varint,5,opt,name=sort_order,json=sortOrder,proto3,enum=hapi.services.tiller.ListSort_SortOrder" json:"sort_order,omitempty"` + StatusCodes []release.Status_Code `protobuf:"varint,6,rep,packed,name=status_codes,json=statusCodes,proto3,enum=hapi.release.Status_Code" json:"status_codes,omitempty"` // Namespace is the filter to select releases only from a specific namespace. - Namespace string `protobuf:"bytes,7,opt,name=namespace" json:"namespace,omitempty"` + Namespace string `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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} +} +func (m *ListReleasesRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListReleasesRequest.Unmarshal(m, b) +} +func (m *ListReleasesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListReleasesRequest.Marshal(b, m, deterministic) +} +func (dst *ListReleasesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListReleasesRequest.Merge(dst, src) +} +func (m *ListReleasesRequest) XXX_Size() int { + return xxx_messageInfo_ListReleasesRequest.Size(m) +} +func (m *ListReleasesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListReleasesRequest.DiscardUnknown(m) } -func (m *ListReleasesRequest) Reset() { *m = ListReleasesRequest{} } -func (m *ListReleasesRequest) String() string { return proto.CompactTextString(m) } -func (*ListReleasesRequest) ProtoMessage() {} -func (*ListReleasesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +var xxx_messageInfo_ListReleasesRequest proto.InternalMessageInfo func (m *ListReleasesRequest) GetLimit() int64 { if m != nil { @@ -176,7 +169,7 @@ func (m *ListReleasesRequest) GetSortOrder() ListSort_SortOrder { return ListSort_ASC } -func (m *ListReleasesRequest) GetStatusCodes() []hapi_release3.Status_Code { +func (m *ListReleasesRequest) GetStatusCodes() []release.Status_Code { if m != nil { return m.StatusCodes } @@ -192,30 +185,74 @@ func (m *ListReleasesRequest) GetNamespace() string { // ListSort defines sorting fields on a release list. type ListSort struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ListSort) Reset() { *m = ListSort{} } -func (m *ListSort) String() string { return proto.CompactTextString(m) } -func (*ListSort) ProtoMessage() {} -func (*ListSort) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +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} +} +func (m *ListSort) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListSort.Unmarshal(m, b) +} +func (m *ListSort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListSort.Marshal(b, m, deterministic) +} +func (dst *ListSort) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListSort.Merge(dst, src) +} +func (m *ListSort) XXX_Size() int { + return xxx_messageInfo_ListSort.Size(m) +} +func (m *ListSort) XXX_DiscardUnknown() { + xxx_messageInfo_ListSort.DiscardUnknown(m) +} + +var xxx_messageInfo_ListSort proto.InternalMessageInfo // ListReleasesResponse is a list of releases. type ListReleasesResponse struct { // Count is the expected total number of releases to be returned. - Count int64 `protobuf:"varint,1,opt,name=count" json:"count,omitempty"` + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // Next is the name of the next release. If this is other than an empty // string, it means there are more results. - Next string `protobuf:"bytes,2,opt,name=next" json:"next,omitempty"` + Next string `protobuf:"bytes,2,opt,name=next,proto3" json:"next,omitempty"` // Total is the total number of queryable releases. - Total int64 `protobuf:"varint,3,opt,name=total" json:"total,omitempty"` + Total int64 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` // Releases is the list of found release objects. - Releases []*hapi_release5.Release `protobuf:"bytes,4,rep,name=releases" json:"releases,omitempty"` + Releases []*release.Release `protobuf:"bytes,4,rep,name=releases,proto3" json:"releases,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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} +} +func (m *ListReleasesResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListReleasesResponse.Unmarshal(m, b) +} +func (m *ListReleasesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListReleasesResponse.Marshal(b, m, deterministic) +} +func (dst *ListReleasesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListReleasesResponse.Merge(dst, src) +} +func (m *ListReleasesResponse) XXX_Size() int { + return xxx_messageInfo_ListReleasesResponse.Size(m) +} +func (m *ListReleasesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListReleasesResponse.DiscardUnknown(m) } -func (m *ListReleasesResponse) Reset() { *m = ListReleasesResponse{} } -func (m *ListReleasesResponse) String() string { return proto.CompactTextString(m) } -func (*ListReleasesResponse) ProtoMessage() {} -func (*ListReleasesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +var xxx_messageInfo_ListReleasesResponse proto.InternalMessageInfo func (m *ListReleasesResponse) GetCount() int64 { if m != nil { @@ -238,7 +275,7 @@ func (m *ListReleasesResponse) GetTotal() int64 { return 0 } -func (m *ListReleasesResponse) GetReleases() []*hapi_release5.Release { +func (m *ListReleasesResponse) GetReleases() []*release.Release { if m != nil { return m.Releases } @@ -248,15 +285,37 @@ func (m *ListReleasesResponse) GetReleases() []*hapi_release5.Release { // GetReleaseStatusRequest is a request to get the status of a release. type GetReleaseStatusRequest struct { // Name is the name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Version is the version of the release - Version int32 `protobuf:"varint,2,opt,name=version" json:"version,omitempty"` + Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetReleaseStatusRequest) Reset() { *m = GetReleaseStatusRequest{} } -func (m *GetReleaseStatusRequest) String() string { return proto.CompactTextString(m) } -func (*GetReleaseStatusRequest) ProtoMessage() {} -func (*GetReleaseStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +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} +} +func (m *GetReleaseStatusRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetReleaseStatusRequest.Unmarshal(m, b) +} +func (m *GetReleaseStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetReleaseStatusRequest.Marshal(b, m, deterministic) +} +func (dst *GetReleaseStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetReleaseStatusRequest.Merge(dst, src) +} +func (m *GetReleaseStatusRequest) XXX_Size() int { + return xxx_messageInfo_GetReleaseStatusRequest.Size(m) +} +func (m *GetReleaseStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetReleaseStatusRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetReleaseStatusRequest proto.InternalMessageInfo func (m *GetReleaseStatusRequest) GetName() string { if m != nil { @@ -275,17 +334,39 @@ func (m *GetReleaseStatusRequest) GetVersion() int32 { // GetReleaseStatusResponse is the response indicating the status of the named release. type GetReleaseStatusResponse struct { // Name is the name of the release. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Info contains information about the release. - Info *hapi_release4.Info `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` + Info *release.Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` // Namespace the release was released into - Namespace string `protobuf:"bytes,3,opt,name=namespace" json:"namespace,omitempty"` + Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetReleaseStatusResponse) Reset() { *m = GetReleaseStatusResponse{} } -func (m *GetReleaseStatusResponse) String() string { return proto.CompactTextString(m) } -func (*GetReleaseStatusResponse) ProtoMessage() {} -func (*GetReleaseStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (m *GetReleaseStatusResponse) Reset() { *m = GetReleaseStatusResponse{} } +func (m *GetReleaseStatusResponse) String() string { return proto.CompactTextString(m) } +func (*GetReleaseStatusResponse) ProtoMessage() {} +func (*GetReleaseStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{4} +} +func (m *GetReleaseStatusResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetReleaseStatusResponse.Unmarshal(m, b) +} +func (m *GetReleaseStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetReleaseStatusResponse.Marshal(b, m, deterministic) +} +func (dst *GetReleaseStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetReleaseStatusResponse.Merge(dst, src) +} +func (m *GetReleaseStatusResponse) XXX_Size() int { + return xxx_messageInfo_GetReleaseStatusResponse.Size(m) +} +func (m *GetReleaseStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetReleaseStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetReleaseStatusResponse proto.InternalMessageInfo func (m *GetReleaseStatusResponse) GetName() string { if m != nil { @@ -294,7 +375,7 @@ func (m *GetReleaseStatusResponse) GetName() string { return "" } -func (m *GetReleaseStatusResponse) GetInfo() *hapi_release4.Info { +func (m *GetReleaseStatusResponse) GetInfo() *release.Info { if m != nil { return m.Info } @@ -311,15 +392,37 @@ func (m *GetReleaseStatusResponse) GetNamespace() string { // GetReleaseContentRequest is a request to get the contents of a release. type GetReleaseContentRequest struct { // The name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Version is the version of the release - Version int32 `protobuf:"varint,2,opt,name=version" json:"version,omitempty"` + Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetReleaseContentRequest) Reset() { *m = GetReleaseContentRequest{} } +func (m *GetReleaseContentRequest) String() string { return proto.CompactTextString(m) } +func (*GetReleaseContentRequest) ProtoMessage() {} +func (*GetReleaseContentRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{5} +} +func (m *GetReleaseContentRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetReleaseContentRequest.Unmarshal(m, b) +} +func (m *GetReleaseContentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetReleaseContentRequest.Marshal(b, m, deterministic) +} +func (dst *GetReleaseContentRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetReleaseContentRequest.Merge(dst, src) +} +func (m *GetReleaseContentRequest) XXX_Size() int { + return xxx_messageInfo_GetReleaseContentRequest.Size(m) +} +func (m *GetReleaseContentRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetReleaseContentRequest.DiscardUnknown(m) } -func (m *GetReleaseContentRequest) Reset() { *m = GetReleaseContentRequest{} } -func (m *GetReleaseContentRequest) String() string { return proto.CompactTextString(m) } -func (*GetReleaseContentRequest) ProtoMessage() {} -func (*GetReleaseContentRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +var xxx_messageInfo_GetReleaseContentRequest proto.InternalMessageInfo func (m *GetReleaseContentRequest) GetName() string { if m != nil { @@ -338,15 +441,37 @@ func (m *GetReleaseContentRequest) GetVersion() int32 { // GetReleaseContentResponse is a response containing the contents of a release. type GetReleaseContentResponse struct { // The release content - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetReleaseContentResponse) Reset() { *m = GetReleaseContentResponse{} } -func (m *GetReleaseContentResponse) String() string { return proto.CompactTextString(m) } -func (*GetReleaseContentResponse) ProtoMessage() {} -func (*GetReleaseContentResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (m *GetReleaseContentResponse) Reset() { *m = GetReleaseContentResponse{} } +func (m *GetReleaseContentResponse) String() string { return proto.CompactTextString(m) } +func (*GetReleaseContentResponse) ProtoMessage() {} +func (*GetReleaseContentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{6} +} +func (m *GetReleaseContentResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetReleaseContentResponse.Unmarshal(m, b) +} +func (m *GetReleaseContentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetReleaseContentResponse.Marshal(b, m, deterministic) +} +func (dst *GetReleaseContentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetReleaseContentResponse.Merge(dst, src) +} +func (m *GetReleaseContentResponse) XXX_Size() int { + return xxx_messageInfo_GetReleaseContentResponse.Size(m) +} +func (m *GetReleaseContentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetReleaseContentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetReleaseContentResponse proto.InternalMessageInfo -func (m *GetReleaseContentResponse) GetRelease() *hapi_release5.Release { +func (m *GetReleaseContentResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -356,41 +481,63 @@ func (m *GetReleaseContentResponse) GetRelease() *hapi_release5.Release { // UpdateReleaseRequest updates a release. type UpdateReleaseRequest struct { // The name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Chart is the protobuf representation of a chart. - Chart *hapi_chart3.Chart `protobuf:"bytes,2,opt,name=chart" json:"chart,omitempty"` + Chart *chart.Chart `protobuf:"bytes,2,opt,name=chart,proto3" json:"chart,omitempty"` // Values is a string containing (unparsed) YAML values. - Values *hapi_chart.Config `protobuf:"bytes,3,opt,name=values" json:"values,omitempty"` + Values *chart.Config `protobuf:"bytes,3,opt,name=values,proto3" json:"values,omitempty"` // dry_run, if true, will run through the release logic, but neither create - DryRun bool `protobuf:"varint,4,opt,name=dry_run,json=dryRun" json:"dry_run,omitempty"` + DryRun bool `protobuf:"varint,4,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` // DisableHooks causes the server to skip running any hooks for the upgrade. - DisableHooks bool `protobuf:"varint,5,opt,name=disable_hooks,json=disableHooks" json:"disable_hooks,omitempty"` + DisableHooks bool `protobuf:"varint,5,opt,name=disable_hooks,json=disableHooks,proto3" json:"disable_hooks,omitempty"` // Performs pods restart for resources if applicable - Recreate bool `protobuf:"varint,6,opt,name=recreate" json:"recreate,omitempty"` + Recreate bool `protobuf:"varint,6,opt,name=recreate,proto3" json:"recreate,omitempty"` // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,7,opt,name=timeout" json:"timeout,omitempty"` + Timeout int64 `protobuf:"varint,7,opt,name=timeout,proto3" json:"timeout,omitempty"` // ResetValues will cause Tiller to ignore stored values, resetting to default values. - ResetValues bool `protobuf:"varint,8,opt,name=reset_values,json=resetValues" json:"reset_values,omitempty"` + ResetValues bool `protobuf:"varint,8,opt,name=reset_values,json=resetValues,proto3" json:"reset_values,omitempty"` // wait, if true, will wait until all Pods, PVCs, and Services are in a ready state // before marking the release as successful. It will wait for as long as timeout - Wait bool `protobuf:"varint,9,opt,name=wait" json:"wait,omitempty"` + Wait bool `protobuf:"varint,9,opt,name=wait,proto3" json:"wait,omitempty"` // ReuseValues will cause Tiller to reuse the values from the last release. // This is ignored if reset_values is set. - ReuseValues bool `protobuf:"varint,10,opt,name=reuse_values,json=reuseValues" json:"reuse_values,omitempty"` + ReuseValues bool `protobuf:"varint,10,opt,name=reuse_values,json=reuseValues,proto3" json:"reuse_values,omitempty"` // Force resource update through delete/recreate if needed. - Force bool `protobuf:"varint,11,opt,name=force" json:"force,omitempty"` + Force bool `protobuf:"varint,11,opt,name=force,proto3" json:"force,omitempty"` // Description, if set, will set the description for the updated release - Description string `protobuf:"bytes,12,opt,name=description" json:"description,omitempty"` + Description string `protobuf:"bytes,12,opt,name=description,proto3" json:"description,omitempty"` // Render subchart notes if enabled - SubNotes bool `protobuf:"varint,13,opt,name=subNotes" json:"subNotes,omitempty"` + SubNotes bool `protobuf:"varint,13,opt,name=subNotes,proto3" json:"subNotes,omitempty"` // Allow deletion of new resources created in this update when update failed - CleanupOnFail bool `protobuf:"varint,14,opt,name=cleanup_on_fail,json=cleanupOnFail" json:"cleanup_on_fail,omitempty"` + CleanupOnFail bool `protobuf:"varint,14,opt,name=cleanup_on_fail,json=cleanupOnFail,proto3" json:"cleanup_on_fail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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} +} +func (m *UpdateReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateReleaseRequest.Unmarshal(m, b) +} +func (m *UpdateReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *UpdateReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateReleaseRequest.Merge(dst, src) +} +func (m *UpdateReleaseRequest) XXX_Size() int { + return xxx_messageInfo_UpdateReleaseRequest.Size(m) +} +func (m *UpdateReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateReleaseRequest.DiscardUnknown(m) } -func (m *UpdateReleaseRequest) Reset() { *m = UpdateReleaseRequest{} } -func (m *UpdateReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*UpdateReleaseRequest) ProtoMessage() {} -func (*UpdateReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +var xxx_messageInfo_UpdateReleaseRequest proto.InternalMessageInfo func (m *UpdateReleaseRequest) GetName() string { if m != nil { @@ -399,14 +546,14 @@ func (m *UpdateReleaseRequest) GetName() string { return "" } -func (m *UpdateReleaseRequest) GetChart() *hapi_chart3.Chart { +func (m *UpdateReleaseRequest) GetChart() *chart.Chart { if m != nil { return m.Chart } return nil } -func (m *UpdateReleaseRequest) GetValues() *hapi_chart.Config { +func (m *UpdateReleaseRequest) GetValues() *chart.Config { if m != nil { return m.Values } @@ -492,15 +639,37 @@ func (m *UpdateReleaseRequest) GetCleanupOnFail() bool { // UpdateReleaseResponse is the response to an update request. type UpdateReleaseResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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} +} +func (m *UpdateReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateReleaseResponse.Unmarshal(m, b) +} +func (m *UpdateReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *UpdateReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateReleaseResponse.Merge(dst, src) +} +func (m *UpdateReleaseResponse) XXX_Size() int { + return xxx_messageInfo_UpdateReleaseResponse.Size(m) +} +func (m *UpdateReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateReleaseResponse.DiscardUnknown(m) } -func (m *UpdateReleaseResponse) Reset() { *m = UpdateReleaseResponse{} } -func (m *UpdateReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*UpdateReleaseResponse) ProtoMessage() {} -func (*UpdateReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +var xxx_messageInfo_UpdateReleaseResponse proto.InternalMessageInfo -func (m *UpdateReleaseResponse) GetRelease() *hapi_release5.Release { +func (m *UpdateReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -509,32 +678,54 @@ func (m *UpdateReleaseResponse) GetRelease() *hapi_release5.Release { type RollbackReleaseRequest struct { // The name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // dry_run, if true, will run through the release logic but no create - DryRun bool `protobuf:"varint,2,opt,name=dry_run,json=dryRun" json:"dry_run,omitempty"` + DryRun bool `protobuf:"varint,2,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` // DisableHooks causes the server to skip running any hooks for the rollback - DisableHooks bool `protobuf:"varint,3,opt,name=disable_hooks,json=disableHooks" json:"disable_hooks,omitempty"` + DisableHooks bool `protobuf:"varint,3,opt,name=disable_hooks,json=disableHooks,proto3" json:"disable_hooks,omitempty"` // Version is the version of the release to deploy. - Version int32 `protobuf:"varint,4,opt,name=version" json:"version,omitempty"` + Version int32 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` // Performs pods restart for resources if applicable - Recreate bool `protobuf:"varint,5,opt,name=recreate" json:"recreate,omitempty"` + Recreate bool `protobuf:"varint,5,opt,name=recreate,proto3" json:"recreate,omitempty"` // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,6,opt,name=timeout" json:"timeout,omitempty"` + Timeout int64 `protobuf:"varint,6,opt,name=timeout,proto3" json:"timeout,omitempty"` // wait, if true, will wait until all Pods, PVCs, and Services are in a ready state // before marking the release as successful. It will wait for as long as timeout - Wait bool `protobuf:"varint,7,opt,name=wait" json:"wait,omitempty"` + Wait bool `protobuf:"varint,7,opt,name=wait,proto3" json:"wait,omitempty"` // Force resource update through delete/recreate if needed. - Force bool `protobuf:"varint,8,opt,name=force" json:"force,omitempty"` + Force bool `protobuf:"varint,8,opt,name=force,proto3" json:"force,omitempty"` // Description, if set, will set the description for the rollback - Description string `protobuf:"bytes,9,opt,name=description" json:"description,omitempty"` + Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"` // Allow deletion of new resources created in this rollback when rollback failed - CleanupOnFail bool `protobuf:"varint,10,opt,name=cleanup_on_fail,json=cleanupOnFail" json:"cleanup_on_fail,omitempty"` + CleanupOnFail bool `protobuf:"varint,10,opt,name=cleanup_on_fail,json=cleanupOnFail,proto3" json:"cleanup_on_fail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *RollbackReleaseRequest) Reset() { *m = RollbackReleaseRequest{} } -func (m *RollbackReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*RollbackReleaseRequest) ProtoMessage() {} -func (*RollbackReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +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} +} +func (m *RollbackReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RollbackReleaseRequest.Unmarshal(m, b) +} +func (m *RollbackReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RollbackReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *RollbackReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollbackReleaseRequest.Merge(dst, src) +} +func (m *RollbackReleaseRequest) XXX_Size() int { + return xxx_messageInfo_RollbackReleaseRequest.Size(m) +} +func (m *RollbackReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RollbackReleaseRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RollbackReleaseRequest proto.InternalMessageInfo func (m *RollbackReleaseRequest) GetName() string { if m != nil { @@ -608,15 +799,37 @@ func (m *RollbackReleaseRequest) GetCleanupOnFail() bool { // RollbackReleaseResponse is the response to an update request. type RollbackReleaseResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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} +} +func (m *RollbackReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RollbackReleaseResponse.Unmarshal(m, b) +} +func (m *RollbackReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RollbackReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *RollbackReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollbackReleaseResponse.Merge(dst, src) +} +func (m *RollbackReleaseResponse) XXX_Size() int { + return xxx_messageInfo_RollbackReleaseResponse.Size(m) +} +func (m *RollbackReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RollbackReleaseResponse.DiscardUnknown(m) } -func (m *RollbackReleaseResponse) Reset() { *m = RollbackReleaseResponse{} } -func (m *RollbackReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*RollbackReleaseResponse) ProtoMessage() {} -func (*RollbackReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +var xxx_messageInfo_RollbackReleaseResponse proto.InternalMessageInfo -func (m *RollbackReleaseResponse) GetRelease() *hapi_release5.Release { +func (m *RollbackReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -626,47 +839,69 @@ func (m *RollbackReleaseResponse) GetRelease() *hapi_release5.Release { // InstallReleaseRequest is the request for an installation of a chart. type InstallReleaseRequest struct { // Chart is the protobuf representation of a chart. - Chart *hapi_chart3.Chart `protobuf:"bytes,1,opt,name=chart" json:"chart,omitempty"` + Chart *chart.Chart `protobuf:"bytes,1,opt,name=chart,proto3" json:"chart,omitempty"` // Values is a string containing (unparsed) YAML values. - Values *hapi_chart.Config `protobuf:"bytes,2,opt,name=values" json:"values,omitempty"` + Values *chart.Config `protobuf:"bytes,2,opt,name=values,proto3" json:"values,omitempty"` // DryRun, if true, will run through the release logic, but neither create // a release object nor deploy to Kubernetes. The release object returned // in the response will be fake. - DryRun bool `protobuf:"varint,3,opt,name=dry_run,json=dryRun" json:"dry_run,omitempty"` + DryRun bool `protobuf:"varint,3,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` // Name is the candidate release name. This must be unique to the // namespace, otherwise the server will return an error. If it is not // supplied, the server will autogenerate one. - Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // DisableHooks causes the server to skip running any hooks for the install. - DisableHooks bool `protobuf:"varint,5,opt,name=disable_hooks,json=disableHooks" json:"disable_hooks,omitempty"` + DisableHooks bool `protobuf:"varint,5,opt,name=disable_hooks,json=disableHooks,proto3" json:"disable_hooks,omitempty"` // Namespace is the kubernetes namespace of the release. - Namespace string `protobuf:"bytes,6,opt,name=namespace" json:"namespace,omitempty"` + Namespace string `protobuf:"bytes,6,opt,name=namespace,proto3" json:"namespace,omitempty"` // Reuse_name requests that Tiller re-uses a name, instead of erroring out. - ReuseName bool `protobuf:"varint,7,opt,name=reuse_name,json=reuseName" json:"reuse_name,omitempty"` + ReuseName bool `protobuf:"varint,7,opt,name=reuse_name,json=reuseName,proto3" json:"reuse_name,omitempty"` // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,8,opt,name=timeout" json:"timeout,omitempty"` + Timeout int64 `protobuf:"varint,8,opt,name=timeout,proto3" json:"timeout,omitempty"` // wait, if true, will wait until all Pods, PVCs, and Services are in a ready state // before marking the release as successful. It will wait for as long as timeout - Wait bool `protobuf:"varint,9,opt,name=wait" json:"wait,omitempty"` - DisableCrdHook bool `protobuf:"varint,10,opt,name=disable_crd_hook,json=disableCrdHook" json:"disable_crd_hook,omitempty"` + Wait bool `protobuf:"varint,9,opt,name=wait,proto3" json:"wait,omitempty"` + DisableCrdHook bool `protobuf:"varint,10,opt,name=disable_crd_hook,json=disableCrdHook,proto3" json:"disable_crd_hook,omitempty"` // Description, if set, will set the description for the installed release - Description string `protobuf:"bytes,11,opt,name=description" json:"description,omitempty"` - SubNotes bool `protobuf:"varint,12,opt,name=subNotes" json:"subNotes,omitempty"` + Description string `protobuf:"bytes,11,opt,name=description,proto3" json:"description,omitempty"` + SubNotes bool `protobuf:"varint,12,opt,name=subNotes,proto3" json:"subNotes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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} +} +func (m *InstallReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InstallReleaseRequest.Unmarshal(m, b) +} +func (m *InstallReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InstallReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *InstallReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_InstallReleaseRequest.Merge(dst, src) +} +func (m *InstallReleaseRequest) XXX_Size() int { + return xxx_messageInfo_InstallReleaseRequest.Size(m) +} +func (m *InstallReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_InstallReleaseRequest.DiscardUnknown(m) } -func (m *InstallReleaseRequest) Reset() { *m = InstallReleaseRequest{} } -func (m *InstallReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*InstallReleaseRequest) ProtoMessage() {} -func (*InstallReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +var xxx_messageInfo_InstallReleaseRequest proto.InternalMessageInfo -func (m *InstallReleaseRequest) GetChart() *hapi_chart3.Chart { +func (m *InstallReleaseRequest) GetChart() *chart.Chart { if m != nil { return m.Chart } return nil } -func (m *InstallReleaseRequest) GetValues() *hapi_chart.Config { +func (m *InstallReleaseRequest) GetValues() *chart.Config { if m != nil { return m.Values } @@ -745,15 +980,37 @@ func (m *InstallReleaseRequest) GetSubNotes() bool { // InstallReleaseResponse is the response from a release installation. type InstallReleaseResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *InstallReleaseResponse) Reset() { *m = InstallReleaseResponse{} } -func (m *InstallReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*InstallReleaseResponse) ProtoMessage() {} -func (*InstallReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +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} +} +func (m *InstallReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InstallReleaseResponse.Unmarshal(m, b) +} +func (m *InstallReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InstallReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *InstallReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_InstallReleaseResponse.Merge(dst, src) +} +func (m *InstallReleaseResponse) XXX_Size() int { + return xxx_messageInfo_InstallReleaseResponse.Size(m) +} +func (m *InstallReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_InstallReleaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_InstallReleaseResponse proto.InternalMessageInfo -func (m *InstallReleaseResponse) GetRelease() *hapi_release5.Release { +func (m *InstallReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -763,21 +1020,43 @@ func (m *InstallReleaseResponse) GetRelease() *hapi_release5.Release { // UninstallReleaseRequest represents a request to uninstall a named release. type UninstallReleaseRequest struct { // Name is the name of the release to delete. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // DisableHooks causes the server to skip running any hooks for the uninstall. - DisableHooks bool `protobuf:"varint,2,opt,name=disable_hooks,json=disableHooks" json:"disable_hooks,omitempty"` + DisableHooks bool `protobuf:"varint,2,opt,name=disable_hooks,json=disableHooks,proto3" json:"disable_hooks,omitempty"` // Purge removes the release from the store and make its name free for later use. - Purge bool `protobuf:"varint,3,opt,name=purge" json:"purge,omitempty"` + Purge bool `protobuf:"varint,3,opt,name=purge,proto3" json:"purge,omitempty"` // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,4,opt,name=timeout" json:"timeout,omitempty"` + Timeout int64 `protobuf:"varint,4,opt,name=timeout,proto3" json:"timeout,omitempty"` // Description, if set, will set the description for the uninstalled release - Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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} +} +func (m *UninstallReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UninstallReleaseRequest.Unmarshal(m, b) +} +func (m *UninstallReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UninstallReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *UninstallReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UninstallReleaseRequest.Merge(dst, src) +} +func (m *UninstallReleaseRequest) XXX_Size() int { + return xxx_messageInfo_UninstallReleaseRequest.Size(m) +} +func (m *UninstallReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UninstallReleaseRequest.DiscardUnknown(m) } -func (m *UninstallReleaseRequest) Reset() { *m = UninstallReleaseRequest{} } -func (m *UninstallReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*UninstallReleaseRequest) ProtoMessage() {} -func (*UninstallReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +var xxx_messageInfo_UninstallReleaseRequest proto.InternalMessageInfo func (m *UninstallReleaseRequest) GetName() string { if m != nil { @@ -817,17 +1096,39 @@ func (m *UninstallReleaseRequest) GetDescription() string { // UninstallReleaseResponse represents a successful response to an uninstall request. type UninstallReleaseResponse struct { // Release is the release that was marked deleted. - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` // Info is an uninstall message - Info string `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` + Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *UninstallReleaseResponse) Reset() { *m = UninstallReleaseResponse{} } -func (m *UninstallReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*UninstallReleaseResponse) ProtoMessage() {} -func (*UninstallReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } +func (m *UninstallReleaseResponse) Reset() { *m = UninstallReleaseResponse{} } +func (m *UninstallReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*UninstallReleaseResponse) ProtoMessage() {} +func (*UninstallReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{14} +} +func (m *UninstallReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UninstallReleaseResponse.Unmarshal(m, b) +} +func (m *UninstallReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UninstallReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *UninstallReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UninstallReleaseResponse.Merge(dst, src) +} +func (m *UninstallReleaseResponse) XXX_Size() int { + return xxx_messageInfo_UninstallReleaseResponse.Size(m) +} +func (m *UninstallReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UninstallReleaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_UninstallReleaseResponse proto.InternalMessageInfo -func (m *UninstallReleaseResponse) GetRelease() *hapi_release5.Release { +func (m *UninstallReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -843,23 +1144,67 @@ func (m *UninstallReleaseResponse) GetInfo() string { // GetVersionRequest requests for version information. type GetVersionRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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} +} +func (m *GetVersionRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetVersionRequest.Unmarshal(m, b) +} +func (m *GetVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetVersionRequest.Marshal(b, m, deterministic) +} +func (dst *GetVersionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetVersionRequest.Merge(dst, src) +} +func (m *GetVersionRequest) XXX_Size() int { + return xxx_messageInfo_GetVersionRequest.Size(m) +} +func (m *GetVersionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetVersionRequest.DiscardUnknown(m) } -func (m *GetVersionRequest) Reset() { *m = GetVersionRequest{} } -func (m *GetVersionRequest) String() string { return proto.CompactTextString(m) } -func (*GetVersionRequest) ProtoMessage() {} -func (*GetVersionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } +var xxx_messageInfo_GetVersionRequest proto.InternalMessageInfo type GetVersionResponse struct { - Version *hapi_version.Version `protobuf:"bytes,1,opt,name=Version" json:"Version,omitempty"` + Version *version.Version `protobuf:"bytes,1,opt,name=Version,proto3" json:"Version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetVersionResponse) Reset() { *m = GetVersionResponse{} } -func (m *GetVersionResponse) String() string { return proto.CompactTextString(m) } -func (*GetVersionResponse) ProtoMessage() {} -func (*GetVersionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } +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} +} +func (m *GetVersionResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetVersionResponse.Unmarshal(m, b) +} +func (m *GetVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetVersionResponse.Marshal(b, m, deterministic) +} +func (dst *GetVersionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetVersionResponse.Merge(dst, src) +} +func (m *GetVersionResponse) XXX_Size() int { + return xxx_messageInfo_GetVersionResponse.Size(m) +} +func (m *GetVersionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetVersionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetVersionResponse proto.InternalMessageInfo -func (m *GetVersionResponse) GetVersion() *hapi_version.Version { +func (m *GetVersionResponse) GetVersion() *version.Version { if m != nil { return m.Version } @@ -869,15 +1214,37 @@ func (m *GetVersionResponse) GetVersion() *hapi_version.Version { // GetHistoryRequest requests a release's history. type GetHistoryRequest struct { // The name of the release. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The maximum number of releases to include. - Max int32 `protobuf:"varint,2,opt,name=max" json:"max,omitempty"` + Max int32 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetHistoryRequest) Reset() { *m = GetHistoryRequest{} } -func (m *GetHistoryRequest) String() string { return proto.CompactTextString(m) } -func (*GetHistoryRequest) ProtoMessage() {} -func (*GetHistoryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } +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} +} +func (m *GetHistoryRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetHistoryRequest.Unmarshal(m, b) +} +func (m *GetHistoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetHistoryRequest.Marshal(b, m, deterministic) +} +func (dst *GetHistoryRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetHistoryRequest.Merge(dst, src) +} +func (m *GetHistoryRequest) XXX_Size() int { + return xxx_messageInfo_GetHistoryRequest.Size(m) +} +func (m *GetHistoryRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetHistoryRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetHistoryRequest proto.InternalMessageInfo func (m *GetHistoryRequest) GetName() string { if m != nil { @@ -895,15 +1262,37 @@ func (m *GetHistoryRequest) GetMax() int32 { // GetHistoryResponse is received in response to a GetHistory rpc. type GetHistoryResponse struct { - Releases []*hapi_release5.Release `protobuf:"bytes,1,rep,name=releases" json:"releases,omitempty"` + Releases []*release.Release `protobuf:"bytes,1,rep,name=releases,proto3" json:"releases,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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} +} +func (m *GetHistoryResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetHistoryResponse.Unmarshal(m, b) +} +func (m *GetHistoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetHistoryResponse.Marshal(b, m, deterministic) +} +func (dst *GetHistoryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetHistoryResponse.Merge(dst, src) +} +func (m *GetHistoryResponse) XXX_Size() int { + return xxx_messageInfo_GetHistoryResponse.Size(m) +} +func (m *GetHistoryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetHistoryResponse.DiscardUnknown(m) } -func (m *GetHistoryResponse) Reset() { *m = GetHistoryResponse{} } -func (m *GetHistoryResponse) String() string { return proto.CompactTextString(m) } -func (*GetHistoryResponse) ProtoMessage() {} -func (*GetHistoryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } +var xxx_messageInfo_GetHistoryResponse proto.InternalMessageInfo -func (m *GetHistoryResponse) GetReleases() []*hapi_release5.Release { +func (m *GetHistoryResponse) GetReleases() []*release.Release { if m != nil { return m.Releases } @@ -913,19 +1302,41 @@ func (m *GetHistoryResponse) GetReleases() []*hapi_release5.Release { // TestReleaseRequest is a request to get the status of a release. type TestReleaseRequest struct { // Name is the name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,2,opt,name=timeout" json:"timeout,omitempty"` + Timeout int64 `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"` // cleanup specifies whether or not to attempt pod deletion after test completes - Cleanup bool `protobuf:"varint,3,opt,name=cleanup" json:"cleanup,omitempty"` + 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" json:"parallel,omitempty"` + Parallel bool `protobuf:"varint,4,opt,name=parallel,proto3" json:"parallel,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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} +} +func (m *TestReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestReleaseRequest.Unmarshal(m, b) +} +func (m *TestReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *TestReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestReleaseRequest.Merge(dst, src) +} +func (m *TestReleaseRequest) XXX_Size() int { + return xxx_messageInfo_TestReleaseRequest.Size(m) +} +func (m *TestReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TestReleaseRequest.DiscardUnknown(m) } -func (m *TestReleaseRequest) Reset() { *m = TestReleaseRequest{} } -func (m *TestReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*TestReleaseRequest) ProtoMessage() {} -func (*TestReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } +var xxx_messageInfo_TestReleaseRequest proto.InternalMessageInfo func (m *TestReleaseRequest) GetName() string { if m != nil { @@ -957,14 +1368,36 @@ func (m *TestReleaseRequest) GetParallel() bool { // TestReleaseResponse represents a message from executing a test type TestReleaseResponse struct { - Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"` - Status hapi_release1.TestRun_Status `protobuf:"varint,2,opt,name=status,enum=hapi.release.TestRun_Status" json:"status,omitempty"` + Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` + Status release.TestRun_Status `protobuf:"varint,2,opt,name=status,proto3,enum=hapi.release.TestRun_Status" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *TestReleaseResponse) Reset() { *m = TestReleaseResponse{} } -func (m *TestReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*TestReleaseResponse) ProtoMessage() {} -func (*TestReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } +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} +} +func (m *TestReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestReleaseResponse.Unmarshal(m, b) +} +func (m *TestReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *TestReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestReleaseResponse.Merge(dst, src) +} +func (m *TestReleaseResponse) XXX_Size() int { + return xxx_messageInfo_TestReleaseResponse.Size(m) +} +func (m *TestReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TestReleaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TestReleaseResponse proto.InternalMessageInfo func (m *TestReleaseResponse) GetMsg() string { if m != nil { @@ -973,11 +1406,11 @@ func (m *TestReleaseResponse) GetMsg() string { return "" } -func (m *TestReleaseResponse) GetStatus() hapi_release1.TestRun_Status { +func (m *TestReleaseResponse) GetStatus() release.TestRun_Status { if m != nil { return m.Status } - return hapi_release1.TestRun_UNKNOWN + return release.TestRun_UNKNOWN } func init() { @@ -1014,8 +1447,9 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for ReleaseService service - +// ReleaseServiceClient is the client API for ReleaseService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ReleaseServiceClient interface { // ListReleases retrieves release history. // TODO: Allow filtering the set of releases by @@ -1051,7 +1485,7 @@ func NewReleaseServiceClient(cc *grpc.ClientConn) ReleaseServiceClient { } func (c *releaseServiceClient) ListReleases(ctx context.Context, in *ListReleasesRequest, opts ...grpc.CallOption) (ReleaseService_ListReleasesClient, error) { - stream, err := grpc.NewClientStream(ctx, &_ReleaseService_serviceDesc.Streams[0], c.cc, "/hapi.services.tiller.ReleaseService/ListReleases", opts...) + stream, err := c.cc.NewStream(ctx, &_ReleaseService_serviceDesc.Streams[0], "/hapi.services.tiller.ReleaseService/ListReleases", opts...) if err != nil { return nil, err } @@ -1084,7 +1518,7 @@ func (x *releaseServiceListReleasesClient) Recv() (*ListReleasesResponse, error) func (c *releaseServiceClient) GetReleaseStatus(ctx context.Context, in *GetReleaseStatusRequest, opts ...grpc.CallOption) (*GetReleaseStatusResponse, error) { out := new(GetReleaseStatusResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetReleaseStatus", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetReleaseStatus", in, out, opts...) if err != nil { return nil, err } @@ -1093,7 +1527,7 @@ func (c *releaseServiceClient) GetReleaseStatus(ctx context.Context, in *GetRele func (c *releaseServiceClient) GetReleaseContent(ctx context.Context, in *GetReleaseContentRequest, opts ...grpc.CallOption) (*GetReleaseContentResponse, error) { out := new(GetReleaseContentResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetReleaseContent", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetReleaseContent", in, out, opts...) if err != nil { return nil, err } @@ -1102,7 +1536,7 @@ func (c *releaseServiceClient) GetReleaseContent(ctx context.Context, in *GetRel func (c *releaseServiceClient) UpdateRelease(ctx context.Context, in *UpdateReleaseRequest, opts ...grpc.CallOption) (*UpdateReleaseResponse, error) { out := new(UpdateReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/UpdateRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/UpdateRelease", in, out, opts...) if err != nil { return nil, err } @@ -1111,7 +1545,7 @@ func (c *releaseServiceClient) UpdateRelease(ctx context.Context, in *UpdateRele func (c *releaseServiceClient) InstallRelease(ctx context.Context, in *InstallReleaseRequest, opts ...grpc.CallOption) (*InstallReleaseResponse, error) { out := new(InstallReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/InstallRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/InstallRelease", in, out, opts...) if err != nil { return nil, err } @@ -1120,7 +1554,7 @@ func (c *releaseServiceClient) InstallRelease(ctx context.Context, in *InstallRe func (c *releaseServiceClient) UninstallRelease(ctx context.Context, in *UninstallReleaseRequest, opts ...grpc.CallOption) (*UninstallReleaseResponse, error) { out := new(UninstallReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/UninstallRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/UninstallRelease", in, out, opts...) if err != nil { return nil, err } @@ -1129,7 +1563,7 @@ func (c *releaseServiceClient) UninstallRelease(ctx context.Context, in *Uninsta func (c *releaseServiceClient) GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error) { out := new(GetVersionResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetVersion", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetVersion", in, out, opts...) if err != nil { return nil, err } @@ -1138,7 +1572,7 @@ func (c *releaseServiceClient) GetVersion(ctx context.Context, in *GetVersionReq func (c *releaseServiceClient) RollbackRelease(ctx context.Context, in *RollbackReleaseRequest, opts ...grpc.CallOption) (*RollbackReleaseResponse, error) { out := new(RollbackReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/RollbackRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/RollbackRelease", in, out, opts...) if err != nil { return nil, err } @@ -1147,7 +1581,7 @@ func (c *releaseServiceClient) RollbackRelease(ctx context.Context, in *Rollback func (c *releaseServiceClient) GetHistory(ctx context.Context, in *GetHistoryRequest, opts ...grpc.CallOption) (*GetHistoryResponse, error) { out := new(GetHistoryResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetHistory", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetHistory", in, out, opts...) if err != nil { return nil, err } @@ -1155,7 +1589,7 @@ func (c *releaseServiceClient) GetHistory(ctx context.Context, in *GetHistoryReq } func (c *releaseServiceClient) RunReleaseTest(ctx context.Context, in *TestReleaseRequest, opts ...grpc.CallOption) (ReleaseService_RunReleaseTestClient, error) { - stream, err := grpc.NewClientStream(ctx, &_ReleaseService_serviceDesc.Streams[1], c.cc, "/hapi.services.tiller.ReleaseService/RunReleaseTest", opts...) + stream, err := c.cc.NewStream(ctx, &_ReleaseService_serviceDesc.Streams[1], "/hapi.services.tiller.ReleaseService/RunReleaseTest", opts...) if err != nil { return nil, err } @@ -1186,8 +1620,7 @@ func (x *releaseServiceRunReleaseTestClient) Recv() (*TestReleaseResponse, error return m, nil } -// Server API for ReleaseService service - +// ReleaseServiceServer is the server API for ReleaseService service. type ReleaseServiceServer interface { // ListReleases retrieves release history. // TODO: Allow filtering the set of releases by @@ -1456,9 +1889,9 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ Metadata: "hapi/services/tiller.proto", } -func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) } +func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor_tiller_bb72ee4a42494734) } -var fileDescriptor0 = []byte{ +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, diff --git a/pkg/proto/hapi/version/version.pb.go b/pkg/proto/hapi/version/version.pb.go index 13c8568f0..869bb3a5f 100644 --- a/pkg/proto/hapi/version/version.pb.go +++ b/pkg/proto/hapi/version/version.pb.go @@ -1,15 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: hapi/version/version.proto -/* -Package version is a generated protocol buffer package. - -It is generated from these files: - hapi/version/version.proto - -It has these top-level messages: - Version -*/ package version import proto "github.com/golang/protobuf/proto" @@ -29,15 +20,37 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type Version struct { // Sem ver string for the version - SemVer string `protobuf:"bytes,1,opt,name=sem_ver,json=semVer" json:"sem_ver,omitempty"` - GitCommit string `protobuf:"bytes,2,opt,name=git_commit,json=gitCommit" json:"git_commit,omitempty"` - GitTreeState string `protobuf:"bytes,3,opt,name=git_tree_state,json=gitTreeState" json:"git_tree_state,omitempty"` + SemVer string `protobuf:"bytes,1,opt,name=sem_ver,json=semVer,proto3" json:"sem_ver,omitempty"` + GitCommit string `protobuf:"bytes,2,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"` + GitTreeState string `protobuf:"bytes,3,opt,name=git_tree_state,json=gitTreeState,proto3" json:"git_tree_state,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Version) Reset() { *m = Version{} } +func (m *Version) String() string { return proto.CompactTextString(m) } +func (*Version) ProtoMessage() {} +func (*Version) Descriptor() ([]byte, []int) { + return fileDescriptor_version_227db6d1d83f2c17, []int{0} +} +func (m *Version) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Version.Unmarshal(m, b) +} +func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Version.Marshal(b, m, deterministic) +} +func (dst *Version) XXX_Merge(src proto.Message) { + xxx_messageInfo_Version.Merge(dst, src) +} +func (m *Version) XXX_Size() int { + return xxx_messageInfo_Version.Size(m) +} +func (m *Version) XXX_DiscardUnknown() { + xxx_messageInfo_Version.DiscardUnknown(m) } -func (m *Version) Reset() { *m = Version{} } -func (m *Version) String() string { return proto.CompactTextString(m) } -func (*Version) ProtoMessage() {} -func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +var xxx_messageInfo_Version proto.InternalMessageInfo func (m *Version) GetSemVer() string { if m != nil { @@ -64,9 +77,9 @@ func init() { proto.RegisterType((*Version)(nil), "hapi.version.Version") } -func init() { proto.RegisterFile("hapi/version/version.proto", fileDescriptor0) } +func init() { proto.RegisterFile("hapi/version/version.proto", fileDescriptor_version_227db6d1d83f2c17) } -var fileDescriptor0 = []byte{ +var fileDescriptor_version_227db6d1d83f2c17 = []byte{ // 151 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x48, 0x2c, 0xc8, 0xd4, 0x2f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0x83, 0xd1, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, diff --git a/pkg/storage/driver/cfgmaps_test.go b/pkg/storage/driver/cfgmaps_test.go index d2e5e942e..1c8ed6652 100644 --- a/pkg/storage/driver/cfgmaps_test.go +++ b/pkg/storage/driver/cfgmaps_test.go @@ -15,7 +15,6 @@ package driver import ( "encoding/base64" - "reflect" "testing" "github.com/gogo/protobuf/proto" @@ -46,7 +45,7 @@ func TestConfigMapGet(t *testing.T) { t.Fatalf("Failed to get release: %s", err) } // compare fetched release with original - if !reflect.DeepEqual(rel, got) { + if !shallowReleaseEqual(rel, got) { t.Errorf("Expected {%q}, got {%q}", rel, got) } } @@ -78,7 +77,7 @@ func TestUNcompressedConfigMapGet(t *testing.T) { t.Fatalf("Failed to get release: %s", err) } // compare fetched release with original - if !reflect.DeepEqual(rel, got) { + if !shallowReleaseEqual(rel, got) { t.Errorf("Expected {%q}, got {%q}", rel, got) } } @@ -151,7 +150,7 @@ func TestConfigMapCreate(t *testing.T) { } // compare created release with original - if !reflect.DeepEqual(rel, got) { + if !shallowReleaseEqual(rel, got) { t.Errorf("Expected {%q}, got {%q}", rel, got) } } diff --git a/pkg/storage/driver/mock_test.go b/pkg/storage/driver/mock_test.go index 363d9dd5d..0d55497e7 100644 --- a/pkg/storage/driver/mock_test.go +++ b/pkg/storage/driver/mock_test.go @@ -38,6 +38,16 @@ func releaseStub(name string, vers int32, namespace string, code rspb.Status_Cod } } +func shallowReleaseEqual(r1 *rspb.Release, r2 *rspb.Release) bool { + if r1.Name != r2.Name || + r1.Namespace != r2.Namespace || + r1.Version != r2.Version || + r1.Manifest != r2.Manifest { + return false + } + return true +} + func testKey(name string, vers int32) string { return fmt.Sprintf("%s.v%d", name, vers) } diff --git a/pkg/storage/driver/secrets_test.go b/pkg/storage/driver/secrets_test.go index 0d7d1ad83..3c6c1675d 100644 --- a/pkg/storage/driver/secrets_test.go +++ b/pkg/storage/driver/secrets_test.go @@ -15,7 +15,6 @@ package driver import ( "encoding/base64" - "reflect" "testing" "github.com/gogo/protobuf/proto" @@ -46,7 +45,7 @@ func TestSecretGet(t *testing.T) { t.Fatalf("Failed to get release: %s", err) } // compare fetched release with original - if !reflect.DeepEqual(rel, got) { + if !shallowReleaseEqual(rel, got) { t.Errorf("Expected {%q}, got {%q}", rel, got) } } @@ -78,7 +77,7 @@ func TestUNcompressedSecretGet(t *testing.T) { t.Fatalf("Failed to get release: %s", err) } // compare fetched release with original - if !reflect.DeepEqual(rel, got) { + if !shallowReleaseEqual(rel, got) { t.Errorf("Expected {%q}, got {%q}", rel, got) } } @@ -151,7 +150,7 @@ func TestSecretCreate(t *testing.T) { } // compare created release with original - if !reflect.DeepEqual(rel, got) { + if !shallowReleaseEqual(rel, got) { t.Errorf("Expected {%q}, got {%q}", rel, got) } } diff --git a/pkg/version/version_test.go b/pkg/version/version_test.go index eba573533..315e3c9fe 100644 --- a/pkg/version/version_test.go +++ b/pkg/version/version_test.go @@ -39,9 +39,17 @@ func TestGetVersionProto(t *testing.T) { BuildMetadata = tt.buildMetadata GitCommit = tt.gitCommit GitTreeState = tt.gitTreeState - if versionProto := GetVersionProto(); *versionProto != tt.expected { - t.Errorf("expected Semver(%s), GitCommit(%s) and GitTreeState(%s) to be %v", tt.expected, tt.gitCommit, tt.gitTreeState, *versionProto) + if versionProto := GetVersionProto(); !versionEqual(*versionProto, tt.expected) { + t.Errorf("expected Semver(%s+%s), GitCommit(%s) and GitTreeState(%s) to be %v", tt.version, tt.buildMetadata, tt.gitCommit, tt.gitTreeState, *versionProto) } } +} +func versionEqual(v1 version.Version, v2 version.Version) bool { + if v1.SemVer != v2.SemVer || + v1.GitCommit != v2.GitCommit || + v1.GitTreeState != v2.GitTreeState { + return false + } + return true } From d45095263e47221d0f28c9dc49da18073fcc5b5f Mon Sep 17 00:00:00 2001 From: Jeff Knurek Date: Fri, 3 May 2019 09:31:53 +0200 Subject: [PATCH 41/56] remove obsolete doc file Signed-off-by: Jeff Knurek --- docs/helm/helm_get_version.md | 42 ----------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 docs/helm/helm_get_version.md diff --git a/docs/helm/helm_get_version.md b/docs/helm/helm_get_version.md deleted file mode 100644 index 36695e464..000000000 --- a/docs/helm/helm_get_version.md +++ /dev/null @@ -1,42 +0,0 @@ -## helm get version - -download the chart version for a named release - -### Synopsis - -This command fetches the chart version for a given release. - -``` -helm get version [flags] RELEASE_NAME -``` - -### Options - -``` - -h, --help help for version - --revision int32 get the named release with revision - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote -``` - -### Options inherited from parent commands - -``` - --debug enable verbose output - --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") - --host string address of Tiller. Overrides $HELM_HOST - --kube-context string name of the kubeconfig context to use - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") -``` - -### SEE ALSO - -* [helm get](helm_get.md) - download a named release - -###### Auto generated by spf13/cobra on 21-Mar-2019 From 86b970600be20d80039ea79380b894442f2bde31 Mon Sep 17 00:00:00 2001 From: Tariq Ibrahim Date: Fri, 3 May 2019 14:23:09 -0700 Subject: [PATCH 42/56] add errcheck for Digest method in sign.go Signed-off-by: Tariq Ibrahim --- pkg/provenance/sign.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/provenance/sign.go b/pkg/provenance/sign.go index 5e23c2dda..5a7626424 100644 --- a/pkg/provenance/sign.go +++ b/pkg/provenance/sign.go @@ -404,6 +404,8 @@ func DigestFile(filename string) (string, error) { // Helm uses SHA256 as its default hash for all non-cryptographic applications. func Digest(in io.Reader) (string, error) { hash := crypto.SHA256.New() - io.Copy(hash, in) + if _, err := io.Copy(hash, in); err != nil { + return "", nil + } return hex.EncodeToString(hash.Sum(nil)), nil } From 2ed42013c41e0ed192fa8f0095550097bacda63a Mon Sep 17 00:00:00 2001 From: Joshua Bussdieker Date: Fri, 26 Apr 2019 14:27:41 -0700 Subject: [PATCH 43/56] Add docs for configuring SSL using Terraform. Signed-off-by: Joshua Bussdieker --- docs/tiller_ssl.md | 2 + docs/tiller_ssl_terraform.md | 311 +++++++++++++++++++++++++++++++++++ 2 files changed, 313 insertions(+) create mode 100644 docs/tiller_ssl_terraform.md diff --git a/docs/tiller_ssl.md b/docs/tiller_ssl.md index 3d64635ae..5bb7a55c6 100644 --- a/docs/tiller_ssl.md +++ b/docs/tiller_ssl.md @@ -42,6 +42,8 @@ on getting ready within a small amount of time. For production configurations, we urge readers to read [the official documentation](https://www.openssl.org) and consult other resources. +Alternatively you can use Terraform to quickly create all the necessary certificates: [Generating Certificate Authorities and Certificates using Terraform](tiller_ssl_terraform.md). + ### Generate a Certificate Authority The simplest way to generate a certificate authority is to run two commands: diff --git a/docs/tiller_ssl_terraform.md b/docs/tiller_ssl_terraform.md new file mode 100644 index 000000000..40591e36f --- /dev/null +++ b/docs/tiller_ssl_terraform.md @@ -0,0 +1,311 @@ +# Generating Certificate Authorities and Certificates using Terraform + +It's possible to create all the necessary keys and certificates to secure Helm using +Terraform. Simply create the following file and apply it using `terraform`. + +## tiller_certs.tf + +```terraform +# Generate the Tiller CA key +resource "tls_private_key" "ca" { + algorithm = "RSA" + rsa_bits = 4096 +} + +# Generate a self signed CA certificate +resource "tls_self_signed_cert" "ca" { + key_algorithm = "${tls_private_key.ca.algorithm}" + private_key_pem = "${tls_private_key.ca.private_key_pem}" + is_ca_certificate = true + validity_period_hours = 87600 + early_renewal_hours = 8760 + + allowed_uses = [ + "v3_ca", + ] + + subject { + organization = "Tiller CA" + } +} + +# Write the CA key to file +resource "local_file" "ca_key" { + content = "${tls_private_key.ca.private_key_pem}" + filename = "${path.module}/ca.key.pem" +} + +# Write the CA cert to file +resource "local_file" "ca_cert" { + content = "${tls_self_signed_cert.ca.cert_pem}" + filename = "${path.module}/ca.cert.pem" +} + +# Generate the Tiller Server key +resource "tls_private_key" "tiller" { + algorithm = "RSA" + rsa_bits = 4096 +} + +# Generate a signing request for the Tiller Server certificate +resource "tls_cert_request" "tiller" { + key_algorithm = "${tls_private_key.tiller.algorithm}" + private_key_pem = "${tls_private_key.tiller.private_key_pem}" + + ip_addresses = [ + "127.0.0.1", + ] + + subject { + organization = "Tiller Server" + } +} + +# Write the Tiller Server key to file +resource "local_file" "tiller_key" { + content = "${tls_private_key.tiller.private_key_pem}" + filename = "${path.module}/tiller.key.pem" +} + +# Write the Tiller Server cert to file +resource "local_file" "tiller_cert" { + content = "${tls_locally_signed_cert.tiller.cert_pem}" + filename = "${path.module}/tiller.cert.pem" +} + +# Sign the Tiller Server certificate signing request +resource "tls_locally_signed_cert" "tiller" { + cert_request_pem = "${tls_cert_request.tiller.cert_request_pem}" + ca_key_algorithm = "${tls_private_key.ca.algorithm}" + ca_private_key_pem = "${tls_private_key.ca.private_key_pem}" + ca_cert_pem = "${tls_self_signed_cert.ca.cert_pem}" + validity_period_hours = 87600 + allowed_uses = [] +} + +# Generate a key for the Helm Client +resource "tls_private_key" "helm" { + algorithm = "RSA" + rsa_bits = 4096 +} + +# Generate a signing request for the Helm Client certificate +resource "tls_cert_request" "helm" { + key_algorithm = "${tls_private_key.helm.algorithm}" + private_key_pem = "${tls_private_key.helm.private_key_pem}" + + subject { + organization = "Helm Client" + } +} + +# Sign the Helm Client certificate signing request +resource "tls_locally_signed_cert" "helm" { + cert_request_pem = "${tls_cert_request.helm.cert_request_pem}" + ca_key_algorithm = "${tls_private_key.ca.algorithm}" + ca_private_key_pem = "${tls_private_key.ca.private_key_pem}" + ca_cert_pem = "${tls_self_signed_cert.ca.cert_pem}" + validity_period_hours = 87600 + allowed_uses = [] +} + +# Write the Helm Client key to file +resource "local_file" "helm_key" { + content = "${tls_private_key.helm.private_key_pem}" + filename = "${path.module}/helm.key.pem" +} + +# Write the Helm Client cert to file +resource "local_file" "helm_cert" { + content = "${tls_locally_signed_cert.helm.cert_pem}" + filename = "${path.module}/helm.cert.pem" +} +``` + +Now simply run Terraform init and apply: + +```console +$ terraform init + +Initializing provider plugins... +- Checking for available provider plugins on https://releases.hashicorp.com... +- Downloading plugin for provider "tls" (2.0.0)... +- Downloading plugin for provider "local" (1.2.1)... + +The following providers do not have any version constraints in configuration, +so the latest version was installed. + +To prevent automatic upgrades to new major versions that may contain breaking +changes, it is recommended to add version = "..." constraints to the +corresponding provider blocks in configuration, with the constraint strings +suggested below. + +* provider.local: version = "~> 1.2" +* provider.tls: version = "~> 2.0" + +Terraform has been successfully initialized! + +You may now begin working with Terraform. Try running "terraform plan" to see +any changes that are required for your infrastructure. All Terraform commands +should now work. + +If you ever set or change modules or backend configuration for Terraform, +rerun this command to reinitialize your working directory. If you forget, other +commands will detect it and remind you to do so if necessary. +``` + +```console +$ terraform apply + +An execution plan has been generated and is shown below. +Resource actions are indicated with the following symbols: + + create + +Terraform will perform the following actions: + + + local_file.ca_cert + id: + content: "${tls_self_signed_cert.ca.cert_pem}" + filename: "/home/user/ca.cert.pem" + + + local_file.ca_key + id: + content: "${tls_private_key.ca.private_key_pem}" + filename: "/home/user/ca.key.pem" + + + local_file.helm_cert + id: + content: "${tls_locally_signed_cert.helm.cert_pem}" + filename: "/home/user/helm.cert.pem" + + + local_file.helm_key + id: + content: "${tls_private_key.helm.private_key_pem}" + filename: "/home/user/helm.key.pem" + + + local_file.tiller_cert + id: + content: "${tls_locally_signed_cert.tiller.cert_pem}" + filename: "/home/user/tiller.cert.pem" + + + local_file.tiller_key + id: + content: "${tls_private_key.tiller.private_key_pem}" + filename: "/home/user/tiller.key.pem" + + + tls_cert_request.helm + id: + cert_request_pem: + key_algorithm: "RSA" + private_key_pem: "088d7282d5fd07c60edbb06a0391bbfef9ed0752" + subject.#: "1" + subject.0.organization: "Helm Client" + + + tls_cert_request.tiller + id: + cert_request_pem: + ip_addresses.#: "1" + ip_addresses.0: "127.0.0.1" + key_algorithm: "RSA" + private_key_pem: "ce4d1f657394357cb9df6394e1749953ede611c0" + subject.#: "1" + subject.0.organization: "Tiller Server" + + + tls_locally_signed_cert.helm + id: + ca_cert_pem: "67c5245fc6ca7f0c9c84221a0286253194dbb985" + ca_key_algorithm: "RSA" + ca_private_key_pem: "6c435a4a25d847452106d0271104a386d269ae6b" + cert_pem: + cert_request_pem: "e9cbcf1529e9b4532c56ae91defc2c387fbdef94" + early_renewal_hours: "0" + validity_end_time: + validity_period_hours: "87600" + validity_start_time: + + + tls_locally_signed_cert.tiller + id: + ca_cert_pem: "67c5245fc6ca7f0c9c84221a0286253194dbb985" + ca_key_algorithm: "RSA" + ca_private_key_pem: "6c435a4a25d847452106d0271104a386d269ae6b" + cert_pem: + cert_request_pem: "c7444562da59395a93599d2b6693dee3d39a6469" + early_renewal_hours: "0" + validity_end_time: + validity_period_hours: "87600" + validity_start_time: + + + tls_private_key.ca + id: + algorithm: "RSA" + ecdsa_curve: "P224" + private_key_pem: + public_key_fingerprint_md5: + public_key_openssh: + public_key_pem: + rsa_bits: "4096" + + + tls_private_key.helm + id: + algorithm: "RSA" + ecdsa_curve: "P224" + private_key_pem: + public_key_fingerprint_md5: + public_key_openssh: + public_key_pem: + rsa_bits: "4096" + + + tls_private_key.tiller + id: + algorithm: "RSA" + ecdsa_curve: "P224" + private_key_pem: + public_key_fingerprint_md5: + public_key_openssh: + public_key_pem: + rsa_bits: "4096" + + + tls_self_signed_cert.ca + id: + allowed_uses.#: "1" + allowed_uses.0: "v3_ca" + cert_pem: + early_renewal_hours: "8760" + is_ca_certificate: "true" + key_algorithm: "RSA" + private_key_pem: "6c435a4a25d847452106d0271104a386d269ae6b" + subject.#: "1" + subject.0.organization: "Tiller CA" + validity_end_time: + validity_period_hours: "87600" + validity_start_time: + + +Plan: 14 to add, 0 to change, 0 to destroy. + +Do you want to perform these actions? + Terraform will perform the actions described above. + Only 'yes' will be accepted to approve. + + Enter a value: yes + +... + +Apply complete! Resources: 14 added, 0 changed, 0 destroyed. +``` + +At this point, the important files for us are these: + +``` +# The CA. Make sure the key is kept secret. +ca.cert.pem +ca.key.pem +# The Helm client files +helm.cert.pem +helm.key.pem +# The Tiller server files. +tiller.cert.pem +tiller.key.pem +``` + +Now we're ready to move on to the next steps here: [TLS/SSL for Helm and Tiller - Creating a Custom Tiller Installation](tiller_ssl.md#creating-a-custom-tiller-installation) From aff106f97f075854c66995f597799c374df50c29 Mon Sep 17 00:00:00 2001 From: Joshua Bussdieker Date: Sun, 5 May 2019 17:53:55 -0700 Subject: [PATCH 44/56] Update to reflect location of docs Signed-off-by: Joshua Bussdieker --- docs/tiller_ssl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tiller_ssl.md b/docs/tiller_ssl.md index 5bb7a55c6..d6f207f1b 100644 --- a/docs/tiller_ssl.md +++ b/docs/tiller_ssl.md @@ -42,7 +42,7 @@ on getting ready within a small amount of time. For production configurations, we urge readers to read [the official documentation](https://www.openssl.org) and consult other resources. -Alternatively you can use Terraform to quickly create all the necessary certificates: [Generating Certificate Authorities and Certificates using Terraform](tiller_ssl_terraform.md). +There are other alternative ways to generating SSL CAs in addition to `openssl`, for example Terraform. They are not documented here but you can find links to these alternative means in Related Projects and Documentation. ### Generate a Certificate Authority From 422f0929b404a4587f396895c589992b9860ff27 Mon Sep 17 00:00:00 2001 From: Joshua Bussdieker Date: Sun, 5 May 2019 18:02:32 -0700 Subject: [PATCH 45/56] Move actual docs to another repo and update related docs list Signed-off-by: Joshua Bussdieker --- docs/related.md | 1 + docs/tiller_ssl_terraform.md | 311 ----------------------------------- 2 files changed, 1 insertion(+), 311 deletions(-) delete mode 100644 docs/tiller_ssl_terraform.md diff --git a/docs/related.md b/docs/related.md index 3f8c73d4a..4a38e68f1 100644 --- a/docs/related.md +++ b/docs/related.md @@ -19,6 +19,7 @@ or [pull request](https://github.com/helm/helm/pulls). - [Writing a Helm Chart](https://www.influxdata.com/packaged-kubernetes-deployments-writing-helm-chart/) - [A basic walk through Kubernetes Helm](https://github.com/muffin87/helm-tutorial) - [Tillerless Helm v2](https://rimusz.net/tillerless-helm/) +- [Generating Certificate Authorities and Certificates using Terraform](https://github.com/jbussdieker/tiller-ssl-terraform) ## Video, Audio, and Podcast diff --git a/docs/tiller_ssl_terraform.md b/docs/tiller_ssl_terraform.md deleted file mode 100644 index 40591e36f..000000000 --- a/docs/tiller_ssl_terraform.md +++ /dev/null @@ -1,311 +0,0 @@ -# Generating Certificate Authorities and Certificates using Terraform - -It's possible to create all the necessary keys and certificates to secure Helm using -Terraform. Simply create the following file and apply it using `terraform`. - -## tiller_certs.tf - -```terraform -# Generate the Tiller CA key -resource "tls_private_key" "ca" { - algorithm = "RSA" - rsa_bits = 4096 -} - -# Generate a self signed CA certificate -resource "tls_self_signed_cert" "ca" { - key_algorithm = "${tls_private_key.ca.algorithm}" - private_key_pem = "${tls_private_key.ca.private_key_pem}" - is_ca_certificate = true - validity_period_hours = 87600 - early_renewal_hours = 8760 - - allowed_uses = [ - "v3_ca", - ] - - subject { - organization = "Tiller CA" - } -} - -# Write the CA key to file -resource "local_file" "ca_key" { - content = "${tls_private_key.ca.private_key_pem}" - filename = "${path.module}/ca.key.pem" -} - -# Write the CA cert to file -resource "local_file" "ca_cert" { - content = "${tls_self_signed_cert.ca.cert_pem}" - filename = "${path.module}/ca.cert.pem" -} - -# Generate the Tiller Server key -resource "tls_private_key" "tiller" { - algorithm = "RSA" - rsa_bits = 4096 -} - -# Generate a signing request for the Tiller Server certificate -resource "tls_cert_request" "tiller" { - key_algorithm = "${tls_private_key.tiller.algorithm}" - private_key_pem = "${tls_private_key.tiller.private_key_pem}" - - ip_addresses = [ - "127.0.0.1", - ] - - subject { - organization = "Tiller Server" - } -} - -# Write the Tiller Server key to file -resource "local_file" "tiller_key" { - content = "${tls_private_key.tiller.private_key_pem}" - filename = "${path.module}/tiller.key.pem" -} - -# Write the Tiller Server cert to file -resource "local_file" "tiller_cert" { - content = "${tls_locally_signed_cert.tiller.cert_pem}" - filename = "${path.module}/tiller.cert.pem" -} - -# Sign the Tiller Server certificate signing request -resource "tls_locally_signed_cert" "tiller" { - cert_request_pem = "${tls_cert_request.tiller.cert_request_pem}" - ca_key_algorithm = "${tls_private_key.ca.algorithm}" - ca_private_key_pem = "${tls_private_key.ca.private_key_pem}" - ca_cert_pem = "${tls_self_signed_cert.ca.cert_pem}" - validity_period_hours = 87600 - allowed_uses = [] -} - -# Generate a key for the Helm Client -resource "tls_private_key" "helm" { - algorithm = "RSA" - rsa_bits = 4096 -} - -# Generate a signing request for the Helm Client certificate -resource "tls_cert_request" "helm" { - key_algorithm = "${tls_private_key.helm.algorithm}" - private_key_pem = "${tls_private_key.helm.private_key_pem}" - - subject { - organization = "Helm Client" - } -} - -# Sign the Helm Client certificate signing request -resource "tls_locally_signed_cert" "helm" { - cert_request_pem = "${tls_cert_request.helm.cert_request_pem}" - ca_key_algorithm = "${tls_private_key.ca.algorithm}" - ca_private_key_pem = "${tls_private_key.ca.private_key_pem}" - ca_cert_pem = "${tls_self_signed_cert.ca.cert_pem}" - validity_period_hours = 87600 - allowed_uses = [] -} - -# Write the Helm Client key to file -resource "local_file" "helm_key" { - content = "${tls_private_key.helm.private_key_pem}" - filename = "${path.module}/helm.key.pem" -} - -# Write the Helm Client cert to file -resource "local_file" "helm_cert" { - content = "${tls_locally_signed_cert.helm.cert_pem}" - filename = "${path.module}/helm.cert.pem" -} -``` - -Now simply run Terraform init and apply: - -```console -$ terraform init - -Initializing provider plugins... -- Checking for available provider plugins on https://releases.hashicorp.com... -- Downloading plugin for provider "tls" (2.0.0)... -- Downloading plugin for provider "local" (1.2.1)... - -The following providers do not have any version constraints in configuration, -so the latest version was installed. - -To prevent automatic upgrades to new major versions that may contain breaking -changes, it is recommended to add version = "..." constraints to the -corresponding provider blocks in configuration, with the constraint strings -suggested below. - -* provider.local: version = "~> 1.2" -* provider.tls: version = "~> 2.0" - -Terraform has been successfully initialized! - -You may now begin working with Terraform. Try running "terraform plan" to see -any changes that are required for your infrastructure. All Terraform commands -should now work. - -If you ever set or change modules or backend configuration for Terraform, -rerun this command to reinitialize your working directory. If you forget, other -commands will detect it and remind you to do so if necessary. -``` - -```console -$ terraform apply - -An execution plan has been generated and is shown below. -Resource actions are indicated with the following symbols: - + create - -Terraform will perform the following actions: - - + local_file.ca_cert - id: - content: "${tls_self_signed_cert.ca.cert_pem}" - filename: "/home/user/ca.cert.pem" - - + local_file.ca_key - id: - content: "${tls_private_key.ca.private_key_pem}" - filename: "/home/user/ca.key.pem" - - + local_file.helm_cert - id: - content: "${tls_locally_signed_cert.helm.cert_pem}" - filename: "/home/user/helm.cert.pem" - - + local_file.helm_key - id: - content: "${tls_private_key.helm.private_key_pem}" - filename: "/home/user/helm.key.pem" - - + local_file.tiller_cert - id: - content: "${tls_locally_signed_cert.tiller.cert_pem}" - filename: "/home/user/tiller.cert.pem" - - + local_file.tiller_key - id: - content: "${tls_private_key.tiller.private_key_pem}" - filename: "/home/user/tiller.key.pem" - - + tls_cert_request.helm - id: - cert_request_pem: - key_algorithm: "RSA" - private_key_pem: "088d7282d5fd07c60edbb06a0391bbfef9ed0752" - subject.#: "1" - subject.0.organization: "Helm Client" - - + tls_cert_request.tiller - id: - cert_request_pem: - ip_addresses.#: "1" - ip_addresses.0: "127.0.0.1" - key_algorithm: "RSA" - private_key_pem: "ce4d1f657394357cb9df6394e1749953ede611c0" - subject.#: "1" - subject.0.organization: "Tiller Server" - - + tls_locally_signed_cert.helm - id: - ca_cert_pem: "67c5245fc6ca7f0c9c84221a0286253194dbb985" - ca_key_algorithm: "RSA" - ca_private_key_pem: "6c435a4a25d847452106d0271104a386d269ae6b" - cert_pem: - cert_request_pem: "e9cbcf1529e9b4532c56ae91defc2c387fbdef94" - early_renewal_hours: "0" - validity_end_time: - validity_period_hours: "87600" - validity_start_time: - - + tls_locally_signed_cert.tiller - id: - ca_cert_pem: "67c5245fc6ca7f0c9c84221a0286253194dbb985" - ca_key_algorithm: "RSA" - ca_private_key_pem: "6c435a4a25d847452106d0271104a386d269ae6b" - cert_pem: - cert_request_pem: "c7444562da59395a93599d2b6693dee3d39a6469" - early_renewal_hours: "0" - validity_end_time: - validity_period_hours: "87600" - validity_start_time: - - + tls_private_key.ca - id: - algorithm: "RSA" - ecdsa_curve: "P224" - private_key_pem: - public_key_fingerprint_md5: - public_key_openssh: - public_key_pem: - rsa_bits: "4096" - - + tls_private_key.helm - id: - algorithm: "RSA" - ecdsa_curve: "P224" - private_key_pem: - public_key_fingerprint_md5: - public_key_openssh: - public_key_pem: - rsa_bits: "4096" - - + tls_private_key.tiller - id: - algorithm: "RSA" - ecdsa_curve: "P224" - private_key_pem: - public_key_fingerprint_md5: - public_key_openssh: - public_key_pem: - rsa_bits: "4096" - - + tls_self_signed_cert.ca - id: - allowed_uses.#: "1" - allowed_uses.0: "v3_ca" - cert_pem: - early_renewal_hours: "8760" - is_ca_certificate: "true" - key_algorithm: "RSA" - private_key_pem: "6c435a4a25d847452106d0271104a386d269ae6b" - subject.#: "1" - subject.0.organization: "Tiller CA" - validity_end_time: - validity_period_hours: "87600" - validity_start_time: - - -Plan: 14 to add, 0 to change, 0 to destroy. - -Do you want to perform these actions? - Terraform will perform the actions described above. - Only 'yes' will be accepted to approve. - - Enter a value: yes - -... - -Apply complete! Resources: 14 added, 0 changed, 0 destroyed. -``` - -At this point, the important files for us are these: - -``` -# The CA. Make sure the key is kept secret. -ca.cert.pem -ca.key.pem -# The Helm client files -helm.cert.pem -helm.key.pem -# The Tiller server files. -tiller.cert.pem -tiller.key.pem -``` - -Now we're ready to move on to the next steps here: [TLS/SSL for Helm and Tiller - Creating a Custom Tiller Installation](tiller_ssl.md#creating-a-custom-tiller-installation) From 51c99b125224093802def010a48d763ffab5b6df Mon Sep 17 00:00:00 2001 From: Joshua Bussdieker Date: Tue, 7 May 2019 03:36:56 -0700 Subject: [PATCH 46/56] Fix missing link Signed-off-by: Joshua Bussdieker --- docs/tiller_ssl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tiller_ssl.md b/docs/tiller_ssl.md index d6f207f1b..3705723fa 100644 --- a/docs/tiller_ssl.md +++ b/docs/tiller_ssl.md @@ -42,7 +42,7 @@ on getting ready within a small amount of time. For production configurations, we urge readers to read [the official documentation](https://www.openssl.org) and consult other resources. -There are other alternative ways to generating SSL CAs in addition to `openssl`, for example Terraform. They are not documented here but you can find links to these alternative means in Related Projects and Documentation. +There are other alternative ways to generating SSL CAs in addition to `openssl`, for example Terraform. They are not documented here but you can find links to these alternative means in [Related Projects and Documentation](https://helm.sh/docs/related/). ### Generate a Certificate Authority From b5582f03e6a0332f8b8957198345280f37481600 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Tue, 7 May 2019 10:43:42 -0400 Subject: [PATCH 47/56] Pinning k8s to a specific release The other Kubernetes dependencies, such as client-go and apimachinery, are pinned to 1.14.1 but Kubernetes itself was tracking the tip of the 1.14 release branch and picking up changes between releases. This change pins Kubernetes to the same version as the other parts of it. Signed-off-by: Matt Farina --- glide.lock | 6 +++--- glide.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/glide.lock b/glide.lock index 5c5671268..f485ddc12 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 8a007d8993bdffd14a1a2d674848bd085a27b09d7f177fab1dc55783059c4dce -updated: 2019-04-29T12:23:33.902435+01:00 +hash: 7571b58bbda7d85993d2b737b50d0c52f5fadce0c63e7fac064bc0a99faaefab +updated: 2019-05-07T10:43:27.329085-04:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -647,7 +647,7 @@ imports: - pkg/util/proto/testing - pkg/util/proto/validation - name: k8s.io/kubernetes - version: b8f2b772e38a15165a6247256d650e8b04178318 + version: b7394102d6ef778017f2ca4046abbaa23b88c290 subpackages: - pkg/api/legacyscheme - pkg/api/service diff --git a/glide.yaml b/glide.yaml index aeabbc724..488030fa7 100644 --- a/glide.yaml +++ b/glide.yaml @@ -51,7 +51,7 @@ import: version: 0.9.2 - package: github.com/grpc-ecosystem/go-grpc-prometheus - package: k8s.io/kubernetes - version: release-1.14 + version: v1.14.1 - package: k8s.io/client-go version: kubernetes-1.14.1 - package: k8s.io/api From 965b78433b2f8967d12c59d12745088219a688aa Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 8 May 2019 10:10:34 -0400 Subject: [PATCH 48/56] Updating OWERS to remove outdated reviewers and to reflect current case Two changes in this: 1. Remove the reviewers. These are from when Helm was under Kubernetes and used its tools. That is no longer the case so this section has no use. 2. List fibonacci1729 with the maintainers. He has been a maintainer a long time. The original listing had to do with department locations within Deis rather than his work. He has been a maintainer since before Helm was a CNCF project. Fixes #5685 Signed-off-by: Matt Farina --- OWNERS | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/OWNERS b/OWNERS index df847ab37..fcc3606c2 100644 --- a/OWNERS +++ b/OWNERS @@ -1,24 +1,11 @@ maintainers: - - adamreese - - bacongobbler - - hickeyma - - jascott1 - - mattfarina - - michelleN - - prydonius - - SlickNik - - technosophos - - thomastaylor312 - - viglesiasce -reviewers: - adamreese - bacongobbler - fibonacci1729 + - hickeyma - jascott1 - mattfarina - michelleN - - migmartri - - nebril - prydonius - SlickNik - technosophos From 4bd361746cd7c7bf9644571a903e96ad2f14f1b0 Mon Sep 17 00:00:00 2001 From: Tariq Ibrahim Date: Fri, 3 May 2019 10:08:34 -0700 Subject: [PATCH 49/56] use the latest patch release version of golang Signed-off-by: Tariq Ibrahim --- .circleci/config.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 09d49fb89..14c050746 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: working_directory: /go/src/k8s.io/helm parallelism: 3 docker: - - image: golang:1.12.2 + - image: golang:1.12.5 environment: PROJECT_NAME: "kubernetes-helm" steps: diff --git a/Makefile b/Makefile index 719fd5f03..1b5932db8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ DOCKER_REGISTRY ?= gcr.io IMAGE_PREFIX ?= kubernetes-helm -DEV_IMAGE ?= golang:1.12.2 +DEV_IMAGE ?= golang:1.12.5 SHORT_NAME ?= tiller SHORT_NAME_RUDDER ?= rudder TARGETS ?= darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le linux/s390x windows/amd64 From 85b5dcad31c6af0b4916909bdb4c7b92035badb6 Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Thu, 9 May 2019 11:15:01 -0500 Subject: [PATCH 50/56] Add ProGet as a Helm chart repository host. Signed-off-by: Ben Lubar --- docs/chart_repository.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/chart_repository.md b/docs/chart_repository.md index e3bbe3c7d..c0b3d0609 100644 --- a/docs/chart_repository.md +++ b/docs/chart_repository.md @@ -182,6 +182,10 @@ Charts repository hosts its charts, so you may want to take a You can also set up chart repositories using JFrog Artifactory. Read more about chart repositories with JFrog Artifactory [here](https://www.jfrog.com/confluence/display/RTF/Helm+Chart+Repositories) +### ProGet + +Helm chart repositories are supported by ProGet. For more information, visit the [Helm repository documentation](https://inedo.com/support/documentation/proget/feeds/helm) on the Inedo website. + ### Github Pages example In a similar way you can create charts repository using GitHub Pages. From e6d5fc933b81093050459397f011673ca83c508c Mon Sep 17 00:00:00 2001 From: Jon Huhn Date: Thu, 9 May 2019 11:19:51 -0500 Subject: [PATCH 51/56] Fix typo Signed-off-by: Jon Huhn --- cmd/helm/lint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/lint.go b/cmd/helm/lint.go index d0159d34b..746f946f2 100644 --- a/cmd/helm/lint.go +++ b/cmd/helm/lint.go @@ -166,7 +166,7 @@ func lintChart(path string, vals []byte, namespace string, strict bool) (support chartPath = path } - // Guard: Error out of this is not a chart. + // Guard: Error out if this is not a chart. if _, err := os.Stat(filepath.Join(chartPath, "Chart.yaml")); err != nil { return linter, errLintNoChart } From 5be3af65a2a90a2fee07cfcc1d619c2dcc9ba37b Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Thu, 9 May 2019 10:15:05 -0700 Subject: [PATCH 52/56] bump version to v2.14 (cherry picked from commit 2420009a75c56bba5cf77e8975f26fceb736e68a) Signed-off-by: Matthew Fisher --- pkg/version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/version/version.go b/pkg/version/version.go index 692167b83..d32f09c4a 100644 --- a/pkg/version/version.go +++ b/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.12" + Version = "v2.14" // BuildMetadata is extra build time data BuildMetadata = "unreleased" From ae0d4b151b621a2f12a9b89e75a868349a6fc80f Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Thu, 9 May 2019 14:55:17 -0700 Subject: [PATCH 53/56] fix(pkg/storage/driver): use shallowReleaseEqual() Signed-off-by: Matthew Fisher --- pkg/storage/driver/sql_test.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkg/storage/driver/sql_test.go b/pkg/storage/driver/sql_test.go index 4d669c1b5..b6aa08588 100644 --- a/pkg/storage/driver/sql_test.go +++ b/pkg/storage/driver/sql_test.go @@ -18,7 +18,6 @@ package driver import ( "fmt" - "reflect" "regexp" "testing" "time" @@ -41,7 +40,10 @@ func TestSQLGet(t *testing.T) { key := testKey(name, vers) rel := releaseStub(name, vers, namespace, rspb.Status_DEPLOYED) - body, _ := encodeRelease(rel) + body, err := encodeRelease(rel) + if err != nil { + t.Fatal(err) + } sqlDriver, mock := newTestFixtureSQL(t) mock. @@ -60,7 +62,7 @@ func TestSQLGet(t *testing.T) { t.Fatalf("Failed to get release: %v", err) } - if !reflect.DeepEqual(rel, got) { + if !shallowReleaseEqual(rel, got) { t.Errorf("Expected release {%q}, got {%q}", rel, got) } @@ -275,7 +277,7 @@ func TestSqlQuery(t *testing.T) { } for _, res := range results { - if !reflect.DeepEqual(res, deployedRelease) { + if !shallowReleaseEqual(res, deployedRelease) { t.Errorf("Expected release {%q}, got {%q}", deployedRelease, res) } } @@ -290,7 +292,7 @@ func TestSqlQuery(t *testing.T) { } for _, res := range results { - if !reflect.DeepEqual(res, deployedRelease) && !reflect.DeepEqual(res, supersededRelease) { + if !shallowReleaseEqual(res, deployedRelease) && !shallowReleaseEqual(res, supersededRelease) { t.Errorf("Expected release {%q} or {%q}, got {%q}", deployedRelease, supersededRelease, res) } } @@ -334,7 +336,7 @@ func TestSqlDelete(t *testing.T) { t.Fatalf("failed to delete release with key %q: %v", key, err) } - if !reflect.DeepEqual(rel, deletedRelease) { + if !shallowReleaseEqual(rel, deletedRelease) { t.Errorf("Expected release {%q}, got {%q}", rel, deletedRelease) } From e1b993bae8444ca73b48e7a2fd51cae1f5ace2a3 Mon Sep 17 00:00:00 2001 From: Jon Huhn Date: Thu, 9 May 2019 19:07:32 -0500 Subject: [PATCH 54/56] Fix typo Signed-off-by: Jon Huhn --- cmd/helm/lint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/lint.go b/cmd/helm/lint.go index 746f946f2..79fd7a219 100644 --- a/cmd/helm/lint.go +++ b/cmd/helm/lint.go @@ -177,7 +177,7 @@ func lintChart(path string, vals []byte, namespace string, strict bool) (support // vals merges values from files specified via -f/--values and // directly via --set or --set-string or --set-file, marshaling them to YAML // -// This func is implemented intentionally and separately from the `vals` func for the `install` and `upgrade` comammdsn. +// This func is implemented intentionally and separately from the `vals` func for the `install` and `upgrade` commands. // Compared to the alternative func, this func lacks the parameters for tls opts - ca key, cert, and ca cert. // That's because this command, `lint`, is explicitly forbidden from making server connections. func (l *lintCmd) vals() ([]byte, error) { From c4ac3833c592bddf66fccd6b475f4f690b5206c9 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Fri, 10 May 2019 12:49:15 +0100 Subject: [PATCH 55/56] Update release checklist with bumping release version Signed-off-by: Martin Hickey --- docs/release_checklist.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/release_checklist.md b/docs/release_checklist.md index bddb50ffb..4847d83fe 100644 --- a/docs/release_checklist.md +++ b/docs/release_checklist.md @@ -147,6 +147,24 @@ git add . git commit -m "bump version to $RELEASE_CANDIDATE_NAME" ``` +This will update it for the $RELEASE_BRANCH_NAME only. You will also need to pull +this change into the master branch for when the next release is being created. + +```shell +# get the last commit id i.e. commit to bump the version +git log --format="%H" -n 1 + +# create new branch off master +git checkout master +git checkout -b bump-version- + +# cherry pick the commit using id from first command +git cherry-pick -x + +# commit the change +git push upstream bump-version- +``` + ## 3. Commit and Push the Release Branch In order for others to start testing, we can now push the release branch From 3b3c8c4ab62ac6411ecffb9b7f63f4b733246b37 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Fri, 10 May 2019 15:47:37 +0100 Subject: [PATCH 56/56] Change command to push to origin remote Update review comment: - https://github.com/helm/helm/pull/5712#pullrequestreview-236124918 Signed-off-by: Martin Hickey --- docs/release_checklist.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release_checklist.md b/docs/release_checklist.md index 4847d83fe..867457830 100644 --- a/docs/release_checklist.md +++ b/docs/release_checklist.md @@ -162,7 +162,7 @@ git checkout -b bump-version- git cherry-pick -x # commit the change -git push upstream bump-version- +git push origin bump-version- ``` ## 3. Commit and Push the Release Branch