diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2019-02-11 12:59:59 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2019-02-11 12:59:59 +0300 |
commit | 15af0a45083a8fb6a545616f1c48ace00b70b66a (patch) | |
tree | e1a5d25769260e7c7fa5823a1bad7fdd2d318814 /app/models/clusters/platforms/kubernetes.rb | |
parent | 8886924ca9a6721c1df39818c3c6badc0625b40d (diff) | |
parent | 73e5d3a2693d0469fdad925c398b6c464803c4b3 (diff) |
Merge branch '55447-validate-k8s-ca-cert' into 'master'
Validate k8s CA certificate at cluster creation
See merge request gitlab-org/gitlab-ce!24990
Diffstat (limited to 'app/models/clusters/platforms/kubernetes.rb')
-rw-r--r-- | app/models/clusters/platforms/kubernetes.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/clusters/platforms/kubernetes.rb b/app/models/clusters/platforms/kubernetes.rb index c8969351ed9..46d0898014e 100644 --- a/app/models/clusters/platforms/kubernetes.rb +++ b/app/models/clusters/platforms/kubernetes.rb @@ -43,6 +43,7 @@ module Clusters # We expect to be `active?` only when enabled and cluster is created (the api_url is assigned) validates :api_url, url: true, presence: true validates :token, presence: true + validates :ca_cert, certificate: true, allow_blank: true, if: :ca_cert_changed? validate :prevent_modification, on: :update |