1. 22 Feb, 2019 1 commit
  2. 21 Feb, 2019 1 commit
    • Thong Kuah's avatar
      Do not allow local urls in Kubernetes form · af16fd68
      Thong Kuah authored
      Use existing `public_url` validation to block various local urls. Note
      that this validation will allow local urls if the "Allow requests to the
      local network from hooks and services" admin setting is enabled.
      
      Block KubeClient from using local addresses
      
      It will also respect `allow_local_requests_from_hooks_and_services` so
      if that is enabled KubeClinet will allow local addresses
      af16fd68
  3. 15 Feb, 2019 3 commits
  4. 14 Feb, 2019 1 commit
  5. 08 Feb, 2019 1 commit
    • Tiger's avatar
      Validate kubernetes cluster CA certificate · 73e5d3a2
      Tiger authored
      No certificate is still accepted, but if one is provided it must
      be valid. Only run validation if the certificate has changed to
      avoid making existing records invalid.
      73e5d3a2
  6. 07 Feb, 2019 4 commits
  7. 06 Feb, 2019 2 commits
    • Thong Kuah's avatar
      Update version on :installed, not :installing · e72f24d2
      Thong Kuah authored
      This makes this consistent with :updated. And also avoids a potential
      issue where an install errors which means that that the recorded version
      won't necessarily reflect the version that is actually installed.
      e72f24d2
    • Thong Kuah's avatar
      Update version column after application is updated · 8ef1128f
      Thong Kuah authored
      Note: updating version column after :updating is not ideal in the
      updating -> update_erroed case. This will mean that the application now
      records the version as the version that failed to upgrade, not the
      version that it is currently on.
      8ef1128f
  8. 04 Feb, 2019 2 commits
    • Mayra Cabrera's avatar
      Addresses backend/db review comments · 087af654
      Mayra Cabrera authored
      - Fixes multiple typos on AutoDevops script
      - Add an alias to Clusters::Cluster#domain as base_domain, so it's more
      descriptive
      - Removes unnecessary memoization on qa specs
      - Changes migration to a post migration to deal better with traffic on
      big instances (like gitlab.com)
      087af654
    • Mayra Cabrera's avatar
      Moves domain setting to Cluster setting · 8ff73614
      Mayra Cabrera authored
      Changes domain field to be on the Cluster page show, removing it from
      Auto DevOps setting. Also injects the new environment variable
      KUBE_INGRESS_BASE_DOMAIN into kubernetes#predefined_variables.
      
      Migration to move the information from ProjectAutoDevops#domain
      to Clusters::Cluster#domain. As well as necessary modifications to qa
      selectors
      
      Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52363
      8ff73614
  9. 24 Jan, 2019 1 commit
  10. 22 Jan, 2019 2 commits
  11. 18 Jan, 2019 1 commit
    • Thong Kuah's avatar
      Refactor some methods in Prometheus model · d87486e6
      Thong Kuah authored
      - #update_errored? method def is redundant, already defined from state
      machine
      - #update_in_progress? moved to ApplicationStatus
      - #ready_status becomes a constant. Previously it was extended in ee/ so
      maybe that was why it's a instance method
      d87486e6
  12. 14 Jan, 2019 1 commit
    • Thong Kuah's avatar
      Port generic upgrade functionality to CE · 8296ff58
      Thong Kuah authored
      Port from EE generic upgrade related functionality used to upgrade Helm
      applications
      
      Remove memoization which could be incorrect
      
      It looks like we are memoizing without regard to the method's argument
      so this could result in an incorrect upgrade_command
      
      Remove `const_get` indirection now we are no longer in EE
      8296ff58
  13. 10 Jan, 2019 2 commits
  14. 04 Jan, 2019 2 commits
  15. 03 Jan, 2019 1 commit
  16. 02 Jan, 2019 1 commit
  17. 31 Dec, 2018 1 commit
  18. 25 Dec, 2018 1 commit
  19. 21 Dec, 2018 1 commit
  20. 19 Dec, 2018 1 commit
  21. 12 Dec, 2018 1 commit
  22. 07 Dec, 2018 2 commits
  23. 06 Dec, 2018 1 commit
  24. 04 Dec, 2018 6 commits
    • Thong Kuah's avatar
      Eager load clusters to prevent N+1 · 6c642c08
      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
      6c642c08
    • Thong Kuah's avatar
      Various improvements to hierarchy sorting · f85440e6
      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
      f85440e6
    • Thong Kuah's avatar
      Create k8s namespace for project in group clusters · d54791e0
      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
      d54791e0
    • Thong Kuah's avatar
      Teach Cluster about #all_projects · 8419b7dd
      Thong Kuah authored
      For project level, it's the project directly associated. For group
      level, it's the projects under that group.
      8419b7dd
    • Thong Kuah's avatar
      Teach Project about #all_clusters · 9c5977c8
      Thong Kuah authored
      This returns a union of the project level clusters and group level
      clusters associated with this project.
      9c5977c8
    • Thong Kuah's avatar
      Deploy to clusters for a project's groups · 5bb2814a
      Thong Kuah authored
      Look for matching clusters starting from the closest ancestor, then go
      up the ancestor tree.
      
      Then use Ruby to get clusters for each group in order. Not that
      efficient, considering we will doing up to `NUMBER_OF_ANCESTORS_ALLOWED`
      number of queries, but it's a finite number
      
      Explicitly order query by depth
      
      This allows us to control ordering explicitly and also to reverse the
      order which is useful to allow us to be consistent with
      Clusters::Cluster.on_environment (EE) which does reverse ordering.
      
      Puts querying group clusters behind Feature Flag. Just in case we have
      issues with performance, we can easily disable this
      5bb2814a