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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
0ddff093
Commit
0ddff093
authored
Oct 29, 2018
by
Chris Baumbauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert Helm version bump
parent
623940bf
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
8 deletions
+37
-8
app/models/clusters/applications/knative.rb
app/models/clusters/applications/knative.rb
+7
-2
lib/gitlab/kubernetes/helm.rb
lib/gitlab/kubernetes/helm.rb
+1
-1
lib/gitlab/kubernetes/helm/base_command.rb
lib/gitlab/kubernetes/helm/base_command.rb
+8
-0
lib/gitlab/kubernetes/helm/install_command.rb
lib/gitlab/kubernetes/helm/install_command.rb
+12
-4
spec/support/shared_examples/helm_generated_script.rb
spec/support/shared_examples/helm_generated_script.rb
+9
-1
No files found.
app/models/clusters/applications/knative.rb
View file @
0ddff093
...
...
@@ -8,7 +8,7 @@ module Clusters
# This is required for helm version <= 2.10.x in order to support
# Setting up CRDs
ISTIO_CRDS
=
'http
://cabnetworks.net
/triggermesh-charts/istio-crds.yaml'
.
freeze
ISTIO_CRDS
=
'http
s://storage.googleapis.com
/triggermesh-charts/istio-crds.yaml'
.
freeze
self
.
table_name
=
'clusters_applications_knative'
...
...
@@ -37,10 +37,15 @@ module Clusters
chart:
chart
,
files:
files
,
repository:
REPOSITORY
,
setargs:
args
setargs:
args
,
script:
install_script
)
end
def
install_script
[
'/usr/bin/kubectl'
,
'apply'
,
'-f'
,
ISTIO_CRDS
]
end
def
client
cluster
&
.
platform_kubernetes
&
.
kubeclient
&
.
core_client
end
...
...
lib/gitlab/kubernetes/helm.rb
View file @
0ddff093
module
Gitlab
module
Kubernetes
module
Helm
HELM_VERSION
=
'2.
11.0
'
.
freeze
HELM_VERSION
=
'2.
7.2
'
.
freeze
NAMESPACE
=
'gitlab-managed-apps'
.
freeze
SERVICE_ACCOUNT
=
'tiller'
.
freeze
CLUSTER_ROLE_BINDING
=
'tiller-admin'
.
freeze
...
...
lib/gitlab/kubernetes/helm/base_command.rb
View file @
0ddff093
...
...
@@ -17,6 +17,14 @@ module Gitlab
apk add -U wget ca-certificates openssl git >/dev/null
wget -q -O - https://kubernetes-helm.storage.googleapis.com/helm-v
#{
Gitlab
::
Kubernetes
::
Helm
::
HELM_VERSION
}
-linux-amd64.tar.gz | tar zxC /tmp >/dev/null
mv /tmp/linux-amd64/helm /usr/bin/
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk
apk add glibc-2.28-r0.apk > /dev/null
rm glibc-2.28-r0.apk
wget -q https://storage.googleapis.com/kubernetes-release/release/v1.11.0/bin/linux/amd64/kubectl
chmod +x kubectl
mv kubectl /usr/bin/
HEREDOC
end
...
...
lib/gitlab/kubernetes/helm/install_command.rb
View file @
0ddff093
...
...
@@ -4,9 +4,9 @@ module Gitlab
class
InstallCommand
include
BaseCommand
attr_reader
:name
,
:files
,
:chart
,
:version
,
:repository
,
:setargs
attr_reader
:name
,
:files
,
:chart
,
:version
,
:repository
,
:setargs
,
:script
def
initialize
(
name
:,
chart
:,
files
:,
rbac
:,
version:
nil
,
repository:
nil
,
setargs:
nil
)
def
initialize
(
name
:,
chart
:,
files
:,
rbac
:,
version:
nil
,
repository:
nil
,
setargs:
nil
,
script:
nil
)
@name
=
name
@chart
=
chart
@version
=
version
...
...
@@ -14,6 +14,7 @@ module Gitlab
@files
=
files
@repository
=
repository
@setargs
=
setargs
@script
=
script
end
def
generate_script
...
...
@@ -21,7 +22,8 @@ module Gitlab
init_command
,
repository_command
,
repository_update_command
,
script_command
script_command
,
install_command
].
compact
.
join
(
"
\n
"
)
end
...
...
@@ -43,12 +45,18 @@ module Gitlab
'helm repo update >/dev/null'
if
repository
end
def
script
_command
def
install
_command
command
=
[
'helm'
,
'install'
,
chart
]
+
install_command_flags
command
.
shelljoin
+
" >/dev/null
\n
"
end
def
script_command
unless
script
.
nil?
script
.
shelljoin
+
" >/dev/null
\n
"
end
end
def
install_command_flags
name_flag
=
[
'--name'
,
name
]
namespace_flag
=
[
'--namespace'
,
Gitlab
::
Kubernetes
::
Helm
::
NAMESPACE
]
...
...
spec/support/shared_examples/helm_generated_script.rb
View file @
0ddff093
...
...
@@ -7,8 +7,16 @@ shared_examples 'helm commands' do
echo http://mirror.clarkson.edu/alpine/v$ALPINE_VERSION/main >> /etc/apk/repositories
echo http://mirror1.hs-esslingen.de/pub/Mirrors/alpine/v$ALPINE_VERSION/main >> /etc/apk/repositories
apk add -U wget ca-certificates openssl git >/dev/null
wget -q -O - https://kubernetes-helm.storage.googleapis.com/helm-v2.
11.0
-linux-amd64.tar.gz | tar zxC /tmp >/dev/null
wget -q -O - https://kubernetes-helm.storage.googleapis.com/helm-v2.
7.2
-linux-amd64.tar.gz | tar zxC /tmp >/dev/null
mv /tmp/linux-amd64/helm /usr/bin/
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk
apk add glibc-2.28-r0.apk > /dev/null
rm glibc-2.28-r0.apk
wget -q https://storage.googleapis.com/kubernetes-release/release/v1.11.0/bin/linux/amd64/kubectl
chmod +x kubectl
mv kubectl /usr/bin/
EOS
end
...
...
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