Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,761
    • Issues 44,761
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,332
    • Merge requests 1,332
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #335089
Closed
Open
Issue created Jul 02, 2021 by Viktor Nagy (GitLab)@nagyv-gitlab🕊Developer

Merge Kubeconfigs when both integration methods are available for a cluster/project

Proposed release notes

Starting with GitLab 14.9, GitLab agent based connections are also available when deploying to environments that already have a certificate-based cluster. Previously, migrating from a certificate-based connection to an agent-based setup required extra steps and was especially difficult for group and instance-level clusters. By presetting both Kubernetes contexts, migration is largely simplified to selecting the context provided by the agent, instead of the default context, provided by the certificate-based connection.

Problem to solve

When a project has both a certificate-based cluster and an agent CI/CD tunnel shared with it, the KUBECONFIG only includes the certificate-based cluster's context. This makes it impossible to migrate projects under group-level clusters and instance-level clusters one-by-one to an agnent-based CI/CD workflow.

Proposal

Provide a merged KUBECONFIG that includes both the old certificate-based cluster and the agent contexts.

Background

Originally raised by @marshall007:

Also note that the legacy cluster integration appears to indiscriminately set the KUBECONFIG CI variable without checking to see if it has already been defined or attempting to merge them. I think it is important that you get a merged KUBECONFIG when both integrations are enabled so we can more easily migrate projects away from the legacy cluster integration.

Edited Mar 11, 2022 by Viktor Nagy (GitLab)
Assignee
Assign to
Time tracking