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

Helm and multiple kubernetes clusters #1975

Open
wrender opened this issue May 25, 2022 · 4 comments
Open

Helm and multiple kubernetes clusters #1975

wrender opened this issue May 25, 2022 · 4 comments
Labels

Comments

@wrender
Copy link

wrender commented May 25, 2022

Description

We are trying to setup one Jenkins in a kubernetes cluster, and that Jenkins will deploy and build software in multiple other kubernetes clusters as well.

Using helm with the Jenkins helm chart and values.yaml file I can't seem to figure out how to define multiple kubernetes clouds. I've tried something like:

jenkins:
  clouds:
  - kubernetes:
    jenkinsTunnel: "jenkins-agent.jenkins.svc.cluster.local:50000"
    jenkinsUrl: "http://jenkins.jenkins.svc.cluster.local:8080"
    name: "kubernetes"
    namespace: "jenkins-agents"
    podLabels:
      - key: "jenkins/jenkins-agent"
        value: "true"
    serverUrl: "https://kubernetes.default"
  - kubernetes:
    jenkinsTunnel: "myjenkins.domain.local:50000"
    jenkinsUrl: "http://myjenkins.domain.local:8080"
    name: "second-kubernetes-cluster"
    namespace: "jenkins-agents"
    podLabels:
      - key: "jenkins/jenkins-agent"
        value: "true"
    serverUrl: "https://remotecluster.blah.blah.blah"

(I can do it through the gui but then the kubernetes Jenkins pod restarts and it is gone.) Other config as code settings seem to work.

Does anyone have an example helm chart values.yaml of this? I couldnt seem to find one that shows multiple kubernetes clusters. Also not sure if I need a controller or what in each kubernetes cluster to make this work.

As well wanting to set it up so that certain kubernetes clouds are only accessible to certain Jenkins users. Ideally separated by folder.

@hervelemeur
Copy link

Did you find an example?

@wrender
Copy link
Author

wrender commented May 27, 2022

No. Seems like maybe a bug too. See here jenkinsci/helm-charts#634

@wrender wrender reopened this May 30, 2022
@jetersen
Copy link
Member

jetersen commented May 31, 2022

@mparada-suva
Copy link

No. Seems like maybe a bug too. See here jenkinsci/helm-charts#634

I made a patch that may be what you were looking for: jenkinsci/helm-charts#973

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants