Bug: `packages` break bigbang chart when not supplying `registryCredentials`
Bug
Description
Trying to use packages to deploy an arbitrary chart. Pull secrets are not always required if you are configuring your container runtime with credentials for the registry. As a result, you are forced to provide registryCredentials to the bigbang chart and generate pull secrets for package charts. Without providing them to the bigbang chart, you are given the error below which breaks the bigbang helm release:
failed: failed to create resource: Secret "private-registry" is invalid: data[.dockerconfigjson]: Invalid value: "<secret contents redacted>": unexpected end of JSON input
Provide any steps possible used to reproduce the error (ideally in an isolated fashion).
Using the default bigbang values + the example packages values:
packages:
podinfo:
git:
repo: https://github.com/stefanprodan/podinfo.git
tag: 6.3.4
path: charts/podinfo
flux:
timeout: 5m
postRenderers: []
dependsOn:
- name: monitoring
namespace: bigbang
values:
replicaCount: 3
- git checkout 2.9.0
- cd chart
- helm template bb . --values values.yaml --values packages-values.yaml
- see
private-registrysecret forpodinfo
Rendered secret:
# Source: bigbang/templates/secrets/imagepullsecret.yaml
apiVersion: v1
kind: Secret
metadata:
name: private-registry
namespace: podinfo
labels:
app.kubernetes.io/name: private-registry
app.kubernetes.io/instance: bb
app.kubernetes.io/version: 2.9.0
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: "bigbang"
helm.sh/chart: bigbang-2.9.0
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson:
Supplying registryCredentials: {} results in the same output.
Recommended Solution
private-registry Secret is not created for packages when registryCredentials are not configured
BigBang Version
2.9.0
Workaround
Supply random registryCredentials like:
registryCredentials:
registry: noop
username: "noop"
password: "noop"
email: "noop"