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
2412ae05
Commit
2412ae05
authored
Oct 11, 2019
by
James Fargher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stopped CRD apply retrying from allowing silent failures
parent
04ee7679
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
12 deletions
+17
-12
app/models/clusters/applications/cert_manager.rb
app/models/clusters/applications/cert_manager.rb
+1
-1
changelogs/unreleased/not_silent_retry_failure.yml
changelogs/unreleased/not_silent_retry_failure.yml
+5
-0
lib/gitlab/kubernetes/helm/client_command.rb
lib/gitlab/kubernetes/helm/client_command.rb
+1
-1
spec/lib/gitlab/kubernetes/helm/delete_command_spec.rb
spec/lib/gitlab/kubernetes/helm/delete_command_spec.rb
+2
-2
spec/lib/gitlab/kubernetes/helm/install_command_spec.rb
spec/lib/gitlab/kubernetes/helm/install_command_spec.rb
+7
-7
spec/models/clusters/applications/cert_manager_spec.rb
spec/models/clusters/applications/cert_manager_spec.rb
+1
-1
No files found.
app/models/clusters/applications/cert_manager.rb
View file @
2412ae05
...
...
@@ -65,7 +65,7 @@ module Clusters
end
def
retry_command
(
command
)
"for i in $(seq 1 30); do
#{
command
}
&& break; sleep 1s; echo
\"
Retrying ($i)...
\"
; done"
"for i in $(seq 1 30); do
#{
command
}
&& break; sleep 1s; echo
\"
Retrying ($i)...
\"
;
false;
done"
end
def
post_delete_script
...
...
changelogs/unreleased/not_silent_retry_failure.yml
0 → 100644
View file @
2412ae05
---
title
:
Stopped CRD apply retrying from allowing silent failures
merge_request
:
18421
author
:
type
:
fixed
lib/gitlab/kubernetes/helm/client_command.rb
View file @
2412ae05
...
...
@@ -17,7 +17,7 @@ module Gitlab
# This is necessary to give Tiller time to restart after upgrade.
# Ideally we'd be able to use --wait but cannot because of
# https://github.com/helm/helm/issues/4855
"for i in $(seq 1 30); do
#{
helm_check
}
&& break; sleep 1s; echo
\"
Retrying ($i)...
\"
; done"
"for i in $(seq 1 30); do
#{
helm_check
}
&& break; sleep 1s; echo
\"
Retrying ($i)...
\"
;
false;
done"
end
def
repository_command
...
...
spec/lib/gitlab/kubernetes/helm/delete_command_spec.rb
View file @
2412ae05
...
...
@@ -14,7 +14,7 @@ describe Gitlab::Kubernetes::Helm::DeleteCommand do
let
(
:commands
)
do
<<~
EOS
helm init --upgrade
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)...";
false;
done
helm delete --purge app-name
EOS
end
...
...
@@ -36,7 +36,7 @@ describe Gitlab::Kubernetes::Helm::DeleteCommand do
let
(
:commands
)
do
<<~
EOS
helm init --upgrade
for i in $(seq 1 30); do helm version
#{
tls_flags
}
&& break; sleep 1s; echo "Retrying ($i)..."; done
for i in $(seq 1 30); do helm version
#{
tls_flags
}
&& break; sleep 1s; echo "Retrying ($i)...";
false;
done
#{
helm_delete_command
}
EOS
end
...
...
spec/lib/gitlab/kubernetes/helm/install_command_spec.rb
View file @
2412ae05
...
...
@@ -36,7 +36,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let
(
:commands
)
do
<<~
EOS
helm init --upgrade
for i in $(seq 1 30); do helm version
#{
tls_flags
}
&& break; sleep 1s; echo "Retrying ($i)..."; done
for i in $(seq 1 30); do helm version
#{
tls_flags
}
&& break; sleep 1s; echo "Retrying ($i)...";
false;
done
helm repo add app-name https://repository.example.com
helm repo update
#{
helm_install_comand
}
...
...
@@ -64,7 +64,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let
(
:commands
)
do
<<~
EOS
helm init --upgrade
for i in $(seq 1 30); do helm version
#{
tls_flags
}
&& break; sleep 1s; echo "Retrying ($i)..."; done
for i in $(seq 1 30); do helm version
#{
tls_flags
}
&& break; sleep 1s; echo "Retrying ($i)...";
false;
done
helm repo add app-name https://repository.example.com
helm repo update
#{
helm_install_command
}
...
...
@@ -93,7 +93,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let
(
:commands
)
do
<<~
EOS
helm init --upgrade
for i in $(seq 1 30); do helm version
#{
tls_flags
}
&& break; sleep 1s; echo "Retrying ($i)..."; done
for i in $(seq 1 30); do helm version
#{
tls_flags
}
&& break; sleep 1s; echo "Retrying ($i)...";
false;
done
#{
helm_install_command
}
EOS
end
...
...
@@ -120,7 +120,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let
(
:commands
)
do
<<~
EOS
helm init --upgrade
for i in $(seq 1 30); do helm version
#{
tls_flags
}
&& break; sleep 1s; echo "Retrying ($i)..."; done
for i in $(seq 1 30); do helm version
#{
tls_flags
}
&& break; sleep 1s; echo "Retrying ($i)...";
false;
done
helm repo add app-name https://repository.example.com
helm repo update
/bin/date
...
...
@@ -151,7 +151,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let
(
:commands
)
do
<<~
EOS
helm init --upgrade
for i in $(seq 1 30); do helm version
#{
tls_flags
}
&& break; sleep 1s; echo "Retrying ($i)..."; done
for i in $(seq 1 30); do helm version
#{
tls_flags
}
&& break; sleep 1s; echo "Retrying ($i)...";
false;
done
helm repo add app-name https://repository.example.com
helm repo update
#{
helm_install_command
}
...
...
@@ -182,7 +182,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let
(
:commands
)
do
<<~
EOS
helm init --upgrade
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)..."; done
for i in $(seq 1 30); do helm version && break; sleep 1s; echo "Retrying ($i)...";
false;
done
helm repo add app-name https://repository.example.com
helm repo update
#{
helm_install_command
}
...
...
@@ -210,7 +210,7 @@ describe Gitlab::Kubernetes::Helm::InstallCommand do
let
(
:commands
)
do
<<~
EOS
helm init --upgrade
for i in $(seq 1 30); do helm version
#{
tls_flags
}
&& break; sleep 1s; echo "Retrying ($i)..."; done
for i in $(seq 1 30); do helm version
#{
tls_flags
}
&& break; sleep 1s; echo "Retrying ($i)...";
false;
done
helm repo add app-name https://repository.example.com
helm repo update
#{
helm_install_command
}
...
...
spec/models/clusters/applications/cert_manager_spec.rb
View file @
2412ae05
...
...
@@ -54,7 +54,7 @@ describe Clusters::Applications::CertManager do
'kubectl label --overwrite namespace gitlab-managed-apps certmanager.k8s.io/disable-validation=true'
])
expect
(
subject
.
postinstall
).
to
eq
([
'for i in $(seq 1 30); do kubectl apply -f /data/helm/certmanager/config/cluster_issuer.yaml && break; sleep 1s; echo "Retrying ($i)..."; done'
'for i in $(seq 1 30); do kubectl apply -f /data/helm/certmanager/config/cluster_issuer.yaml && break; sleep 1s; echo "Retrying ($i)...";
false;
done'
])
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