nabsul / k8s-ecr-login-renew

Renews Docker login credentials for an AWS ECR container registry.
MIT License
205 stars 49 forks source link

Installation error (CronJob.batch "XYZ" is invalid) #44

Closed axcawef closed 1 year ago

axcawef commented 1 year ago

Hi,

I am having an issue to install this chart on my cluster. Here is the values I used:

aws:
  secretKeys:
    accessKeyId: <XYZ>
    secretAccessKey: <XYZ>+<XYZ>+
  secretName: k8s-ecr-login-renew-aws-secret
awsAccessKeyId: null
awsRegion: eu-west-1
awsSecretAccessKey: null
cronjob:
  failedJobsHistoryLimit: 5
  schedule: 0 */6 * * *
  startingDeadlineSeconds: null
  successfulJobsHistoryLimit: 3
  terminationGracePeriodSeconds: 0
dockerSecretName: k8s-ecr-login-renew-docker-secret
forHelm: true
names:
  clusterRole: k8s-ecr-login-renew-role
  clusterRoleBinding: k8s-ecr-login-renew-binding
  cronJob: k8s-ecr-login-renew-cron
  job: k8s-ecr-login-renew-job
  serviceAcount: k8s-ecr-login-renew-account
podAnnotations: {}
registries: null
targetNamespace: default

When installing within Rancher GUI, I get the following error message:

helm install --generate-name=true --namespace=default --timeout=10m0s --values=/home/shell/helm/values-k8s-ecr-login-renew-1.0.2.yaml --version=1.0.2 --wait=true /home/shell/helm/k8s-ecr-login-renew-1.0.2.tgz
creating 4 resource(s)
Error: INSTALLATION FAILED: CronJob.batch "k8s-ecr-login-renew-cron" is invalid: spec.jobTemplate.spec.template.spec.containers[0].env[1].valueFrom.secretKeyRef.key: Invalid value: "<XYZ>+<XYZ>+": a valid config key must consist of alphanumeric characters, '-', '_' or '.' (e.g. 'key.name', or 'KEY_NAME', or 'key-name', regex used for validation is '[-._a-zA-Z0-9]+')

Is the reason of the error because my secretAccessKey contains "+" characters?

axcawef commented 1 year ago

Nevermind, I was able to successfully install the helm chart with the CLI directly. I think there is something wrong when using the Rancher GUI as I was doing when I got the error.