diff options
| author | Shinya Maeda <shinya@gitlab.com> | 2017-09-25 16:10:25 +0900 |
|---|---|---|
| committer | Shinya Maeda <shinya@gitlab.com> | 2017-09-25 16:10:25 +0900 |
| commit | d4fa672c20657a1c7d2fcfa25e9798e7ccdbf39d (patch) | |
| tree | 416f477c9f574116d74cbf6687b7b18a09f550d5 /db/migrate | |
| parent | e2b195b2748c88e276163d44cdeff5b210f2522c (diff) | |
| download | gitlab-ce-d4fa672c20657a1c7d2fcfa25e9798e7ccdbf39d.tar.gz | |
Create Kubernetes cluster on GKE from k8s service
Diffstat (limited to 'db/migrate')
| -rw-r--r-- | db/migrate/20170924094327_create_ci_clusters.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/db/migrate/20170924094327_create_ci_clusters.rb b/db/migrate/20170924094327_create_ci_clusters.rb new file mode 100644 index 00000000000..86e75edf203 --- /dev/null +++ b/db/migrate/20170924094327_create_ci_clusters.rb @@ -0,0 +1,29 @@ +class CreateCiClusters < ActiveRecord::Migration + DOWNTIME = false + + def change + create_table :ci_clusters do |t| + t.integer :project_id + t.integer :owner_id + t.datetime_with_timezone :created_at, null: false + t.datetime_with_timezone :updated_at, null: false + t.boolean :enabled, default: true + t.string :end_point + t.text :ca_cert # Base64? + t.string :token + t.string :username + t.string :password + t.string :project_namespace + t.integer :creation_type # manual or on_gke + end + + # TODO: fk, index, encypt + + add_foreign_key :ci_clusters, :projects + add_foreign_key :ci_clusters, :users, column: :owner_id + end + + def down + drop_table :ci_clusters + end +end |
