Skip to content

GitLab Next

    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Menu
    Projects Groups Snippets
  • Get a free trial
  • Sign up
  • Login
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 43,107
    • Issues 43,107
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,355
    • Merge requests 1,355
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & 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.org
  • GitLabGitLab
  • Issues
  • #31519
Closed
Open
Created Sep 03, 2019 by Téo Auguste Goddet@teo.goddet

gitlab provided $KUBECONFIG in ci is not following $KUBE_NAMESPACE

Summary

kubernetes account provided in KUBECONFIG is not in the right namespace when setting namespace with KUBE_NAMESPACE in CI settings

Steps to reproduce

Add a RBAC enabled kubernetes cluster to your project

Set up $KUBE_NAMESPACE to whatever existing namespace in your kubernetes cluster. image

set up a CI stage with an environment : image

and try to apply a file in the cluster : kubectl apply -f ./file.yml --namespace $KUBE_NAMESPACE

What is the current bug behavior?

image user provided in $KUBECONFIG has no edit right in the $KUBE_NAMESPACE

image

and $KUBECONFIG content : image

What is the expected correct behavior?

image

namespace should be $KUBE_NAMESPACE and this token should have edit rights in $KUBE_NAMESPACE

Relevant logs and/or screenshots

see previous screenshots

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

This bug happens on GitLab.com

Results of GitLab application Check

This bug happens on GitLab.com

Possible fixes

Edited Sep 03, 2019 by Téo Auguste Goddet
Assignee
Assign to
Time tracking