Skip to content

Commit

Permalink
Fix observability deployment
Browse files Browse the repository at this point in the history
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
  • Loading branch information
ArthurSens committed Mar 31, 2022
1 parent eb173bd commit c649382
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion .werft/jobs/build/deploy-to-preview-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,6 @@ async function installMonitoring(kubeconfig: string, namespace: string, nodeExpo
const installMonitoringSatelliteParams = new InstallMonitoringSatelliteParams();
installMonitoringSatelliteParams.kubeconfigPath = kubeconfig
installMonitoringSatelliteParams.branch = observabilityBranch;
installMonitoringSatelliteParams.kubeconfigPath = ""
installMonitoringSatelliteParams.satelliteNamespace = namespace
installMonitoringSatelliteParams.clusterName = namespace
installMonitoringSatelliteParams.nodeExporterPort = nodeExporterPort
Expand Down
4 changes: 2 additions & 2 deletions .werft/observability/monitoring-satellite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async function ensureCorrectInstallationOrder(kubeconfig: string, namespace: str
const werft = getGlobalWerftInstance()

werft.log(sliceName, 'installing monitoring-satellite')
exec(`cd observability && KUBECONFIG=${kubeconfig} hack/deploy-satellite.sh`, {slice: sliceName})
exec(`cd observability && hack/deploy-satellite.sh --kubeconfig ${kubeconfig}`, {slice: sliceName})

deployGitpodServiceMonitors(kubeconfig)
checkReadiness(kubeconfig, namespace, checkNodeExporterStatus)
Expand All @@ -92,7 +92,7 @@ async function ensureCorrectInstallationOrder(kubeconfig: string, namespace: str
async function checkReadiness(kubeconfig: string, namespace: string, checkNodeExporterStatus: boolean) {
// For some reason prometheus' statefulset always take quite some time to get created
// Therefore we wait a couple of seconds
exec(`sleep 30 && kubectl rollout status -n ${namespace} statefulset prometheus-k8s`, {slice: sliceName, async: true})
exec(`sleep 30 && kubectl --kubeconfig ${kubeconfig} rollout status -n ${namespace} statefulset prometheus-k8s`, {slice: sliceName, async: true})
exec(`kubectl --kubeconfig ${kubeconfig} rollout status -n ${namespace} deployment grafana`, {slice: sliceName, async: true})
exec(`kubectl --kubeconfig ${kubeconfig} rollout status -n ${namespace} deployment kube-state-metrics`, {slice: sliceName, async: true})
exec(`kubectl --kubeconfig ${kubeconfig} rollout status -n ${namespace} deployment otel-collector`, {slice: sliceName, async: true})
Expand Down

0 comments on commit c649382

Please sign in to comment.