-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[kots]: add an installation status pod
This uses the Helm status to find out the status of the Helm installation and crashes if it is not "deployed"
- Loading branch information
Showing
5 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
fi | ||
echo "Sleeping for 10 seconds" | ||
sleep 10 | ||
done | ||
resources: | ||
limits: | ||
memory: "128Mi" | ||
cpu: "500m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters