Commit graph

5841 commits

Author SHA1 Message Date
Matthew Fisher
e73af10d0b
Merge pull request #8696 from f0rmiga/patch-1
fix: boilerplate template indentation
2020-10-13 11:36:26 -07:00
Matt Farina
fc9b46067f
Merge pull request #8828 from zhijianli88/pipe-stderr
TestCheckPerms: utilize pipe to read stderr
2020-10-05 10:15:19 -04:00
Matt Farina
54ea21d245
Merge pull request #8830 from zhijianli88/GOBIN
Makefile: check and use GOBIN environment variable first
2020-10-02 10:46:22 -04:00
Matt Farina
6297c021cb
Merge pull request #8795 from mattfarina/feat-8767
Adding annotation to index.yaml file
2020-10-01 09:53:15 -04:00
Li Zhijian
e97975d7ad Makefile: check and use GOBIN environment variable first
'go get' will install binaries into GOBIN when it's set which is not
always same with GOPATH/bin

this commit can fix below errors:
~/workspace/k8s/helm$ go env | grep -e GOPATH -e GOBIN -e GOROO
GOBIN="/home/lizj/go/bin"
GOPATH="/home/lizj/gosrc"
GOROOT="/home/lizj/go"
~/workspace/k8s/helm$ make build-cross
(cd /; GO111MODULE=on go get -u github.com/mitchellh/gox)
go: github.com/mitchellh/gox upgrade => v1.0.1
go: github.com/hashicorp/go-version upgrade => v1.2.1
GO111MODULE=on CGO_ENABLED=0 /home/lizj/gosrc/bin/gox -parallel=3 -output="_dist/{{.OS}}-{{.Arch}}/helm" -osarch='darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le linux/s390x windows/amd64'  -tags '' -ldflags '-w -s -X helm.sh/helm/v3/internal/version.metadata=unreleased -X helm.sh/helm/v3/internal/version.gitCommit=59c77716ad61331da28c37e9430d5f6a3ab23fed -X helm.sh/helm/v3/internal/version.gitTreeState=dirty  -extldflags "-static"' ./cmd/helm
bash: /home/lizj/gosrc/bin/gox: No such file or directory
Makefile:146: recipe for target 'build-cross' failed
make: *** [build-cross] Error 127

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
2020-09-30 16:18:59 +08:00
Li Zhijian
59c77716ad TestCheckPerms: utilize pipe to read stderr
Refer to the stderr manpage:
$ man 3 stderr
*Note that mixing use of FILEs and raw file descriptors can produce unexpected results and should generally be avoided.*

And actually, we noticed that the warning() will output the message to
stdout instead of stderr sometimes.

