Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow scope in relationship selector #735

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions chart/crds/configs.flanksource.com_scrapeconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,22 @@ spec:
value:
type: string
type: object
scope:
description: |-
Scope is the id of the parent of the resource to select.
Example: For config items, the scope is the scraper id
- for checks, it's canaries and
- for components, it's topology.
If left empty, the scope is the requester's scope.
Use `all` to disregard scope.
properties:
expr:
type: string
label:
type: string
value:
type: string
type: object
type:
description: Lookup offers different ways to specify
a lookup value
Expand Down Expand Up @@ -896,6 +912,22 @@ spec:
value:
type: string
type: object
scope:
description: |-
Scope is the id of the parent of the resource to select.
Example: For config items, the scope is the scraper id
- for checks, it's canaries and
- for components, it's topology.
If left empty, the scope is the requester's scope.
Use `all` to disregard scope.
properties:
expr:
type: string
label:
type: string
value:
type: string
type: object
type:
description: Lookup offers different ways to specify
a lookup value
Expand Down Expand Up @@ -1273,6 +1305,22 @@ spec:
value:
type: string
type: object
scope:
description: |-
Scope is the id of the parent of the resource to select.
Example: For config items, the scope is the scraper id
- for checks, it's canaries and
- for components, it's topology.
If left empty, the scope is the requester's scope.
Use `all` to disregard scope.
properties:
expr:
type: string
label:
type: string
value:
type: string
type: object
type:
description: Lookup offers different ways to specify
a lookup value
Expand Down Expand Up @@ -1609,6 +1657,22 @@ spec:
value:
type: string
type: object
scope:
description: |-
Scope is the id of the parent of the resource to select.
Example: For config items, the scope is the scraper id
- for checks, it's canaries and
- for components, it's topology.
If left empty, the scope is the requester's scope.
Use `all` to disregard scope.
properties:
expr:
type: string
label:
type: string
value:
type: string
type: object
type:
description: Lookup offers different ways to specify
a lookup value
Expand Down Expand Up @@ -1985,6 +2049,22 @@ spec:
value:
type: string
type: object
scope:
description: |-
Scope is the id of the parent of the resource to select.
Example: For config items, the scope is the scraper id
- for checks, it's canaries and
- for components, it's topology.
If left empty, the scope is the requester's scope.
Use `all` to disregard scope.
properties:
expr:
type: string
label:
type: string
value:
type: string
type: object
type:
description: Lookup offers different ways to specify
a lookup value
Expand Down Expand Up @@ -2474,6 +2554,22 @@ spec:
value:
type: string
type: object
scope:
description: |-
Scope is the id of the parent of the resource to select.
Example: For config items, the scope is the scraper id
- for checks, it's canaries and
- for components, it's topology.
If left empty, the scope is the requester's scope.
Use `all` to disregard scope.
properties:
expr:
type: string
label:
type: string
value:
type: string
type: object
type:
description: Lookup offers different ways to specify
a lookup value
Expand Down Expand Up @@ -2880,6 +2976,22 @@ spec:
value:
type: string
type: object
scope:
description: |-
Scope is the id of the parent of the resource to select.
Example: For config items, the scope is the scraper id
- for checks, it's canaries and
- for components, it's topology.
If left empty, the scope is the requester's scope.
Use `all` to disregard scope.
properties:
expr:
type: string
label:
type: string
value:
type: string
type: object
type:
description: Lookup offers different ways to specify
a lookup value
Expand Down Expand Up @@ -3336,6 +3448,22 @@ spec:
value:
type: string
type: object
scope:
description: |-
Scope is the id of the parent of the resource to select.
Example: For config items, the scope is the scraper id
- for checks, it's canaries and
- for components, it's topology.
If left empty, the scope is the requester's scope.
Use `all` to disregard scope.
properties:
expr:
type: string
label:
type: string
value:
type: string
type: object
type:
description: Lookup offers different ways to specify
a lookup value
Expand Down Expand Up @@ -3695,6 +3823,22 @@ spec:
value:
type: string
type: object
scope:
description: |-
Scope is the id of the parent of the resource to select.
Example: For config items, the scope is the scraper id
- for checks, it's canaries and
- for components, it's topology.
If left empty, the scope is the requester's scope.
Use `all` to disregard scope.
properties:
expr:
type: string
label:
type: string
value:
type: string
type: object
type:
description: Lookup offers different ways to specify
a lookup value
Expand Down
46 changes: 26 additions & 20 deletions config/schemas/config_aws.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,21 @@
"additionalProperties": false,
"type": "object"
},
"Lookup": {
"properties": {
"expr": {
"type": "string"
},
"value": {
"type": "string"
},
"label": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object"
},
"Mask": {
"properties": {
"selector": {
Expand All @@ -351,19 +366,25 @@
"RelationshipConfig": {
"properties": {
"id": {
"$ref": "#/$defs/RelationshipLookup"
"$ref": "#/$defs/Lookup"
},
"external_id": {
"$ref": "#/$defs/RelationshipLookup"
"$ref": "#/$defs/Lookup"
},
"name": {
"$ref": "#/$defs/RelationshipLookup"
"$ref": "#/$defs/Lookup"
},
"namespace": {
"$ref": "#/$defs/Lookup"
},
"type": {
"$ref": "#/$defs/RelationshipLookup"
"$ref": "#/$defs/Lookup"
},
"agent": {
"$ref": "#/$defs/RelationshipLookup"
"$ref": "#/$defs/Lookup"
},
"scope": {
"$ref": "#/$defs/Lookup"
},
"labels": {
"additionalProperties": {
Expand All @@ -381,21 +402,6 @@
"additionalProperties": false,
"type": "object"
},
"RelationshipLookup": {
"properties": {
"expr": {
"type": "string"
},
"value": {
"type": "string"
},
"label": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object"
},
"SecretKeySelector": {
"properties": {
"name": {
Expand Down
46 changes: 26 additions & 20 deletions config/schemas/config_azure.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,21 @@
"additionalProperties": false,
"type": "object"
},
"Lookup": {
"properties": {
"expr": {
"type": "string"
},
"value": {
"type": "string"
},
"label": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object"
},
"Mask": {
"properties": {
"selector": {
Expand All @@ -307,19 +322,25 @@
"RelationshipConfig": {
"properties": {
"id": {
"$ref": "#/$defs/RelationshipLookup"
"$ref": "#/$defs/Lookup"
},
"external_id": {
"$ref": "#/$defs/RelationshipLookup"
"$ref": "#/$defs/Lookup"
},
"name": {
"$ref": "#/$defs/RelationshipLookup"
"$ref": "#/$defs/Lookup"
},
"namespace": {
"$ref": "#/$defs/Lookup"
},
"type": {
"$ref": "#/$defs/RelationshipLookup"
"$ref": "#/$defs/Lookup"
},
"agent": {
"$ref": "#/$defs/RelationshipLookup"
"$ref": "#/$defs/Lookup"
},
"scope": {
"$ref": "#/$defs/Lookup"
},
"labels": {
"additionalProperties": {
Expand All @@ -337,21 +358,6 @@
"additionalProperties": false,
"type": "object"
},
"RelationshipLookup": {
"properties": {
"expr": {
"type": "string"
},
"value": {
"type": "string"
},
"label": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object"
},
"SecretKeySelector": {
"properties": {
"name": {
Expand Down
Loading
Loading