question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configuring cloud results in a duplicate

See original GitHub issue

Your checklist for this issue

🚨 Please review the guidelines for contributing to this repository.

  • Jenkins version - 2.255

  • Plugin version - 1.43

  • OS - linux docker image

Description

Using the following configuration:

      cloud: |
        jenkins:
          clouds:
          - kubernetes:
              containerCap: 2
              containerCapStr: "2"
              jenkinsTunnel: "jenkins-agent:50000"
              jenkinsUrl: "http://jenkins:8080"
              name: "kubernetes"
              namespace: "prod-app-001-jenkins"
              serverUrl: "https://kubernetes.default"
              templates:
              - containers:
                - args: "^${computer.jnlpmac} ^${computer.name}"
                  command: "/bin/sh -c"
                  envVars:
                  - containerEnvVar:
                      key: "JENKINS_URL"
                      value: "http://jenkins.default.svc.cluster.local:8080"
                  image: "jenkins/jnlp-slave:3.27-1"
                  livenessProbe:
                    failureThreshold: 0
                    initialDelaySeconds: 0
                    periodSeconds: 0
                    successThreshold: 0
                    timeoutSeconds: 0
                  name: "jnlp"
                  resourceLimitCpu: "2"
                  resourceLimitMemory: "2Gi"
                  resourceRequestCpu: "500m"
                  resourceRequestMemory: "256Mi"
                  workingDir: "/home/jenkins"
                label: "cd-jenkins-slave "
                name: "default"
                nodeUsageMode: "NORMAL"
                serviceAccount: "default"
                yamlMergeStrategy: "override"

Results in two clouds configurations named “kubernetes” instead of altering the existing one:

clouds:
  - kubernetes:
      containerCap: 2
      containerCapStr: "2"
      jenkinsTunnel: "jenkins-agent:50000"
      jenkinsUrl: "http://jenkins:8080"
      name: "kubernetes"
      namespace: "prod-app-001-jenkins"
      serverUrl: "https://kubernetes.default"
      templates:
      - containers:
        - args: "^${computer.jnlpmac} ^${computer.name}"
          command: "/bin/sh -c"
          envVars:
          - containerEnvVar:
              key: "JENKINS_URL"
              value: "http://jenkins.default.svc.cluster.local:8080"
          image: "jenkins/jnlp-slave:3.27-1"
          livenessProbe:
            failureThreshold: 0
            initialDelaySeconds: 0
            periodSeconds: 0
            successThreshold: 0
            timeoutSeconds: 0
          name: "jnlp"
          resourceLimitCpu: "2"
          resourceLimitMemory: "2Gi"
          resourceRequestCpu: "500m"
          resourceRequestMemory: "256Mi"
          workingDir: "/home/jenkins"
        label: "cd-jenkins-slave "
        name: "default"
        nodeUsageMode: "NORMAL"
        serviceAccount: "default"
        yamlMergeStrategy: "override"
  - kubernetes:
      containerCap: 10
      containerCapStr: "10"
      jenkinsTunnel: "jenkins-agent:50000"
      jenkinsUrl: "http://jenkins:8080"
      name: "kubernetes"
      namespace: "prod-app-001-jenkins"
      podLabels:
      - key: "jenkins/jenkins-jenkins-slave"
        value: "true"
      serverUrl: "https://kubernetes.default"
      templates:
      - containers:
        - args: "^${computer.jnlpmac} ^${computer.name}"
          envVars:
          - envVar:
              key: "JENKINS_URL"
              value: "http://jenkins.prod-app-001-jenkins.svc.cluster.local:8080"
          image: "jenkins/inbound-agent:4.3-4"
          name: "jnlp"
          resourceLimitCpu: "1"
          resourceLimitMemory: "512Mi"
          resourceRequestCpu: "500m"
          resourceRequestMemory: "256Mi"
          workingDir: "/home/jenkins"
        label: "jenkins-jenkins-slave "
        name: "default"
        nodeUsageMode: "NORMAL"
        podRetention: "never"
        serviceAccount: "default"
        yamlMergeStrategy: "override"

I’m not sure if this is a JCasC issue or kubernetes issue. I believe (not too sure) that a few months ago on older jenkins and plugin versions this did not occur.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
alexgeekcommented, Sep 22, 2020

That was it, thanks @doncraig!

1reaction
alexgeekcommented, Sep 15, 2020

Seeing the same issue

Might be best to vote on the jenkins issue then.

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

[JENKINS-63687] Configuring cloud through JCasC results in ...
Configuring cloud through JCasC results in a duplicate configuration.
Read more >
Create Reports on Duplicate Records - Salesforce Help
Use duplicate record reports to fine-tune your duplicate and matching rules and share the results of duplicate jobs.Required Editions and User Permissions.
Read more >
detect duplicates in Cloud-1522333579 - DocuWare Support
Has anyone figured out a way to detect duplicate documents on a cloud system? ... Run a Search, observe the result list -...
Read more >
Adding columns to Salesforce Duplicate Management Result
The solution to this is to fake your matching rule. If the field is in the matching rule, it is displayed to the...
Read more >
Set up duplicate detection rules to keep your data clean
Select Settings > Data management > Duplicate detection rules. To create a new duplicate detection rule, choose New.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found