Skip to content
Snippets Groups Projects

Incorporates Kubernetes Namespace into Cluster's flow

Merged Thong Kuah requested to merge 51716-create-kube-namespace into master

What does this MR do?

Incorporates Clusters::KubernetesNamespace into clusters flow:

  • Create the namespace/service account in GCP Kubernetes, when creating a cluster
  • Create the namespace/service account in GCP Kubernetes, when adding a cluster
  • Create the namespace/service account in GCP Kubernetes, when modifying namespace
  • Replace KUBE_TOKEN and KUBECONFIG (passed to CI) with new credentials

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/51716

Does this MR meet the acceptance criteria?

Manual QA

ABAC Cluster

  • Add a Cluster
  • Check namespace/service account were created on kubernetes side
  • Install applications
  • Run AutoDevOps pipeline

RBAC Cluster

Creating cluster

  • Create Cluster
  • Check namespace/service account were created on kubernetes side
  • Install applications
  • Run AutoDevOps pipeline

Auto DevOps for ABAC

  • Switch to master branch
  • Create a cluster ABAC
  • Switch to this branch, restart GDK
  • Run Auto DevOps pipeline

Auto DevOps for RBAC

  • Switch to master branch
  • Create a cluster
  • Switch to this branch, restart GDK
  • Run Auto DevOps pipeline
Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Thong Kuah added 4 commits

    added 4 commits

    • 8ef7eb85 - Create namespace upon cluster creation/addition
    • 6713d8f8 - Extract actual_namespace logic to service
    • 063003de - squash! Create namespace upon cluster creation/addition
    • 9d01a6cb - squash! Create namespace upon cluster creation/addition

    Compare with previous version

  • Thong Kuah marked as a Work In Progress from 063003de

    marked as a Work In Progress from 063003de

  • Thong Kuah added 2 commits

    added 2 commits

    • 1dc149ba - Create namespace upon cluster creation/addition
    • d72817dc - Extract actual_namespace logic to service

    Compare with previous version

  • Thong Kuah changed the description

    changed the description

  • Thong Kuah changed the description

    changed the description

  • Author Maintainer

    For reference - runner currently fails like this when provided it fails to connect to a previously configured cluster

    Running with gitlab-runner 10.3.0 (5cf5e19a)
      on runner-gitlab-runner-76cd6bdfd6-ts8f6 (160b7484)
    Using Kubernetes namespace: gitlab-managed-apps
    Using Kubernetes executor with image docker:stable-git ...
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    Waiting for pod gitlab-managed-apps/runner-160b7484-project-9-concurrent-0fsrbx to be running, status is Pending
    ERROR: Job failed (system failure): timedout waiting for pod to start
  • Mayra Cabrera changed the description

    changed the description

  • Mayra Cabrera removed milestone

    removed milestone

  • mentioned in issue #51716 (closed)

  • Mayra Cabrera added 635 commits

    added 635 commits

    • d72817dc...1540d51a - 632 commits from branch master
    • 91ef8b2b - Allow namespace for a project / cluster to persist
    • 3905012b - Create namespace upon cluster creation/addition
    • 7e120401 - Extract actual_namespace logic to service

    Compare with previous version

  • Mayra Cabrera added 1 commit

    added 1 commit

    • bdf62d53 - Extract actual_namespace logic to service

    Compare with previous version

  • Mayra Cabrera changed the description

    changed the description

  • Mayra Cabrera marked the checklist item Changelog entry added, if necessary as completed

    marked the checklist item Changelog entry added, if necessary as completed

  • Mayra Cabrera marked the checklist item Tests added for this feature/bug as completed

    marked the checklist item Tests added for this feature/bug as completed

  • Mayra Cabrera changed the description

    changed the description

  • Mayra Cabrera changed milestone to %11.5

    changed milestone to %11.5

  • Mayra Cabrera added 1 commit

    added 1 commit

    • cc943a82 - Extract actual_namespace logic to service

    Compare with previous version

    • Resolved by Mayra Cabrera

      When cluster is already created and namespace has been created on Kubernetes cluster side, what should we do if the user edits the cluster and changes the "namespace"?

      Screen_Shot_2018-10-08_at_4.16.01_PM

      Should sync also Kubernetes cluster? (create new namespace and service account). My instinct says yes, but not sure if I'm missing something

      Edited by Mayra Cabrera
  • Mayra Cabrera changed the description

    changed the description

  • Mayra Cabrera added 1 commit

    added 1 commit

    • a8901f23 - Extract actual_namespace logic to service

    Compare with previous version

  • Mayra Cabrera marked the checklist item Create/update the namespace in db cluster_projects if Kubernetes#namespace is updated as completed

    marked the checklist item Create/update the namespace in db cluster_projects if Kubernetes#namespace is updated as completed

  • Mayra Cabrera added 1 commit

    added 1 commit

    • 2ad3909e - Extract actual_namespace logic to service

    Compare with previous version

  • Mayra Cabrera marked the checklist item Back-populate data from Clusters::Platform::Kubernetes#actual_namespace to clusters_projects#namespace as completed

    marked the checklist item Back-populate data from Clusters::Platform::Kubernetes#actual_namespace to clusters_projects#namespace as completed

  • Mayra Cabrera added 1 commit

    added 1 commit

    • 03dfe511 - WIP: Introduce ClusterKubernetesNamespace

    Compare with previous version

  • Mayra Cabrera changed the description

    changed the description

  • Mayra Cabrera changed the description

    changed the description

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading