-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[kots]: add an installation status pod #9455
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Copyright (c) 2022 Gitpod GmbH. All rights reserved. | ||
# Licensed under the MIT License. See License-MIT.txt in the project root for license information. | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: installation-status | ||
labels: | ||
app: gitpod | ||
component: gitpod-installer-status | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: gitpod | ||
component: gitpod-installer-status | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 1 | ||
maxUnavailable: 0 | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
app: gitpod | ||
component: gitpod-installer-status | ||
spec: | ||
restartPolicy: Always | ||
serviceAccountName: installer | ||
containers: | ||
- name: installation-status | ||
# This will normally be the release tag | ||
image: "eu.gcr.io/gitpod-core-dev/build/installer:main.2968" | ||
command: | ||
- /bin/sh | ||
- -c | ||
args: | ||
- | | ||
set -e | ||
|
||
while true | ||
do | ||
echo "Checking installation status" | ||
|
||
if [ "$(helm status -n {{repl Namespace }} gitpod -o json | jq '.info.status == "deployed"')" != "true" ]; | ||
then | ||
echo "Gitpod: Installation not complete" | ||
exit 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question: (I haven't tested this yet) when an upgrade is happening wouldn't a new deployment be created of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Theoretically yes, but only for 10 seconds whilst the sleep waits for the next try. I think that's an acceptable compromise. In practice, I've not found that to be the case though |
||
fi | ||
|
||
echo "Sleeping for 10 seconds" | ||
sleep 10 | ||
done | ||
resources: | ||
limits: | ||
memory: "128Mi" | ||
cpu: "500m" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will replace with a job in the KOTS
Makefile
in separate PR