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
631ab898
Commit
631ab898
authored
Nov 13, 2018
by
Amit Rathi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use email on the account
parent
9d91d79c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
13 deletions
+22
-13
app/assets/javascripts/clusters/components/applications.vue
app/assets/javascripts/clusters/components/applications.vue
+0
-3
app/models/clusters/applications/cert_manager.rb
app/models/clusters/applications/cert_manager.rb
+15
-2
config/cert_manager/cluster_issuer.yaml
config/cert_manager/cluster_issuer.yaml
+2
-2
lib/gitlab/kubernetes/helm/install_command.rb
lib/gitlab/kubernetes/helm/install_command.rb
+5
-6
No files found.
app/assets/javascripts/clusters/components/applications.vue
View file @
631ab898
...
@@ -81,9 +81,6 @@ export default {
...
@@ -81,9 +81,6 @@ export default {
ingressInstalled
()
{
ingressInstalled
()
{
return
this
.
applications
.
ingress
.
status
===
APPLICATION_STATUS
.
INSTALLED
;
return
this
.
applications
.
ingress
.
status
===
APPLICATION_STATUS
.
INSTALLED
;
},
},
certManagerInstalled
()
{
return
this
.
applications
.
cert_manager
.
status
===
APPLICATION_STATUS
.
INSTALLED
;
},
ingressExternalIp
()
{
ingressExternalIp
()
{
return
this
.
applications
.
ingress
.
externalIp
;
return
this
.
applications
.
ingress
.
externalIp
;
},
},
...
...
app/models/clusters/applications/cert_manager.rb
View file @
631ab898
...
@@ -33,10 +33,17 @@ module Clusters
...
@@ -33,10 +33,17 @@ module Clusters
rbac:
cluster
.
platform_kubernetes_rbac?
,
rbac:
cluster
.
platform_kubernetes_rbac?
,
chart:
chart
,
chart:
chart
,
files:
files
.
merge!
(
cluster_issuer_file
),
files:
files
.
merge!
(
cluster_issuer_file
),
postinstall:
post_install_script
postinstall:
post_install_script
,
application_flags:
install_command_flags
)
)
end
end
def
install_command_flags
[
'--set'
,
'ingressShim.defaultIssuerName=letsencrypt-prod'
]
+
[
'--set'
,
'ingressShim.defaultIssuerKind=ClusterIssuer'
]
+
[
'--set'
,
'rbac.create=false'
]
end
private
private
def
post_install_script
def
post_install_script
...
@@ -45,10 +52,16 @@ module Clusters
...
@@ -45,10 +52,16 @@ module Clusters
def
cluster_issuer_file
def
cluster_issuer_file
{
{
'cluster_issuer.yaml'
:
File
.
read
(
cluster_issuer_file_path
)
'cluster_issuer.yaml'
:
cluster_issuer_yaml_content
}
}
end
end
def
cluster_issuer_yaml_content
data
=
YAML
.
load_file
(
cluster_issuer_file_path
)
data
[
"spec"
][
"acme"
][
"email"
]
=
self
.
email
YAML
.
dump
(
data
)
end
def
cluster_issuer_file_path
def
cluster_issuer_file_path
"
#{
Rails
.
root
}
/vendor/cert_manager/cluster_issuer.yaml"
"
#{
Rails
.
root
}
/vendor/cert_manager/cluster_issuer.yaml"
end
end
...
...
config/cert_manager/cluster_issuer.yaml
View file @
631ab898
...
@@ -5,7 +5,7 @@ metadata:
...
@@ -5,7 +5,7 @@ metadata:
spec
:
spec
:
acme
:
acme
:
server
:
https://acme-v02.api.letsencrypt.org/directory
server
:
https://acme-v02.api.letsencrypt.org/directory
email
:
hello@amirathi
.com
email
:
my-email@example
.com
privateKeySecretRef
:
privateKeySecretRef
:
name
:
letsencrypt-prod
name
:
letsencrypt-prod
http01
:
{}
http01
:
{}
lib/gitlab/kubernetes/helm/install_command.rb
View file @
631ab898
...
@@ -4,9 +4,9 @@ module Gitlab
...
@@ -4,9 +4,9 @@ module Gitlab
class
InstallCommand
class
InstallCommand
include
BaseCommand
include
BaseCommand
attr_reader
:name
,
:files
,
:chart
,
:version
,
:repository
,
:preinstall
,
:postinstall
attr_reader
:name
,
:files
,
:chart
,
:version
,
:repository
,
:preinstall
,
:postinstall
,
:application_flags
def
initialize
(
name
:,
chart
:,
files
:,
rbac
:,
version:
nil
,
repository:
nil
,
preinstall:
nil
,
postinstall:
nil
)
def
initialize
(
name
:,
chart
:,
files
:,
rbac
:,
version:
nil
,
repository:
nil
,
preinstall:
nil
,
postinstall:
nil
,
application_flags:
[]
)
@name
=
name
@name
=
name
@chart
=
chart
@chart
=
chart
@version
=
version
@version
=
version
...
@@ -15,6 +15,7 @@ module Gitlab
...
@@ -15,6 +15,7 @@ module Gitlab
@repository
=
repository
@repository
=
repository
@preinstall
=
preinstall
@preinstall
=
preinstall
@postinstall
=
postinstall
@postinstall
=
postinstall
@application_flags
=
application_flags
end
end
def
generate_script
def
generate_script
...
@@ -64,16 +65,14 @@ module Gitlab
...
@@ -64,16 +65,14 @@ module Gitlab
name_flag
=
[
'--name'
,
name
]
name_flag
=
[
'--name'
,
name
]
namespace_flag
=
[
'--namespace'
,
Gitlab
::
Kubernetes
::
Helm
::
NAMESPACE
]
namespace_flag
=
[
'--namespace'
,
Gitlab
::
Kubernetes
::
Helm
::
NAMESPACE
]
value_flag
=
[
'-f'
,
"/data/helm/
#{
name
}
/config/values.yaml"
]
value_flag
=
[
'-f'
,
"/data/helm/
#{
name
}
/config/values.yaml"
]
a
=
[
'--set'
,
'ingressShim.defaultIssuerName=letsencrypt-prod'
]
b
=
[
'--set'
,
'ingressShim.defaultIssuerKind=ClusterIssuer'
]
c
=
[
'--set'
,
'rbac.create=false'
]
name_flag
+
name_flag
+
optional_tls_flags
+
optional_tls_flags
+
optional_version_flag
+
optional_version_flag
+
optional_rbac_create_flag
+
optional_rbac_create_flag
+
namespace_flag
+
namespace_flag
+
value_flag
+
a
+
b
+
c
value_flag
+
application_flags
end
end
def
optional_rbac_create_flag
def
optional_rbac_create_flag
...
...
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