Commit Graph

958 Commits

Author SHA1 Message Date
Yusuke Kuoka 3267484f47 Documentation site based on mkdocs and Read the Docs
Ref https://github.com/roboll/helmfile/issues/1824
Ref https://github.com/roboll/helmfile/issues/1755
2022-04-03 05:04:54 +00:00
Yusuke Kuoka 498a976efb Add stale bot config
Ref https://github.com/roboll/helmfile/issues/1824
2022-04-03 02:48:01 +00:00
Yusuke Kuoka f6fac3ff32 Add an experimental GitHub Actions workflow for CI
All the credits goes to @itscaro's work at https://github.com/roboll/helmfile/pull/2084. The only change I made is related to the main branch rename.
2022-04-03 02:29:34 +00:00
Yusuke Kuoka 19ba9d2c4d Merge remote-tracking branch 'origin/master' into main 2022-04-03 02:26:35 +00:00
Yusuke Kuoka 1e41817c63
Create FUNDING.yml 2022-04-03 11:18:04 +09:00
yxxhero d4a7b3bfff
fix little issue (#2126)
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-04-03 09:16:59 +09:00
Yusuke Kuoka be5af8e3b7
Enhance support for kube-version and api-versions (#2121)
This adds support for `kube-version` and `api-versions` to be available to `chartify` so that it works even if your release requires `chartify` due to that you use features like `forceNamespace`, `jsonPatches`, `strategicMergePatches`, and so on.

This also enhances `ReleaseSpec` which corresponds to each item of `releases[]` in your `helmfile.yaml` to also accept `kubeVersion` and `apiVersions`, in addition to the top-level `kubeVersion` and `apiVersions` we have today.

The top-level ones works as the default values for release-specific ones. If you have been using the top-level ones, keep using it. It is backward-compatible. If you want to specify it per release, because, for example, your releases are deployed across clusters(in case you differentiate `kubeContext` fields), try the new fields added to the release spec.

Resolves #1864
2022-03-31 11:02:36 +09:00
Quan TRAN ed436ba68b
Add template function isFile (#2045)
* Add template function isFile

* Update context_funcs.go
2022-03-31 10:59:10 +09:00
Quan TRAN 45be24da53
Add .StateValues as alias of .Values in EnvironmentTemplateData (#2056) 2022-03-31 10:57:33 +09:00
qb-abdul 4716320d99
Update README.md (#2105)
Added examples in Readme.md for fetching values from Remote
2022-03-31 10:54:25 +09:00
Yusuke Kuoka 9b621b3d21
Bump chartify to v0.9.5 (#2119)
This release of chartify fixes a single bug in chartify that resulted in a few issues when your chart had dependencies. One of issues is the mysterious "no cached repository for helm-manager-HASH found" error mentioned in https://github.com/variantdev/chartify/pull/31. Another is #2117 which was due to the bug resulted in rendering some resources, CRDs in the case, twice.

See https://github.com/variantdev/chartify/releases/tag/v0.9.5 for more information.
2022-03-29 09:45:00 +09:00
yxxhero a8784a17ed
precheck for make test (#2116)
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-03-27 12:21:36 +09:00
yxxhero cabaf15a1a
update go for 1.14 to 1.17 (#2115)
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-03-27 12:21:00 +09:00
Yusuke Kuoka 04c379b284
Bump chartify to v0.9.4 (#2114)
This release fixes an issue when you tried to chartify a local chart whose directory name does not match the name of the chart defined in Chart.yaml.

See https://github.com/variantdev/chartify/releases/tag/v0.9.4 for more information.
2022-03-25 09:37:31 +09:00
Yusuke Kuoka 742391357a Fix release job by limiting gox parallelism 2022-03-24 02:18:27 +00:00
Yusuke Kuoka f65d1e6b05
Bump chartify to v0.9.3 (#2113)
This release fixes a few issues, including a regression introduced in the previous version of chartify v0.9.2.

See https://github.com/variantdev/chartify/releases/tag/v0.9.3 for more information.
2022-03-24 10:36:01 +09:00
Yusuke Kuoka 185bc82992
Bump chartify to v0.9.2 (#2102)
This should fix a few issues, most notably that adhoc dependencies breaks when some of original chart dependencies are unresolvable with `helm dep up` and/or `helm dep build`.

https://github.com/variantdev/chartify/releases/tag/v0.9.2
2022-03-14 19:25:08 +09:00
Anton Bretting b1928e585d
Stop panic when deduplicating releases (#2067)
* Stop panic when deduplicating releases
* Add testdata for new testcases
2022-03-10 18:57:58 +09:00
Yusuke Kuoka dbc40f68b8
Make release template to work on `needs` (#2099)
It turned out that Helmfile has never had support for release template on `needs`.
This adds that, along with the new end-to-end test suite to verify helmfile template output with snapshot testing involving a real `helmfile build` command.

Ref #2098
2022-03-10 18:42:55 +09:00
Anton Bretting 0105ed4df3
Allow more characters in label selectors (#2064)
Label selectors also allows ".", "/" and "+" now

Fixes #970
2022-03-09 20:38:29 +09:00
Yohan Belval 1d4d67fd56
Update USERS.md (#2089)
Added ShareGate to the list of companies that happily use helmfile in production 👍
2022-03-09 20:35:42 +09:00
Quan TRAN 700a89f3ff
add integration tests for helm v3.8.0 (#2085) 2022-02-15 09:37:09 +09:00
Anton Bretting 2f04831817
Fix various golangci-lint errors (#2059) 2022-02-12 20:28:08 +09:00
Quan TRAN 9a2df3c0a2 add example to demonstrate remote helmfiles & remote charts
Signed-off-by: Quan TRAN <account@itscaro.me>
2022-02-12 17:52:52 +09:00
Quan TRAN baafe702b2 use user cache directory for remote helmfiles
Signed-off-by: Quan TRAN <account@itscaro.me>
2022-02-12 17:52:52 +09:00
Quan TRAN 242e601898 add subcommands `cache info` `cache cleanup`
Signed-off-by: Quan TRAN <account@itscaro.me>
2022-02-12 17:52:52 +09:00
Quan TRAN cf02442591 goGetterChart() downloads to user cache dir instead of working dir 2022-02-12 17:52:52 +09:00
Quan TRAN 766b03047c
Enable get() to be used with alias $.StateValues (#2081) 2022-02-09 09:18:46 +09:00
Sören Jentzsch 19927fc147
feat: Add --suppress option for diff and apply commands (#2077) 2022-02-03 08:46:39 +09:00
Yusuke Kuoka 061644c5d0
Fix readdir regression while merging (#2061)
Ref https://github.com/roboll/helmfile/pull/2058#issuecomment-1019439394
2022-01-23 20:37:46 +09:00
Nils 1d70130ab9
Fix ReadDir templating function to respect base path (#2058)
Ref https://github.com/roboll/helmfile/pull/1934#issuecomment-1018663764
2022-01-23 12:20:56 +09:00
drivelikebrazil debd3c0eea
Add `--skip-tests` to helmfile template command (#2057)
* Add skip-tests to helmfile template command

* Fix formatting
2022-01-22 15:26:17 +09:00
Yusuke Kuoka 87e5903705 Stop infinite loop of deleting/creating tag on release 2022-01-10 09:07:06 +00:00
Yusuke Kuoka 9e9a90f8ef
Fix panic on normalizing path containing .. (#2042)
Fixes #2039
2022-01-10 17:45:44 +09:00
Quan TRAN c069fbf268
add cleanup to write-values & lint to harmonise this flag (#2021) 2022-01-10 17:32:02 +09:00
Christoph Petrausch 346e318fd0
Correct enabled property in helmfile list (#1921)
Use the value of the `condition` field instead of the `installed` field of a release in the `enabled` column of helmfile list.
The value of the `installed` field is shown in a new `installed` column.

Fixes #1920

Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-01-10 17:24:07 +09:00
Nils 753de35ee0
Add readDir as a templating function (#1934)
Adds a new templating function called `readDir`. With `readDir` users can read the contents of a specified directory and get a list of all contained files. This is useful when reading a bunch of files from a directory. The following example shows a snippet of a values file for configuring a Logstash deployment. Using only `readFile`, a user must specify each file by hand and adjust this list as the number of files to be read grows.
```yaml
logstash:
  configs:
    logstash.yml: |
      {{- tpl (readFile "config/logstash.yml.gotmpl") . | nindent 6 }}
    jvm.options: |
      {{- readFile "config/jvm.options" | nindent 6 }}
    pipelines.yml: |
      {{- readFile "config/pipelines.yml" | nindent 6 }}
  pipelines:
    beats-log4j.conf: |
      {{- readFile "config/pipelines/beats-log4j.conf" | nindent 6 }}
    nginx-access.conf: |
      {{- readFile "config/pipelines/nginx-access.conf" | nindent 6 }}
    nginx-error.conf: |
      {{- readFile "config/pipelines/nginx-error.conf" | nindent 6 }}
    syslog-logs.conf: |
      {{- readFile "config/pipelines/syslog-logs.conf" | nindent 6 }}
    tcp-logs.conf: |
      {{- readFile "config/pipelines/tcp-logs.conf" | nindent 6 }}
    udp-debug.conf: |
      {{- readFile "config/pipelines/udp-debug.conf" | nindent 6 }}
    udp-logs.conf: |
      {{- readFile "config/pipelines/udp-logs.conf" | nindent 6 }}
  certificates:
    ca.crt: |
      {{- readFile "config/certificates/ca.crt" | nindent 6 }}
    logstash.crt: |
      {{- readFile "config/certificates/logstash.crt" | nindent 6 }}
    logstash.key: |
      {{- readFile "config/certificates/logstash.key" | nindent 6 }}
```
With `readDir` the above snippet can be rewritten as follows:
```yaml
logstash:
  configs:
  {{- range readDir "config" }}
    {{ base . }}: |
      {{- if hasSuffix "gotmpl" . }}
          {{- tpl (readFile .) $ | nindent 6 }}
      {{- else }}
          {{- readFile . | nindent 6 }}
      {{- end }}
  {{- end }}
  pipelines:
  {{- range readDir "config/pipelines" }}
    {{ base . }}: |
      {{- readFile . | nindent 6 }}
  {{- end }}
  certificates:
  {{- range readDir "config/certificates" }}
    {{ base . }}: |
      {{- readFile . | nindent 6 }}
  {{- end }}
```
2022-01-10 17:22:24 +09:00
Samo Jelovšek 16f19613fb
Set postsync and cleanup error (#2009)
Fixes #1272
2022-01-10 17:11:13 +09:00
Graeme Gillies 8bdf377be0
Bump sprig library to v3.2.1 (#1880)
Fixes #1646

This will allow us to use the new `fromJson` and `mustFromJson` functions
among others.

Co-authored-by: Graeme Gillies <ggillies@gitlab.com>
2022-01-10 17:04:08 +09:00
aperigault 9e58082342
Allow users other than root to use helm plugins (#1766)
Resolves #1134

Co-authored-by: Antony Perigault <antony.perigault@cpexterne.org>
2022-01-10 16:55:00 +09:00
Luke Plausin 4d01eddd3d
Added example ArgoCD + helmfile deployment (#1882) 2022-01-10 16:44:47 +09:00
Yusuke Kuoka 91aa0acddb
Update README.md
Relates to #2002
2022-01-10 16:37:02 +09:00
Yusuke Kuoka 1735fb5bed
Bump helm-diff to version 3.3.1 (#2041)
helm-diff 3.3.1 adds a new option `HELM_DIFF_THREE_WAY_MERGE=true` which enables the use of there-way merge for diff, which is expected to fix #2013
2022-01-10 16:21:14 +09:00
Mårten Svantesson fe8a176db5
feat: Option to pass kubeVersion to helm template (#2002) 2022-01-07 09:05:03 +09:00
Micah Huber 94f99536c6
support apple silicon builds (#2032) 2022-01-07 09:02:30 +09:00
Simon Caron 578c559640
Bumped go-getter to v1.5.9 (#1982)
Co-authored-by: Simon Caron <simon.caron@protonmail.com>
2022-01-07 09:00:29 +09:00
Travis Truman b101f9ff8d
Fix capitalization of disableOpenAPIValidation config in README (#2003)
See https://github.com/roboll/helmfile/blob/master/pkg/state/state.go#L220
2022-01-07 08:59:49 +09:00
Quan TRAN 170e29a558
bump to go 1.17.3 with alpine 3.13 (#2024)
* bump to go 1.17.5

* bump to go 1.17.3 for circleci

* use alping 3.15 & helm 3.7.2

* use golang 1.17.3 and alpine 3.13 instead

because of this issue: https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0#faccessat2
2022-01-07 08:58:54 +09:00
Ian Muge 554cbc19f5
upgrade vals allowing for the use of the AzureRM terraform backend (#2029) 2022-01-07 08:57:33 +09:00
Babis K d34dc7bb64
Add support for --insecure-skip-tls-verify flag on helm repo add command (#1990)
Parses a new field in repositories named `skipTLSVerify` and if set to `true`, it appends `--insecure-skip-tls-verify` in `helm repo add` command.

This should be useful with internal self-signed repos, mitm proxies etc.

Resolves #1871
2021-12-21 09:18:57 +09:00