Commit 0ddff093 authored by Chris Baumbauer's avatar Chris Baumbauer

Revert Helm version bump

parent 623940bf
...@@ -8,7 +8,7 @@ module Clusters ...@@ -8,7 +8,7 @@ module Clusters
# This is required for helm version <= 2.10.x in order to support # This is required for helm version <= 2.10.x in order to support
# Setting up CRDs # Setting up CRDs
ISTIO_CRDS = 'http://cabnetworks.net/triggermesh-charts/istio-crds.yaml'.freeze ISTIO_CRDS = 'https://storage.googleapis.com/triggermesh-charts/istio-crds.yaml'.freeze
self.table_name = 'clusters_applications_knative' self.table_name = 'clusters_applications_knative'
...@@ -37,10 +37,15 @@ module Clusters ...@@ -37,10 +37,15 @@ module Clusters
chart: chart, chart: chart,
files: files, files: files,
repository: REPOSITORY, repository: REPOSITORY,
setargs: args setargs: args,
script: install_script
) )
end end
def install_script
['/usr/bin/kubectl', 'apply', '-f', ISTIO_CRDS]
end
def client def client
cluster&.platform_kubernetes&.kubeclient&.core_client cluster&.platform_kubernetes&.kubeclient&.core_client
end end
......
module Gitlab module Gitlab
module Kubernetes module Kubernetes
module Helm module Helm
HELM_VERSION = '2.11.0'.freeze HELM_VERSION = '2.7.2'.freeze
NAMESPACE = 'gitlab-managed-apps'.freeze NAMESPACE = 'gitlab-managed-apps'.freeze
SERVICE_ACCOUNT = 'tiller'.freeze SERVICE_ACCOUNT = 'tiller'.freeze
CLUSTER_ROLE_BINDING = 'tiller-admin'.freeze CLUSTER_ROLE_BINDING = 'tiller-admin'.freeze
......
...@@ -17,6 +17,14 @@ module Gitlab ...@@ -17,6 +17,14 @@ module Gitlab
apk add -U wget ca-certificates openssl git >/dev/null 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 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/ 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 HEREDOC
end end
......
...@@ -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, :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 @name = name
@chart = chart @chart = chart
@version = version @version = version
...@@ -14,6 +14,7 @@ module Gitlab ...@@ -14,6 +14,7 @@ module Gitlab
@files = files @files = files
@repository = repository @repository = repository
@setargs = setargs @setargs = setargs
@script = script
end end
def generate_script def generate_script
...@@ -21,7 +22,8 @@ module Gitlab ...@@ -21,7 +22,8 @@ module Gitlab
init_command, init_command,
repository_command, repository_command,
repository_update_command, repository_update_command,
script_command script_command,
install_command
].compact.join("\n") ].compact.join("\n")
end end
...@@ -43,12 +45,18 @@ module Gitlab ...@@ -43,12 +45,18 @@ module Gitlab
'helm repo update >/dev/null' if repository 'helm repo update >/dev/null' if repository
end end
def script_command def install_command
command = ['helm', 'install', chart] + install_command_flags command = ['helm', 'install', chart] + install_command_flags
command.shelljoin + " >/dev/null\n" command.shelljoin + " >/dev/null\n"
end end
def script_command
unless script.nil?
script.shelljoin + " >/dev/null\n"
end
end
def install_command_flags def install_command_flags
name_flag = ['--name', name] name_flag = ['--name', name]
namespace_flag = ['--namespace', Gitlab::Kubernetes::Helm::NAMESPACE] namespace_flag = ['--namespace', Gitlab::Kubernetes::Helm::NAMESPACE]
......
...@@ -7,8 +7,16 @@ shared_examples 'helm commands' do ...@@ -7,8 +7,16 @@ shared_examples 'helm commands' do
echo http://mirror.clarkson.edu/alpine/v$ALPINE_VERSION/main >> /etc/apk/repositories 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 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 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/ 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 EOS
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment