Commit Graph

980 Commits

Author SHA1 Message Date
Hidde Beydals 16320c73f1 build: update Go to 1.16.12
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-12-10 12:24:34 +01:00
Hidde Beydals 9ee4377746
Merge pull request #519 from fluxcd/release-v0.19.2 2021-12-09 15:31:12 +01:00
Hidde Beydals 981d457d97 Release v0.19.2
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-12-09 15:11:12 +01:00
Hidde Beydals ddad549828
Merge pull request #517 from cwyl02/default-observed-generation 2021-12-09 14:49:03 +01:00
York Chen 9eab99fe00 crds: set default observedGeneration to -1
This ensures the resources aren't marked as Healthy prematurely
by tools as e.g. kstatus. Which will now report a status of
`InProgress` instead of `Ready`.

Signed-off-by: York Chen <ychen@d2iq.com>
2021-12-09 14:19:09 +01:00
Stefan Prodan bb6794cf34
Merge pull request #518 from pjbgf/security-advisories
Update github.com/opencontainers/runc to v1.0.3 (fix CVE-2021-43784)
2021-12-09 12:57:54 +02:00
Paulo Gomes 058788b623
Bump dependencies to patch security advisories
Advisories fixed:
github.com/opencontainers/runc: CVE-2021-43784 GO-2021-0085 GO-2021-0087

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2021-12-09 10:11:34 +00:00
Stefan Prodan cfa72ad526
Merge pull request #514 from jonathan-innis/change-bucket-jsonpath
Change bucket JSONPath from URL to endpoint
2021-12-05 09:48:12 +02:00
Jonathan Innis 8870a0b3af Change bucket JSONPath from url to endpoint
Signed-off-by: Jonathan Innis <jonathan.innis.ji@gmail.com>
2021-12-04 15:15:49 -08:00
Hidde Beydals e08f091ad2
Merge pull request #511 from fluxcd/release-v0.19.1 2021-12-03 13:56:28 +01:00
Hidde Beydals 865523a077 Release v0.19.1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-12-03 13:40:09 +01:00
Hidde Beydals 50f930a11b
Merge pull request #507 from fluxcd/chart-meta-short-sha 2021-12-03 09:35:53 +01:00
Hidde Beydals 5ddeb0934f controllers: use short SHA in chart SemVer meta
As the full version can be used as a label value, the full SHA from the
reference takes up too much space from the 63 characters available in
total.

To mitigate against this, we now take a "short" version of the first 12
characters, which was still unique for the Linux kernel in 2019 with
875.000 commits:
http://git-scm.com/book/en/v2/Git-Tools-Revision-Selection#Short-SHA-1

This should be sufficient to safely detect all changes within the
context of operations.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-12-02 22:28:18 +01:00
Hidde Beydals 59dc602b2d
Merge pull request #499 from fluxcd/release-v0.19.0 2021-11-23 10:50:44 +01:00
Hidde Beydals 30ae5565cb Release v0.19.0
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-23 10:32:02 +01:00
Hidde Beydals 5419849f7c
Merge pull request #503 from fluxcd/helm-validate-metadata 2021-11-23 10:29:18 +01:00
Hidde Beydals fb0d7f24c8 internal/helm: validate loaded chart metadata obj
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-23 10:14:00 +01:00
Hidde Beydals 750b10e57b
Merge pull request #501 from fluxcd/static-pickups 2021-11-23 10:07:06 +01:00
Hidde Beydals 6cadb04cbd main: remove redundant else
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-23 09:51:44 +01:00
Hidde Beydals ab089ddb07 libgit2: use `bytes.Equal` instead of `.Compare`
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-23 09:51:44 +01:00
Hidde Beydals 9c1c8149a5 sourceignore: return err of nested load
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-23 09:51:44 +01:00
Hidde Beydals 16d4a4899b internal/helm: ensure err is checked before defer
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-23 09:51:44 +01:00
Hidde Beydals c793cd59da controllers: record suspension for HelmRepository
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-23 09:51:44 +01:00
Hidde Beydals 905602bdfe controllers: return err on auth dir create failure
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-23 09:51:44 +01:00
Hidde Beydals dbbef5add8 controllers: use `time.Since`
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-23 09:51:44 +01:00
Hidde Beydals baae990aea
Merge pull request #502 from fluxcd/metadata-load-validation 2021-11-23 09:51:36 +01:00
Hidde Beydals ee1cb49b0c internal/helm: check size of meta files in package
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-23 09:35:27 +01:00
Hidde Beydals 87c7c80e0a internal/helm: validate package while loading meta
There was an unfinished code path that should have continued validating
the paths within the package. This commit completes it.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-23 09:35:27 +01:00
Hidde Beydals 131c074a21
Merge pull request #500 from fluxcd/helmchart-cache-path 2021-11-23 06:59:27 +01:00
Hidde Beydals 6a8b5889f1 controllers: absolute local path for cached chart
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-22 22:10:31 +01:00
Stefan Prodan 5701b7945f
Merge pull request #498 from fluxcd/update-deps
Update github.com/minio/minio-go to `v7.0.15`
2021-11-22 17:48:55 +02:00
Hidde Beydals cd7da9df8c Drop deprecated `io/ioutil`
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-22 16:31:25 +01:00
Hidde Beydals 78f4bdc8f6 Update github.com/minio/minio-go to `v7.0.15`
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-22 16:27:10 +01:00
Stefan Prodan de09b6ee9b Update controller-runtime to v0.10.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-22 14:36:43 +01:00
Hidde Beydals c31bb0f069
Merge pull request #495 from fluxcd/acl-api 2021-11-22 12:02:24 +01:00
Stefan Prodan 058a016a60 Add ACL optional field to Source API
Cherry-picked from 525be388ec.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-22 11:41:55 +01:00
Hidde Beydals e15e0ac6b8
Merge pull request #496 from fluxcd/readme-patch 2021-11-22 11:41:44 +01:00
Hidde Beydals 852a2ae5e8 Update test shield link
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-22 11:40:18 +01:00
Hidde Beydals d776221681
Merge pull request #494 from darkowlzz/helmchart-e2e-test-val-merge 2021-11-22 11:40:07 +01:00
Sunny 144766d03c
controllers: Fix helmchart values file merge test
Test case "Setting valid valuesFile attribute" and the tests around it
aren't isolated and most of the time pass because of the results from
the previous tests being re-read as the test expectation match the
previous test results. Failures are very rare to reproduce, even in
the CI they aren't seen but it failed very frequently on my computer,
especially this specific case because unlike the other cases, there is
just one file to be merged, which invalidates the chart result from
the previous cases.
In order to ensure the test wait for the chart to be updated by its
action and not by any other previous updates, status condition message
seems to be the most reliable way, as it also contains the paths of the
files that were merged.
With this change, I could no longer reproduce the failure on my
computer.
Reordering the tests makes this issue more clear.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2021-11-22 15:46:02 +05:30
Hidde Beydals d5e05983f8
Merge pull request #485 from fluxcd/helmchart-reconciler-dev 2021-11-22 10:30:33 +01:00
Hidde Beydals 2392326ba9 internal/helm: doc block nitpicks
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-19 17:16:20 +01:00
Hidde Beydals 88ff049ab0 internal/helm: ensure cached chart name matches
This helps detect e.g. path or chart name reference changes.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-19 17:04:00 +01:00
Hidde Beydals 472eb12f43 controllers: set generation as version metadata
By providing the Generation of the object that is getting reconciled
as version metadata to the builder if any custom values files are
defined, the Artifact revision changes if the specification does,
ensuring consumers of the Artifact are able to react to changes in
values (and perform a release).

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-19 17:04:00 +01:00
Hidde Beydals c202ad59aa helm/internal: add `ErrChartReference`
This makes it possible to signal reference (validation) errors
happening before the build process actually starts dealing with
the chart.

At present, this does not have a more specific counterpart in the API,
but this is expected to change when the conditions logic is revised.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-19 17:04:00 +01:00
Hidde Beydals dcd5dd3db1 internal/helm: various nitpicks
- Add some more documentation around chart builders
- Ensure correct indentation in some doc comments
- Provide example of using `errors.Is` for typed `BuildError`
- Mention "bytes" in file size limit errors
- Add missing copyright header

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-19 17:04:00 +01:00
Hidde Beydals 4de8f1f862 Allow configuration of Helm file limits
This allows custom configuration of the Helm file read limits, allowing
a user to overwrite them to their likenings if the defaults are too
restrictive for their specific setup using arguments:

`--helm-{index,chart,chart-file}-max-size`

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-19 17:04:00 +01:00
Hidde Beydals a1e9302b7d internal/helm: "value files" -> "values files"
Previous usage while consistent, was incorrect, and inconsitent with
the field in the API spec.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-19 17:04:00 +01:00
Sunny 37ac5a9679 internal/helm: test load funcs for max size cases
This includes a change of the defaults to more acceptible (higher)
values.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2021-11-19 17:04:00 +01:00
Hidde Beydals 2b8134ce20 internal/helm: introduce typed BuildError
This commit introduces a typed `BuildError` to be returned by
`Builder.Build` in case of a failure.

The `Reason` field in combination with `BuildErrorReason` can be used
to signal (or determine) the reason of a returned error within the
context of the build process.

At present this is used to determine the correct Condition Reason, but
in a future iteration this can be used to determine the negative
polarity condition that should be set to indicate a precise failure to
the user.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-19 17:04:00 +01:00