lizj@FNSTPC:~/workspace/k8s/helm$ while true; do timeout 1m go test -count=1  -run TestCheckPerms ./cmd/helm -v 2>/dev/null; done
=== RUN   TestCheckPerms
--- PASS: TestCheckPerms (0.00s)
PASS
ok  	helm.sh/helm/v3/cmd/helm	0.028s
=== RUN   TestCheckPerms
--- PASS: TestCheckPerms (0.00s)
PASS
ok  	helm.sh/helm/v3/cmd/helm	0.027s
=== RUN   TestCheckPerms
--- PASS: TestCheckPerms (0.00s)
PASS
ok  	helm.sh/helm/v3/cmd/helm	0.028s
=== RUN   TestCheckPerms
--- PASS: TestCheckPerms (0.00s)
PASS
ok  	helm.sh/helm/v3/cmd/helm	0.029s
=== RUN   TestCheckPerms
--- PASS: TestCheckPerms (0.00s)
PASS
ok  	helm.sh/helm/v3/cmd/helm	0.029s
=== RUN   TestCheckPerms
--- PASS: TestCheckPerms (0.00s)
PASS
ok  	helm.sh/helm/v3/cmd/helm	0.028s
=== RUN   TestCheckPerms
--- PASS: TestCheckPerms (0.00s)
PASS
ok  	helm.sh/helm/v3/cmd/helm	0.030s
=== RUN   TestCheckPerms
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /tmp/helmtest093620773/testconfig
=== RUN   TestCheckPerms
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /tmp/helmtest083469215/testconfig
=== RUN   TestCheckPerms
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /tmp/helmtest101343249/testconfig
=== RUN   TestCheckPerms
--- PASS: TestCheckPerms (0.00s)
PASS
ok  	helm.sh/helm/v3/cmd/helm	0.032s
=== RUN   TestCheckPerms
--- PASS: TestCheckPerms (0.00s)
PASS
ok  	helm.sh/helm/v3/cmd/helm	0.040s
=== RUN   TestCheckPerms
--- PASS: TestCheckPerms (0.00s)
PASS
ok  	helm.sh/helm/v3/cmd/helm	0.031s
=== RUN   TestCheckPerms
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /tmp/helmtest706352639/testconfig

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
2020-09-30 15:07:05 +08:00
Matt Farina
e17500018e
Merge pull request #8824 from helm/dependabot/go_modules/github.com/sirupsen/logrus-1.7.0
Bump github.com/sirupsen/logrus from 1.6.0 to 1.7.0
2020-09-29 10:39:10 -04:00
Matt Farina
bea377bbd0
Merge pull request #8825 from helm/dependabot/go_modules/github.com/DATA-DOG/go-sqlmock-1.5.0
Bump github.com/DATA-DOG/go-sqlmock from 1.4.1 to 1.5.0
2020-09-29 10:28:44 -04:00
dependabot[bot]
b08c7d2429
Bump github.com/DATA-DOG/go-sqlmock from 1.4.1 to 1.5.0
Bumps [github.com/DATA-DOG/go-sqlmock](https://github.com/DATA-DOG/go-sqlmock) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/DATA-DOG/go-sqlmock/releases)
- [Commits](https://github.com/DATA-DOG/go-sqlmock/compare/v1.4.1...v1.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-29 06:28:13 +00:00
dependabot[bot]
2bc79d3294
Bump github.com/sirupsen/logrus from 1.6.0 to 1.7.0
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.6.0...v1.7.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-29 06:28:01 +00:00
Mikuláš Dítě
6aa54eacc5 feat(install): add requested version to error
Signed-off-by: Mikuláš Dítě <dite@mangoweb.cz>
2020-09-28 21:47:48 -04:00
Adam Reese
eefd939c6c
Merge pull request #8067 from adamreese/ref/klog-flags
ref(cmd): prevent klogs flags from polluting the help text
2020-09-28 10:35:10 -07:00
Matt Farina
c215782436
Merge pull request #8817 from helm/dependabot/go_modules/github.com/lib/pq-1.8.0
Bump github.com/lib/pq from 1.7.0 to 1.8.0
2020-09-28 10:08:14 -04:00
Matt Farina
e17f7026bd
Merge pull request #8818 from helm/dependabot/go_modules/github.com/gofrs/flock-0.8.0
Bump github.com/gofrs/flock from 0.7.1 to 0.8.0
2020-09-28 10:07:54 -04:00
dependabot[bot]
253a9500d7
Bump github.com/gofrs/flock from 0.7.1 to 0.8.0
Bumps [github.com/gofrs/flock](https://github.com/gofrs/flock) from 0.7.1 to 0.8.0.
- [Release notes](https://github.com/gofrs/flock/releases)
- [Commits](https://github.com/gofrs/flock/compare/v0.7.1...v0.8.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-28 13:28:25 +00:00
dependabot[bot]
a6e76cbbbe
Bump github.com/lib/pq from 1.7.0 to 1.8.0
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/lib/pq/releases)
- [Commits](https://github.com/lib/pq/compare/v1.7.0...v1.8.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-28 13:27:48 +00:00
Matt Farina
593fec6868
Merge pull request #8807 from mattfarina/feat-8806
Adding support for k8s 1.19
2020-09-28 09:08:55 -04:00
Martin Hickey
4e0bd3483b
Merge pull request #8811 from Hellcatlk/golint
Fix wrong function's name in comment
2020-09-28 10:23:39 +01:00
zouyu
a167b3fc87 Fix wrong function's name in comment
Signed-off-by: zouyu <zouy.fnst@cn.fujitsu.com>
2020-09-27 14:47:51 +08:00
Adam Reese
66034e4035
ref(cmd): prevent klogs flags from polluting the help text
Remove klog flags from help text.  No change to behavior.

```
...
Flags:
      --debug                      enable verbose output
  -h, --help                       help for helm
      --kube-apiserver string      the address and the port for the Kubernetes API server
      --kube-context string        name of the kubeconfig context to use
      --kube-token string          bearer token used for authentication
      --kubeconfig string          path to the kubeconfig file
  -n, --namespace string           namespace scope for this request
      --registry-config string     path to the registry config file (default "/Users/areese/.config/helm/registry.json")
      --repository-cache string    path to the file containing cached repository indexes (default "/Users/areese/.cache/helm/repository")
      --repository-config string   path to the file containing repository names and URLs (default "/Users/areese/.config/helm/repositories.yaml")
```

Signed-off-by: Adam Reese <adam@reese.io>
2020-09-25 11:16:00 -07:00
Matt Farina
b7c38c879a Adding support for k8s 1.19
Closes #8806

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-09-25 12:15:06 -04:00
Matt Farina
4c121c3085 Adding annotation to index.yaml file
Chart.yaml files have an annotation field that allow a chart to
have custom information similar to the way Kubernetes annotations
work.

In an index.yaml file each chart version can have annotations in
a similar manner to the Chart.yaml file. It is derived from the
same underlying struct.

These enable extension points where people can add their own info.

One thing missing is the ability to extend the top level of an
index file. This change adds annotations to the top level of an
index.yaml file. This would provide top level support for vendors
to extent index.yaml files.

Closes #8767

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-09-23 14:00:19 -04:00
Matthew Fisher
b0fdb5461f
Merge pull request #8244 from carlpett/report-findcharturl-error
Report what cause finding chart to fail
2020-09-23 09:00:17 -07:00
Matthew Fisher
ecea7c6964
Merge pull request #8738 from zhijianli88/wildcard
fix incorrect wildcard expand
2020-09-23 08:35:09 -07:00
Matthew Fisher
29ef2bb7fd
Merge pull request #8763 from scottrigby/fix-release-notes-links
Update links to docs in release notes script
2020-09-23 08:32:38 -07:00
Matthew Fisher
be9403f159
Merge pull request #8787 from lemonli/fix/mod-file-goversion
Update go version to 1.14 in go.mod
2020-09-23 08:29:53 -07:00
Matt Farina
254fb8968c
Merge pull request #8791 from mattfarina/fix-8779
Fixing import package issue
2020-09-22 15:51:42 -04:00
Matt Farina
036832eba9 Fixing import package issue
When #8779 was merged it introduced an issue with windows builds,
which we do not test for in PR CI. This change fixes that problem.

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-09-22 15:39:57 -04:00
Matt Farina
0d4ea9fd41
Merge pull request #8782 from mattfarina/update-lgtm-process
Adding size labels pointer
2020-09-22 15:34:23 -04:00
Matthew Fisher
03a1e8e03c
Merge pull request #8779 from bacongobbler/use-warning
use warning function
2020-09-22 11:12:53 -07:00
lemonli
3baaace868 Update go version to 1.14 in go.mod
Signed-off-by: lemonli <liwenjun0323@gmail.com>
2020-09-22 10:58:17 +08:00
Matthew Fisher
92c4bda184
use warning function
This ensures warning messages are displayed on stderr rather than stdout.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2020-09-21 15:32:53 -07:00
Matt Farina
8b546e90a9 Adding size labels pointer
Add size of labels and number of reviewers is listed twice, pointing
the area with less detail to the one with more detail.

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-09-21 15:07:20 -04:00
Matt Farina
367277afc2
Merge pull request #8777 from mattfarina/fix-8771
Fixing issue with idempotent repo add
2020-09-21 11:37:56 -04:00
Matt Farina
baf5b76a95 Fixing issue with idempotent repo add
A security issue fixed in 3.3.2 caught repos with the same name
being added a second time and produced an error. This caused an
issue for tools, such as helmfile, that will add the same name
with the same configuration multiple times.

This fix checks that the configuration on the existing and new
repo are the same. If there is no change it notes it and exists
with a 0 exit code. If there is a change the existing error is
returned (for reverse compat). If --force-update is given the
user opts in to changing the config for the name.

Closes #8771

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-09-21 10:46:00 -04:00
Matthew Fisher
2ebe95a6ff
Merge pull request #8755 from bacongobbler/size-s
size/S and larger requiring 2 LGTMs
2020-09-21 06:27:23 -07:00
Sebastian Sdorra
467bd49bb0
support passing signing passphrase from file or stdin (#8394)
Signed-off-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2020-09-18 16:23:40 -06:00
Matthew Fisher
1138def202
size/S and larger requiring 2 LGTMs
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2020-09-18 10:37:14 -07:00
Matthew Fisher
2fdd0348a2
Merge pull request #8762 from bacongobbler/chartmuseum-index
fix: allow serverInfo field on index files
2020-09-18 09:43:37 -07:00
Scott Rigby
3eeeb0345d
Update docs links in release notes script
Signed-off-by: Scott Rigby <scott@r6by.com>
2020-09-17 21:37:31 -04:00
Matthew Fisher
f19acbdc94
fix: allow serverInfo field on index files
A recent change merged into Helm fixes a number of security issues related to parsing malformed index files. Unfortunately, it also broke the ability for users to load index files from chartmuseum, which adds a "server info" field to add additional metadata.

This commit adds that field so that index files from chartmuseum can be validated. Since Helm does not use this field for anything, the information is discarded and unused.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2020-09-17 15:00:28 -07:00
Adam Reese
5d5ef1d611
Merge pull request #8759 from adamreese/fix/go-build-tags
fix(cmd/helm): add build tags for architecture
2020-09-17 11:50:59 -07:00
Adam Reese
45d230fcc9
fix(cmd/helm): add build tags for architecture
Signed-off-by: Adam Reese <adam@reese.io>
2020-09-17 11:46:22 -07:00
Matthew Fisher
d9ef5ce8ba
Merge pull request from GHSA-c52f-pq47-2r9j
switched to stricter YAML parsing on plugin metadata files
2020-09-17 11:44:07 -07:00
Matthew Fisher
6eeec4a002
switched to stricter YAML parsing on plugin metadata files
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2020-09-17 11:38:28 -07:00
Matt Butcher
809e2d999e
Merge pull request from GHSA-m54r-vrmv-hw33
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-09-17 12:35:10 -06:00
Matt Butcher
055dd41cbe
Merge pull request from GHSA-jm56-5h66-w453
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-09-17 12:33:59 -06:00
Matt Butcher
59d5b94d35
Merge pull request from GHSA-9vp5-m38w-j776 2020-09-17 12:31:23 -06:00
Matthew Fisher
aa5431ab71
Merge pull request #8751 from technosophos/fix/helm-create-overwrite
fixed bug that caused helm create to not overwrite modified files
2020-09-17 11:12:21 -07:00
Matthew Fisher
2a74204508
go fmt
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
2020-09-17 11:09:37 -07:00