Skip to content

Commit 936b637

Browse files
author
Georg Martin Weber
committed
fix json convert depth missing
1 parent a3211d8 commit 936b637

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

hull-vidispine-addon/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ apiVersion: v1
33
appVersion: 1.30.0
44
description: hull-vidispine-addon
55
name: hull-vidispine-addon
6-
version: 1.30.2
6+
version: 1.30.3

images/hull-integration/Installer.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)