-
Notifications
You must be signed in to change notification settings - Fork 1
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
F2f refactor #13
base: master
Are you sure you want to change the base?
F2f refactor #13
Conversation
Signed-off-by: Christopher Sams <csams@redhat.com>
Make Resource a distinct resource type that's disconnected from specific resource types other than by convention. Signed-off-by: Christopher Sams <csams@redhat.com>
Signed-off-by: Christopher Sams <csams@redhat.com>
Signed-off-by: Christopher Sams <csams@redhat.com>
Signed-off-by: Christopher Sams <csams@redhat.com>
Signed-off-by: Christopher Sams <csams@redhat.com>
For POST of a k8scluster:
|
|
||
servers: | ||
- url: https://console.redhat.com | ||
|
||
paths: | ||
/api/inventory/v1.0/resources: | ||
description: Base path for common inventory | ||
description: Retrieve a heterogenous list of Resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this just return what resource types are being managed by the inventory - and not the instances itself ? The instance list could be very large and unless we allow robust filtering it may not be that useful. In that case the minimal filtering should be labels, resource_types and perhaps some attributes even. (example clusters and rhel machines-that-has-gpu for dev env)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like you have not focused on the filters yet - so then you can ignore that part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I have comments below about querying and how that needs to be figured out.
- $ref: '#/components/schemas/RootPolicyDetail' | ||
- $ref: '#/components/schemas/IntermediatePolicyDetail' | ||
|
||
K8sCluster: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets populate a real example - if it makese sense. Would be happy to provide real data for this if it helps
schema: | ||
$ref: "#/components/schemas/K8sCluster" | ||
responses: | ||
"200": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this return 200 or 202?
What is the thought process -
- if we are going to accept the request and then process async, it better be 202. We really cannot generate a CI-cluster-id yet, can we?
- Also if ACS and ACM (just making it up) tries to
POST
on same cluster at different times, we will not be creating 2 different resources, will we?
I apologize for using the term intermediate-policy. We should remove this. This is in a reality an internal implementation detail which in theory ACM could change it.
Queries usually are -
|
On a PUT, the following attributes should not be allowed to change:
What is the diff between ExternalClusterID and ResourceIDAlias? How is the reporter identified, e.g. if ACS posted about cluster Foo and ACM posted about cluster Foo? i see "type" under reporter in the GET, but not in the POST. |
Do we need to consider store the status/state in common inventory? I think we should.
|
schema: | ||
$ref: "#/components/schemas/Error" | ||
|
||
/api/inventory/v1.0/resources/k8s-clusters/{id}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to v1.0/v1.1? maybe just v1/v2
in: path | ||
schema: | ||
type: string | ||
required: true | ||
description: |- | ||
The resource ID assigned to the resource by the inventory. | ||
A reporter alias may also be used as a resource ID using the format: | ||
A reporter alias may also be used as a resource ID using the format: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate how to generate the instanceId for the reporter? the same reporter may report multiple resources. how to ensure the instanceId is the same for the same reporter? do we store it somewhere?
What identifies a cluster uniquely. Posing this question given that we may have to disambiguate (between 2 different tools reporting data about the same cluster). Unless we have a unique fingerprint that detects a cluster (kind of natural primary key), how can we do this? |
@bjoydeep Great point. This needs to be explicitly rendered in the model. For k8sclusters, I think that we said, when kubeVendor = OpenShift, then id would be UUID. When kubeVendor=EKS, it would be the cluster ARN, etc |
Updates per the F2F