This instance will be upgraded to Heptapod 0.31.0 on 2022-05-19 at 11:00 UTC+2 (a few minutes of down time)

  1. 06 Dec, 2018 7 commits
  2. 05 Dec, 2018 23 commits
  3. 04 Dec, 2018 10 commits
    • Thong Kuah's avatar
      Shift to class methods for RefreshService · 4fa6ca0a9180
      Thong Kuah authored
      As we don't use any instance attributes and we don't seem to have any
      commonalities between the cluster and the project variant.
      4fa6ca0a9180
    • Thong Kuah's avatar
      Rename to CreateOrUpdateServiceAccountService · ba1682bf5bdb
      Thong Kuah authored
      This reflects how we now create or update
      ba1682bf5bdb
    • Thong Kuah's avatar
      Rename to CreateOrUpdateServiceAccountService · b9541e5da5d2
      Thong Kuah authored
      This reflects how we now create or update
      b9541e5da5d2
    • Thong Kuah's avatar
      DRY up refresh service · dbe7d0b815c0
      Thong Kuah authored
      The two pieces of code are identical so use a private method
      dbe7d0b815c0
    • Thong Kuah's avatar
      Eager load clusters to prevent N+1 · e568fe03f401
      Thong Kuah authored
      This also means we need to apply the `current_scope` otherwise this
      method will return all clusters associated with the groups regardless of
      any scopes applied to this method
      e568fe03f401
    • Thong Kuah's avatar
      Unify into :group_clusters feature flag · 8954128c2d2d
      Thong Kuah authored
      With this MR, group clusters is now functional, so default to enabled.
      
      Have a single setting on the root ancestor group to enabled or disable
      group clusters feature as a whole
      8954128c2d2d
    • Thong Kuah's avatar
      Various improvements to hierarchy sorting · 25aaac800b56
      Thong Kuah authored
      - Rename ordered_group_clusters_for_project ->
      ancestor_clusters_for_clusterable
      - Improve name of order option. It makes much more sense to have `hierarchy_order: :asc`
      and `hierarchy_order: :desc`
      - Allow ancestor_clusters_for_clusterable for group
      - Re-use code already present in Project
      25aaac800b56
    • Thong Kuah's avatar
      Create k8s namespace for project in group clusters · afce416eb849
      Thong Kuah authored
      AFAIK the only relevant place is Projects::CreateService, this gets
      called when user creates a new project, forks a new project and does
      those things via the api.
      
      Also create k8s namespace for new group hierarchy
      when transferring project between groups
      
      Uses new Refresh service to create k8s namespaces
      
      - Ensure we use Cluster#cluster_project
      
      If a project has multiple clusters (EE), using Project#cluster_project
      is not guaranteed to return the cluster_project for this cluster. So
      switch to using Cluster#cluster_project - at this stage a cluster can
      only have 1 cluster_project.
      
      Also, remove rescue so that sidekiq can retry
      afce416eb849
    • Thong Kuah's avatar
      Teach Cluster about #all_projects · 0232c657fd39
      Thong Kuah authored
      For project level, it's the project directly associated. For group
      level, it's the projects under that group.
      0232c657fd39
    • Thong Kuah's avatar
      Teach Project about #all_clusters · c3bafafd4301
      Thong Kuah authored
      This returns a union of the project level clusters and group level
      clusters associated with this project.
      c3bafafd4301