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
9b1a99b0
Commit
9b1a99b0
authored
Nov 15, 2018
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use helm version loop instead of sleep in ClientCommand
parent
a71b3f6a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
lib/gitlab/kubernetes/helm/client_command.rb
lib/gitlab/kubernetes/helm/client_command.rb
+1
-1
spec/lib/gitlab/kubernetes/helm/install_command_spec.rb
spec/lib/gitlab/kubernetes/helm/install_command_spec.rb
+7
-7
spec/lib/gitlab/kubernetes/helm/upgrade_command_spec.rb
spec/lib/gitlab/kubernetes/helm/upgrade_command_spec.rb
+4
-4
No files found.
lib/gitlab/kubernetes/helm/client_command.rb
View file @
9b1a99b0
...
@@ -14,7 +14,7 @@ module Gitlab
...
@@ -14,7 +14,7 @@ module Gitlab
# This is necessary to give Tiller time to restart after upgrade.
# This is necessary to give Tiller time to restart after upgrade.
# Ideally we'd be able to use --wait but cannot because of
# Ideally we'd be able to use --wait but cannot because of
# https://github.com/helm/helm/issues/4855
# https://github.com/helm/helm/issues/4855
'
sleep 30
'
'
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done
'
end
end
def
repository_command
def
repository_command
...
...
spec/lib/gitlab/kubernetes/helm/install_command_spec.rb
View file @
9b1a99b0
...
@@ -27,7 +27,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
...
@@ -27,7 +27,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let
(
:commands
)
do
let
(
:commands
)
do
<<~
EOS
<<~
EOS
helm init --upgrade --tiller-namespace gitlab-managed-apps
helm init --upgrade --tiller-namespace gitlab-managed-apps
sleep 30
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done
helm repo add app-name https://repository.example.com
helm repo add app-name https://repository.example.com
helm repo update
helm repo update
#{
helm_install_comand
}
#{
helm_install_comand
}
...
@@ -56,7 +56,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
...
@@ -56,7 +56,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let
(
:commands
)
do
let
(
:commands
)
do
<<~
EOS
<<~
EOS
helm init --upgrade --tiller-namespace gitlab-managed-apps
helm init --upgrade --tiller-namespace gitlab-managed-apps
sleep 30
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done
helm repo add app-name https://repository.example.com
helm repo add app-name https://repository.example.com
helm repo update
helm repo update
#{
helm_install_command
}
#{
helm_install_command
}
...
@@ -87,7 +87,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
...
@@ -87,7 +87,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let
(
:commands
)
do
let
(
:commands
)
do
<<~
EOS
<<~
EOS
helm init --upgrade --tiller-namespace gitlab-managed-apps
helm init --upgrade --tiller-namespace gitlab-managed-apps
sleep 30
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done
#{
helm_install_command
}
#{
helm_install_command
}
EOS
EOS
end
end
...
@@ -115,7 +115,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
...
@@ -115,7 +115,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let
(
:commands
)
do
let
(
:commands
)
do
<<~
EOS
<<~
EOS
helm init --upgrade --tiller-namespace gitlab-managed-apps
helm init --upgrade --tiller-namespace gitlab-managed-apps
sleep 30
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done
helm repo add app-name https://repository.example.com
helm repo add app-name https://repository.example.com
helm repo update
helm repo update
#{
helm_install_command
}
#{
helm_install_command
}
...
@@ -139,7 +139,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
...
@@ -139,7 +139,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let
(
:commands
)
do
let
(
:commands
)
do
<<~
EOS
<<~
EOS
helm init --upgrade --tiller-namespace gitlab-managed-apps
helm init --upgrade --tiller-namespace gitlab-managed-apps
sleep 30
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done
helm repo add app-name https://repository.example.com
helm repo add app-name https://repository.example.com
helm repo update
helm repo update
#{
helm_install_command
}
#{
helm_install_command
}
...
@@ -163,7 +163,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
...
@@ -163,7 +163,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let
(
:commands
)
do
let
(
:commands
)
do
<<~
EOS
<<~
EOS
helm init --upgrade --tiller-namespace gitlab-managed-apps
helm init --upgrade --tiller-namespace gitlab-managed-apps
sleep 30
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done
helm repo add app-name https://repository.example.com
helm repo add app-name https://repository.example.com
helm repo update
helm repo update
#{
helm_install_command
}
#{
helm_install_command
}
...
@@ -189,7 +189,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
...
@@ -189,7 +189,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let
(
:commands
)
do
let
(
:commands
)
do
<<~
EOS
<<~
EOS
helm init --upgrade --tiller-namespace gitlab-managed-apps
helm init --upgrade --tiller-namespace gitlab-managed-apps
sleep 30
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done
helm repo add app-name https://repository.example.com
helm repo add app-name https://repository.example.com
helm repo update
helm repo update
#{
helm_install_command
}
#{
helm_install_command
}
...
...
spec/lib/gitlab/kubernetes/helm/upgrade_command_spec.rb
View file @
9b1a99b0
...
@@ -22,7 +22,7 @@ describe Gitlab::Kubernetes::Helm::UpgradeCommand do
...
@@ -22,7 +22,7 @@ describe Gitlab::Kubernetes::Helm::UpgradeCommand do
let
(
:commands
)
do
let
(
:commands
)
do
<<~
EOS
<<~
EOS
helm init --upgrade --tiller-namespace gitlab-managed-apps
helm init --upgrade --tiller-namespace gitlab-managed-apps
sleep 30
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done
helm upgrade
#{
application
.
name
}
#{
application
.
chart
}
--tls --tls-ca-cert /data/helm/
#{
application
.
name
}
/config/ca.pem --tls-cert /data/helm/
#{
application
.
name
}
/config/cert.pem --tls-key /data/helm/
#{
application
.
name
}
/config/key.pem --reset-values --install --namespace
#{
namespace
}
-f /data/helm/
#{
application
.
name
}
/config/values.yaml
helm upgrade
#{
application
.
name
}
#{
application
.
chart
}
--tls --tls-ca-cert /data/helm/
#{
application
.
name
}
/config/ca.pem --tls-cert /data/helm/
#{
application
.
name
}
/config/cert.pem --tls-key /data/helm/
#{
application
.
name
}
/config/key.pem --reset-values --install --namespace
#{
namespace
}
-f /data/helm/
#{
application
.
name
}
/config/values.yaml
EOS
EOS
end
end
...
@@ -35,7 +35,7 @@ describe Gitlab::Kubernetes::Helm::UpgradeCommand do
...
@@ -35,7 +35,7 @@ describe Gitlab::Kubernetes::Helm::UpgradeCommand do
let
(
:commands
)
do
let
(
:commands
)
do
<<~
EOS
<<~
EOS
helm init --upgrade --tiller-namespace gitlab-managed-apps
helm init --upgrade --tiller-namespace gitlab-managed-apps
sleep 30
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done
helm upgrade
#{
application
.
name
}
#{
application
.
chart
}
--tls --tls-ca-cert /data/helm/
#{
application
.
name
}
/config/ca.pem --tls-cert /data/helm/
#{
application
.
name
}
/config/cert.pem --tls-key /data/helm/
#{
application
.
name
}
/config/key.pem --reset-values --install --namespace
#{
namespace
}
-f /data/helm/
#{
application
.
name
}
/config/values.yaml
helm upgrade
#{
application
.
name
}
#{
application
.
chart
}
--tls --tls-ca-cert /data/helm/
#{
application
.
name
}
/config/ca.pem --tls-cert /data/helm/
#{
application
.
name
}
/config/cert.pem --tls-key /data/helm/
#{
application
.
name
}
/config/key.pem --reset-values --install --namespace
#{
namespace
}
-f /data/helm/
#{
application
.
name
}
/config/values.yaml
EOS
EOS
end
end
...
@@ -59,7 +59,7 @@ describe Gitlab::Kubernetes::Helm::UpgradeCommand do
...
@@ -59,7 +59,7 @@ describe Gitlab::Kubernetes::Helm::UpgradeCommand do
let
(
:commands
)
do
let
(
:commands
)
do
<<~
EOS
<<~
EOS
helm init --upgrade --tiller-namespace gitlab-managed-apps
helm init --upgrade --tiller-namespace gitlab-managed-apps
sleep 30
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done
helm repo add
#{
application
.
name
}
#{
application
.
repository
}
helm repo add
#{
application
.
name
}
#{
application
.
repository
}
helm upgrade
#{
application
.
name
}
#{
application
.
chart
}
--tls --tls-ca-cert /data/helm/
#{
application
.
name
}
/config/ca.pem --tls-cert /data/helm/
#{
application
.
name
}
/config/cert.pem --tls-key /data/helm/
#{
application
.
name
}
/config/key.pem --reset-values --install --namespace
#{
namespace
}
-f /data/helm/
#{
application
.
name
}
/config/values.yaml
helm upgrade
#{
application
.
name
}
#{
application
.
chart
}
--tls --tls-ca-cert /data/helm/
#{
application
.
name
}
/config/ca.pem --tls-cert /data/helm/
#{
application
.
name
}
/config/cert.pem --tls-key /data/helm/
#{
application
.
name
}
/config/key.pem --reset-values --install --namespace
#{
namespace
}
-f /data/helm/
#{
application
.
name
}
/config/values.yaml
EOS
EOS
...
@@ -74,7 +74,7 @@ describe Gitlab::Kubernetes::Helm::UpgradeCommand do
...
@@ -74,7 +74,7 @@ describe Gitlab::Kubernetes::Helm::UpgradeCommand do
let
(
:commands
)
do
let
(
:commands
)
do
<<~
EOS
<<~
EOS
helm init --upgrade --tiller-namespace gitlab-managed-apps
helm init --upgrade --tiller-namespace gitlab-managed-apps
sleep 30
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done
helm upgrade
#{
application
.
name
}
#{
application
.
chart
}
--reset-values --install --namespace
#{
namespace
}
-f /data/helm/
#{
application
.
name
}
/config/values.yaml
helm upgrade
#{
application
.
name
}
#{
application
.
chart
}
--reset-values --install --namespace
#{
namespace
}
-f /data/helm/
#{
application
.
name
}
/config/values.yaml
EOS
EOS
end
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