Multiple changes were made to pass linting. Some Go built-in names
are being used for variables (e.g., min). This happens in the Go
source itself including the Go standard library and is not always
a bad practice.
To handle allowing some built-in names to be used the linter config
is updated to allow (via opt-in) some names to pass. This allows us
to still check for re-use of Go built-in names and opt-in to any
new uses.
There were also several cases where a value was checked for nil
before checking its length when this is already handled by len()
or the types default value. These were cleaned up.
The license validation was updated because it was checking everything
in the .git directory including all remote content that was local.
The previous vendor directory was from a time prior to Go modules
when Helm handled dependencies differently. It was no longer needed.
Signed-off-by: Matt Farina <matt.farina@suse.com>
Fixes: #12584
This change makes the authorizer and registryAuthorizer of the registry client configurable via options. This allows Go SDK users to override the authentication behavior of the client.
This PR makes both the authorizer and registryAuthorizer configurable because depending on the exact scenario that may be needed. The default registryAuthorizer only supports a specific implementation of the authorizer.
Signed-off-by: Ryan Nowak <nowakra@gmail.com>
In the event some malformed folders/files make its way into the
`charts/` directory meant for subcharts, it is possible one may see an
error message like the below:
```
Error: error unpacking foo in app: Chart.yaml file is missing
```
This error is not very descriptive, as it doesn't reference where on
disk `Chart.yaml` is missing. In the event this happens, this error is
being updated to include that `Chart.yaml` is missing for the `foo`
subchart.
Without this updated error messaging, one would need to look into Helm's
codebase to troubleshoot what exactly is wrong.
Signed-off-by: Taylor Jasko <taylor@taylorjasko.com>
kubernetes might at any time throw 409 Conflict Error codes. Clients
are supposed to retry when this happens. As an example, see
kubernetes/issues/67761 where such an issues might happen when the
cluster manipulates a projects's ResourceQuotas.
Catch such Conflict Errors on createResource and deleteResource and
retry before giving up. Due to the more complex logic and focus on
kubernetes/issues/67761, this patch purposefully omits possibly
needed changes to updateResource and instead defers them to another
patch if required in the future.
Closes issue #9710
Signed-off-by: Andreas Karis <ak.karis@gmail.com>
The output of helm get metadata includes a subset of the fields contained in
the chart.Metadata struct. This change adds the values of the annotations field
and the dependencies field to the output.
Signed-off-by: Niladri Halder <niladri.halder26@gmail.com>