Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2c090539
Commit
2c090539
authored
Feb 26, 2018
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use deployment_platform DI in environment and revert changes to k8s cert verification policy
parent
637c9558
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
app/models/clusters/platforms/kubernetes.rb
app/models/clusters/platforms/kubernetes.rb
+1
-1
app/models/environment.rb
app/models/environment.rb
+6
-2
No files found.
app/models/clusters/platforms/kubernetes.rb
View file @
2c090539
...
...
@@ -141,7 +141,7 @@ module Clusters
end
def
kubeclient_ssl_options
opts
=
{
verify_ssl:
OpenSSL
::
SSL
::
VERIFY_
NONE
}
opts
=
{
verify_ssl:
OpenSSL
::
SSL
::
VERIFY_
PEER
}
if
ca_pem
.
present?
opts
[
:cert_store
]
=
OpenSSL
::
X509
::
Store
.
new
...
...
app/models/environment.rb
View file @
2c090539
...
...
@@ -220,6 +220,10 @@ class Environment < ActiveRecord::Base
self
.
environment_type
||
self
.
name
end
def
deployment_platform
project
.
deployment_platform
end
def
prometheus_adapter
@prometheus_adapter
||=
if
service_prometheus_adapter
.
can_query?
service_prometheus_adapter
...
...
@@ -233,9 +237,9 @@ class Environment < ActiveRecord::Base
end
def
cluster_prometheus_adapter
return
unless
project
.
deployment_platform
.
respond_to?
(
:cluster
)
return
unless
deployment_platform
.
respond_to?
(
:cluster
)
cluster
=
project
.
deployment_platform
.
cluster
cluster
=
deployment_platform
.
cluster
return
unless
cluster
.
application_prometheus
&
.
installed?
cluster
.
application_prometheus
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment