1. 27 Jun, 2019 5 commits
    • Thong Kuah's avatar
      Use #cluster for prometheus_adapter · 04af6132
      Thong Kuah authored
      We still fallback to environment.deployment_platform until we can
      backfill
      04af6132
    • Thong Kuah's avatar
      Drop fallback to deployment platform · 4615dca1
      Thong Kuah authored
      All deployments should have already their cluster_id filled in on
      creation. Legacy deployments will not be retried as:-
      
      * Ci::Build#retry calls `Ci::RetryBuildService`
      * Ci::Pipeline#retry
      calls `Ci::RetryPipelineService` which also calls
      `Ci::RetryBuildService`
      * `Ci::RetryBuildService` will clone a build to retry
      
      It is also impossibly to backfill Deployment#cluster_id from
      Project#deployment_platform correctly as clusters could have been
      deleted, added or altered in the intervening time.
      4615dca1
    • Thong Kuah's avatar
      Use deployment's cluster for kubernetes prereq · 2cdb72ea
      Thong Kuah authored
      A deployment will have a cluster associated on creation if there is one.
      
      Otherwise fallback to deployment_platform for legacy deployments.
      2cdb72ea
    • Thong Kuah's avatar
      2f96e5d3
    • Thong Kuah's avatar
      Add cluster_id to deployments table as an FK · 525edec7
      Thong Kuah authored
      We nullify when cluster is deleted as we want to keep the deployment
      record around.
      
      Add cluster as an optional association
      
      We will have only cluster for deployments where the build deploys to a
      kubernetes cluster
      525edec7
  2. 26 Jun, 2019 35 commits