summaryrefslogtreecommitdiff
path: root/app/models/gcp/cluster.rb
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-10-03 23:44:06 +0900
committerShinya Maeda <shinya@gitlab.com>2017-10-03 23:44:06 +0900
commit6b7889f750c56962c0674467c3fbfd7976b9b44f (patch)
tree1491f42c332465194630417afc138010e23fc163 /app/models/gcp/cluster.rb
parentfd6776214abb2603ce2fb5dfb078229f0a0195e5 (diff)
downloadgitlab-ce-6b7889f750c56962c0674467c3fbfd7976b9b44f.tar.gz
Implement Policy. Use show instead of edit. Chnage db column. fix comments. dry up workers
Diffstat (limited to 'app/models/gcp/cluster.rb')
-rw-r--r--app/models/gcp/cluster.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/models/gcp/cluster.rb b/app/models/gcp/cluster.rb
index 006cb1feb0c..8b39bedad55 100644
--- a/app/models/gcp/cluster.rb
+++ b/app/models/gcp/cluster.rb
@@ -8,19 +8,16 @@ module Gcp
attr_encrypted :password,
mode: :per_attribute_iv,
- insecure_mode: true,
key: Gitlab::Application.secrets.db_key_base,
algorithm: 'aes-256-cbc'
attr_encrypted :kubernetes_token,
mode: :per_attribute_iv,
- insecure_mode: true,
key: Gitlab::Application.secrets.db_key_base,
algorithm: 'aes-256-cbc'
attr_encrypted :gcp_token,
mode: :per_attribute_iv,
- insecure_mode: true,
key: Gitlab::Application.secrets.db_key_base,
algorithm: 'aes-256-cbc'
@@ -33,9 +30,9 @@ module Gcp
}
validates :gcp_project_id, presence: true
- validates :cluster_zone, presence: true
- validates :cluster_name, presence: true
- validates :cluster_size, presence: true,
+ validates :gcp_cluster_zone, presence: true
+ validates :gcp_cluster_name, presence: true
+ validates :gcp_cluster_size, presence: true,
numericality: { only_integer: true, greater_than: 0 }
validate :restrict_modification, on: :update