Skip to content

Commit e1eb7d6

Browse files
authored
Merge pull request #2943 from port-labs/PORT-16488-Bug-ArgoCD-Integration-Fails-on-JQ-Processing-When-liveState-is-Null
Updated Default Mappings for Kubernetes Resources by Handling Null `liveState` Values
2 parents 3ebafb0 + 936a214 commit e1eb7d6

File tree

1 file changed

+20
-18
lines changed
  • docs/build-your-software-catalog/sync-data-to-catalog/argocd

1 file changed

+20
-18
lines changed

docs/build-your-software-catalog/sync-data-to-catalog/argocd/example.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ To view and test the integration's mapping against examples of the third-party A
88
## Cluster
99

1010
<details>
11-
<summary>Cluster blueprint</summary>
11+
<summary><b>Cluster blueprint (click to expand)</b></summary>
1212

1313
```json showLineNumbers
1414
{
@@ -60,7 +60,7 @@ To view and test the integration's mapping against examples of the third-party A
6060
</details>
6161

6262
<details>
63-
<summary>Integration configuration</summary>
63+
<summary><b>Integration configuration (click to expand)</b></summary>
6464

6565
```yaml showLineNumbers
6666
createMissingRelatedEntities: true
@@ -88,7 +88,7 @@ resources:
8888
## Namespace
8989
9090
<details>
91-
<summary>Namespace blueprint</summary>
91+
<summary><b>Namespace blueprint (click to expand)</b></summary>
9292
9393
```json showLineNumbers
9494
{
@@ -117,7 +117,7 @@ resources:
117117
</details>
118118

119119
<details>
120-
<summary>Integration configuration</summary>
120+
<summary><b>Integration configuration (click to expand)</b></summary>
121121

122122
```yaml showLineNumbers
123123
createMissingRelatedEntities: true
@@ -143,9 +143,9 @@ resources:
143143
## Project
144144
145145
<details>
146-
<summary> Project blueprint</summary>
146+
<summary><b>Project blueprint (click to expand)</b></summary>
147147
148-
```json showlineNumbers
148+
```json showLineNumbers
149149
{
150150
"identifier": "argocdProject",
151151
"description": "This blueprint represents an ArgoCD Project",
@@ -177,7 +177,7 @@ resources:
177177
</details>
178178

179179
<details>
180-
<summary>Integration configuration</summary>
180+
<summary><b>Integration configuration (click to expand)</b></summary>
181181

182182
```yaml showLineNumbers
183183
createMissingRelatedEntities: true
@@ -202,7 +202,7 @@ resources:
202202
## Application
203203
204204
<details>
205-
<summary> Application blueprint</summary>
205+
<summary><b>Application blueprint (click to expand)</b></summary>
206206
207207
```json showlineNumbers
208208
{
@@ -321,7 +321,7 @@ resources:
321321
</details>
322322

323323
<details>
324-
<summary>Integration configuration</summary>
324+
<summary><b>Integration configuration (click to expand)</b></summary>
325325

326326
```yaml showLineNumbers
327327
createMissingRelatedEntities: true
@@ -358,7 +358,7 @@ resources:
358358
## Deployment history
359359
360360
<details>
361-
<summary> Deployment history blueprint</summary>
361+
<summary><b>Deployment history blueprint (click to expand)</b></summary>
362362
363363
```json showlineNumbers
364364
{
@@ -414,7 +414,7 @@ resources:
414414
</details>
415415

416416
<details>
417-
<summary>Integration configuration</summary>
417+
<summary><b>Integration configuration (click to expand)</b></summary>
418418

419419
```yaml showLineNumbers
420420
createMissingRelatedEntities: true
@@ -446,7 +446,7 @@ resources:
446446
## Kubernetes Resource
447447
448448
<details>
449-
<summary> Images blueprint</summary>
449+
<summary><b>Images blueprint (click to expand)</b></summary>
450450
451451
```json showlineNumbers
452452
{
@@ -468,7 +468,7 @@ resources:
468468
</details>
469469

470470
<details>
471-
<summary> Kubernetes resource blueprint</summary>
471+
<summary><b>Kubernetes resource blueprint (click to expand)</b></summary>
472472

473473
```json showlineNumbers
474474
{
@@ -534,7 +534,7 @@ resources:
534534

535535

536536
<details>
537-
<summary>Integration configuration</summary>
537+
<summary><b>Integration configuration (click to expand)</b></summary>
538538

539539
```yaml showLineNumbers
540540
createMissingRelatedEntities: true
@@ -552,11 +552,13 @@ resources:
552552
properties:
553553
kind: .kind
554554
namespace: .namespace
555-
version: .resourceVersion
556-
annotations: .liveState | fromjson | .metadata.annotations
557-
labels: .liveState | fromjson | .metadata.labels
555+
version: if .kind == "Deployment" then .resourceVersion else null end
556+
annotations: (.liveState // .targetState) | fromjson | .metadata.annotations
557+
labels: (.liveState // .targetState) | fromjson | .metadata.labels
558558
relations:
559559
application: .__application.metadata.uid
560-
image: 'if .kind == "Deployment" then .liveState | fromjson | .spec.template.spec.containers[0].image else null end'
560+
image: >-
561+
if .kind == "Deployment" then (.liveState // .targetState) |
562+
fromjson | .spec.template.spec.containers[0].image else null end
561563
```
562564
</details>

0 commit comments

Comments
 (0)