Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with agent.image map #1057

Open
tdgeery opened this issue Mar 21, 2024 · 3 comments
Open

Issues with agent.image map #1057

tdgeery opened this issue Mar 21, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@tdgeery
Copy link

tdgeery commented Mar 21, 2024

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 tdgeery added the bug Something isn't working label Mar 21, 2024
@kvanzuijlen
Copy link
Contributor

Do you have the same issue with 5.1.5?

@tdgeery
Copy link
Author

tdgeery commented Apr 12, 2024

@kvanzuijlen yes, I am still getting this error with helm chart version 5.1.5

@kvanzuijlen
Copy link
Contributor

If I copy the values you added to the issue and use them to template, I don't get the same error and the Helm Chart is templated successfully, so I cannot reproduce your issue with just the values in the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants