helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

Issues with agent.image map

Open tdgeery opened this issue 11 months ago • 3 comments

Describe the bug

Upgrading to latest 5.1.3 helm chart getting errors with image block helpers

Error: UPGRADE FAILED: template: jenkins/templates/jcasc-config.yaml:43:8: executing "jenkins/templates/jcasc-config.yaml" at <include "jenkins.casc.defaults" .>: error calling include: template: jenkins/templates/_helpers.tpl:200:12: executing "jenkins.casc.defaults" at <include "jenkins.casc.podTemplate" $>: error calling include: template: jenkins/templates/_helpers.tpl:369:22: executing "jenkins.casc.podTemplate" at <.Values.agent.image.repository>: can't evaluate field repository in type interface {}

Version of Helm and Kubernetes

- Helm: v3.14.3
- Kubernetes: v1.29.1-gke.1589017

Chart version

5.1.3

What happened?

1. Updated my values with updated deprecations to image blocks
2. When running helm upgrade get the above error
3. If I set .Values.agent.enabled = false, the error disappears

What you expected to happen?

No response

How to reproduce it

helm upgrade -f ../artifacts/rendered-values.yaml jenkins-dev jenkins/jenkins -n jenkins --version 5.1.3

Anything else we need to know?

here's my values for agent:

agent:
  TTYEnabled: false
  additionalContainers: []
  alwaysPullImage: false
  annotations:
    cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
  command: null
  componentName: jenkins-agent
  connectTimeout: 100
  containerCap: 10
  customJenkinsLabels: []
  defaultsProviderTemplate: ""
  directConnection: false
  disableDefaultAgent: false
  enabled: true
  envVars: []
  hostNetworking: false
  idleMinutes: 0
  image:
    repository: jenkins/inbound-agent
    tag: 3206.vb_15dcf73f6a_9-3
  imagePullSecretName: registry-image-pull-secret
  jenkinsTunnel: null
  jenkinsUrl: https://jenkins.example.com
  jnlpregistry: docker-hub.example.com
  kubernetesConnectTimeout: 5
  kubernetesReadTimeout: 15
  livenessProbe: {}
  maxRequestsPerHostStr: "32"
  namespace: jenkins-agents
  nodeSelector: {}
  nodeUsageMode: NORMAL
  podLabels: {}
  podName: default
  podRetention: Never
  podTemplates: {}
  privileged: false
  resources:
    limits:
      cpu: null
      memory: 4Gi
    requests:
      cpu: "2"
      memory: 4Gi
  restrictedPssSecurityContext: false
  retentionTimeout: 5
  runAsGroup: null
  runAsUser: null
  secretEnvVars: []
  showRawYaml: true
  sideContainerName: jnlp
  volumes: []
  waitForPodSec: 600
  websocket: false
  workingDir: /home/jenkins/agent
  workspaceVolume: {}
  yamlMergeStrategy: merge
  yamlTemplate: ""

tdgeery avatar Mar 21 '24 23:03 tdgeery