diff options
author | Thong Kuah <tkuah@gitlab.com> | 2018-09-07 15:07:47 +1200 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2018-09-14 16:26:51 +1200 |
commit | c9af170d9aeeb39dbb41a99c00402beb384da0e9 (patch) | |
tree | 53544844fd8ac75f0fc2f2d44595b01089fad874 /db | |
parent | 2e47e1f80e000fb717f89effef983bf22c9e2f4d (diff) | |
download | gitlab-ce-c9af170d9aeeb39dbb41a99c00402beb384da0e9.tar.gz |
Create a GKE cluster with legacy_abac disabled when the `:rbac_clusters` feature flag is enabled
Explicitly persist the legacy_abac value of the cluster_provider_gcp so that we can disable abac if the `:rbac_clusters` feature flag is enabled
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180907015926_add_legacy_abac_to_cluster_providers_gcp.rb | 17 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 19 insertions, 1 deletions
diff --git a/db/migrate/20180907015926_add_legacy_abac_to_cluster_providers_gcp.rb b/db/migrate/20180907015926_add_legacy_abac_to_cluster_providers_gcp.rb new file mode 100644 index 00000000000..933047e32de --- /dev/null +++ b/db/migrate/20180907015926_add_legacy_abac_to_cluster_providers_gcp.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddLegacyAbacToClusterProvidersGcp < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default(:cluster_providers_gcp, :legacy_abac, :boolean, default: true) + end + + def down + remove_column(:cluster_providers_gcp, :legacy_abac) + end +end diff --git a/db/schema.rb b/db/schema.rb index d888891c8ea..9c01d03f683 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180906101639) do +ActiveRecord::Schema.define(version: 20180907015926) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -620,6 +620,7 @@ ActiveRecord::Schema.define(version: 20180906101639) do t.string "endpoint" t.text "encrypted_access_token" t.string "encrypted_access_token_iv" + t.boolean "legacy_abac", default: true, null: false end add_index "cluster_providers_gcp", ["cluster_id"], name: "index_cluster_providers_gcp_on_cluster_id", unique: true, using: :btree |