@@ -115,7 +115,7 @@ function CreateKubernetesEvents([string] $eventType, [string] $message)
115115 $installer.WriteLog (" Uri: $ ( $podUri ) " )
116116 $installer.WriteLog (" GET Pod info for $ ( $podName ) " )
117117 $podResponse = Invoke-RestMethod - Uri $podUri - Method " GET" - Headers $k8s.HEADERS - SkipCertificateCheck
118- # $installer.WriteLog("Pod: $($podResponse | ConvertTo-Json)")
118+ # $installer.WriteLog("Pod: $($podResponse | ConvertTo-Json -Depth 100 )")
119119
120120 $jobName = $podResponse.metadata.labels .' batch.kubernetes.io/job-name'
121121 $jobControllerUid = $podResponse.metadata.labels .' controller-uid'
@@ -152,8 +152,8 @@ function CreateKubernetesEvents([string] $eventType, [string] $message)
152152 # "lastObservedTime" = "$($now.ToString("yyyy-MM-ddThh:mm:ss.ffffffZ"))"
153153 # };
154154 # }
155- # $installer.WriteLog("Event New: $($event | ConvertTo-Json)")
156- # $responseEventNew = Invoke-RestMethod -Uri "$($APISERVER)/apis/events.k8s.io/v1/namespaces/$($NAMESPACE)/events" -Method "POST" -Body ($event | ConvertTo-Json) -Headers $headers -SkipCertificateCheck
155+ # $installer.WriteLog("Event New: $($event | ConvertTo-Json -Depth 100 )")
156+ # $responseEventNew = Invoke-RestMethod -Uri "$($APISERVER)/apis/events.k8s.io/v1/namespaces/$($NAMESPACE)/events" -Method "POST" -Body ($event | ConvertTo-Json -Depth 100 ) -Headers $headers -SkipCertificateCheck
157157 # $installer.WriteLog("POST Event response $($responseEventNew)")
158158
159159
@@ -176,7 +176,7 @@ function CreateKubernetesEvents([string] $eventType, [string] $message)
176176 # }
177177 # }
178178 # $installer.WriteLog("Status: $(ConvertTo-Json -Depth 10 -InputObject $status)")
179- # $response = Invoke-RestMethod -Uri "$($APISERVER)/apis/batch/v1/namespaces/$($NAMESPACE)/jobs/$($jobName)/status" -Method "PUT" -Body ($status | ConvertTo-Json -Depth 10 ) -Headers $headers -SkipCertificateCheck
179+ # $response = Invoke-RestMethod -Uri "$($APISERVER)/apis/batch/v1/namespaces/$($NAMESPACE)/jobs/$($jobName)/status" -Method "PUT" -Body ($status | ConvertTo-Json -Depth 100 ) -Headers $headers -SkipCertificateCheck
180180 # $installer.WriteLog("POST Status response $($response)")
181181}
182182
@@ -527,12 +527,12 @@ Class Installer
527527 if ($source.GetType () -Eq [System.Collections.Specialized.OrderedDictionary ])
528528 {
529529 $this.WriteLog (" +++++ Converting Content from OrderedDictionary to JSON for environment variable insertion" )
530- $source = $source | ConvertTo-Json
530+ $source = $source | ConvertTo-Json - Depth 100
531531 }
532532 if ($source.GetType () -Eq [System.Collections.Generic.List [System.Object ]])
533533 {
534534 $this.WriteLog (" +++++ Converting Content from Generic.List[System.Object] to JSON for environment variable insertion" )
535- $source = $source | ConvertTo-Json
535+ $source = $source | ConvertTo-Json - Depth 100
536536 }
537537
538538 Select-String ' \$\{env:(.*)\}' - Input $source - AllMatches | ForEach-Object {
@@ -561,7 +561,7 @@ Class Installer
561561 $endpointUri = " $ ( $endpointBaseUri ) $ ( $requestSubPath ) "
562562 $this.PingEndpoint ($request.endpoint , " $ ( $accessType ) " )
563563
564- $requestBodyJson = ($request.request.body | ConvertTo-Json - Depth 99 )
564+ $requestBodyJson = ($request.request.body | ConvertTo-Json - Depth 100 )
565565
566566 $this.WriteLog (" ++++ Getting $ ( $accessType ) with following body (not showing resolved env var values): " )
567567 $this.WriteLog (" ++++ $ ( $requestBodyJson ) " )
@@ -848,7 +848,7 @@ Class Installer
848848 $headers = $this.GetHttpHeaders ($auth , $contentType , $extraHeaders , $entity )
849849
850850
851- # $this.WriteLog("*** Headers are '$($headers | ConvertTo-Json)'")
851+ # $this.WriteLog("*** Headers are '$($headers | ConvertTo-Json -Depth 100 )'")
852852 $apiEndpoint = " $ ( $endpoint ) /$ ( $subresource.apiPath ) " .Trim(' /' )
853853 $uri = " $apiEndpoint /$identifier "
854854 $uriPut = if ($entity.putUriExcludeIdentifier -eq $true ) { $apiEndpoint } else { $uri }
0 commit comments