@@ -161,8 +161,19 @@ export async function deployToPreviewEnvironment(werft: Werft, jobConfig: JobCon
161
161
// success rate or installing monitoring satellite, but we can at least count and debug errors.
162
162
// In the future we can consider not closing spans when closing phases, or restructuring our phases
163
163
// based on parallelism boundaries
164
+ const monitoringSatelliteInstaller = new MonitoringSatelliteInstaller ( {
165
+ kubeconfigPath : PREVIEW_K3S_KUBECONFIG_PATH ,
166
+ branch : jobConfig . observability . branch ,
167
+ satelliteNamespace : deploymentConfig . namespace ,
168
+ clusterName : deploymentConfig . namespace ,
169
+ nodeExporterPort : 9100 ,
170
+ previewDomain : deploymentConfig . domain ,
171
+ stackdriverServiceAccount : STACKDRIVER_SERVICEACCOUNT ,
172
+ withVM : withVM ,
173
+ werft : werft
174
+ } ) ;
164
175
const sliceID = "observability"
165
- installMonitoring ( werft , PREVIEW_K3S_KUBECONFIG_PATH , deploymentConfig . namespace , 9100 , deploymentConfig . domain , STACKDRIVER_SERVICEACCOUNT , withVM , jobConfig . observability . branch )
176
+ monitoringSatelliteInstaller . install ( )
166
177
. then ( ( ) => {
167
178
werft . log ( sliceID , "Succeeded installing monitoring satellite" )
168
179
} )
@@ -485,7 +496,18 @@ async function deployToDevWithHelm(werft: Werft, jobConfig: JobConfig, deploymen
485
496
werft . log ( `observability` , "Installing monitoring-satellite..." )
486
497
if ( deploymentConfig . withObservability ) {
487
498
try {
488
- await installMonitoring ( werft , CORE_DEV_KUBECONFIG_PATH , namespace , nodeExporterPort , monitoringDomain , STACKDRIVER_SERVICEACCOUNT , false , jobConfig . observability . branch ) ;
499
+ const installMonitoringSatellite = new MonitoringSatelliteInstaller ( {
500
+ kubeconfigPath : CORE_DEV_KUBECONFIG_PATH ,
501
+ branch : jobConfig . observability . branch ,
502
+ satelliteNamespace : namespace ,
503
+ clusterName : namespace ,
504
+ nodeExporterPort : nodeExporterPort ,
505
+ previewDomain : domain ,
506
+ stackdriverServiceAccount : STACKDRIVER_SERVICEACCOUNT ,
507
+ withVM : false ,
508
+ werft : werft
509
+ } ) ;
510
+ await installMonitoringSatellite . install ( )
489
511
} catch ( err ) {
490
512
if ( ! jobConfig . mainBuild ) {
491
513
werft . fail ( 'observability' , err ) ;
@@ -794,21 +816,6 @@ async function installMetaCertificates(werft: Werft, branch: string, withVM: boo
794
816
await installCertificate ( werft , metaInstallCertParams , { ...metaEnv ( ) , slice : slice } ) ;
795
817
}
796
818
797
- async function installMonitoring ( werft : Werft , kubeconfig : string , namespace : string , nodeExporterPort : number , domain : string , stackdriverServiceAccount : any , withVM : boolean , observabilityBranch : string ) {
798
- const installMonitoringSatellite = new MonitoringSatelliteInstaller ( {
799
- kubeconfigPath : kubeconfig ,
800
- branch : observabilityBranch ,
801
- satelliteNamespace : namespace ,
802
- clusterName : namespace ,
803
- nodeExporterPort : nodeExporterPort ,
804
- previewDomain : domain ,
805
- stackdriverServiceAccount : stackdriverServiceAccount ,
806
- withVM : withVM ,
807
- werft : werft
808
- } ) ;
809
- installMonitoringSatellite . install ( )
810
- }
811
-
812
819
// returns the static IP address
813
820
function getCoreDevIngressIP ( ) : string {
814
821
return "104.199.27.246" ;
0 commit comments