-
Notifications
You must be signed in to change notification settings - Fork 124
[Server] Upgrade to v1beta1
schema.
#484
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
Conversation
e4e4670
to
210d03b
Compare
A month old at this point…. Merge conflicts. |
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
2f61d4b
to
8c73a0d
Compare
@@ -26,7 +28,10 @@ func NewRegoInstance(policyDir string, regManager *registry.RegistryManager) (*R | |||
var store storage.Store | |||
|
|||
ctx := context.Background() | |||
registeredRelationships, _, _ := regManager.GetEntities(&v1alpha1.RelationshipFilter{}) | |||
registeredRelationships, _, _, err := regManager.GetEntities(&v1alpha2.RelationshipFilter{}) |
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.
This is a concern separate from v1beta1 for Components.
Relationships v1alpha2 was to have been completely previously, right? Should this go forward independently?
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.
Yes, v1alpha2 was completed, but the update was done inplace, i.e. v1alpha1 struct were simply updated in place.
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.
If that work was done well and was completed, would we expect that the only change necessary here be that of a swap from “1 “to “2”?
@@ -51,7 +56,10 @@ func (r *Rego) RegoPolicyHandler(regoQueryString string, designFile []byte) (int | |||
} | |||
regoEngine, err := rego.New( | |||
rego.Query(regoQueryString), | |||
rego.Load([]string{r.policyDir}, nil), | |||
rego.Load([]string{r.policyDir}, func(abspath string, info fs.FileInfo, depth int) bool { |
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.
Please add comments here and update Meshery Docs.
Is this loading Rego policy from each individual model?
|
||
const SchemaVersion = "core.meshery.io/v1alpha2" | ||
|
||
type RelationshipDefinition struct { |
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.
Was this generated from schema?
|
||
// Component is the structure for the core OAM Application Component | ||
// Component is the structure for the core Application Component |
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.
What’s an Application Component?
type Component struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec ComponentSpec `json:"spec,omitempty"` | ||
} | ||
|
||
// ComponentSpec is the structure for the core OAM Application Component Spec | ||
// ComponentSpec is the structure for the core Application Component Spec |
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.
Clean this up, please.
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.
File needs renamed?
What is metav1
? Is there a schema for this?
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.
No, the namings have been inspired from k8s packages, v1 in metav1 eflects the schema version.
These are OAM constructs that is most appropriate to address with v1beta1 version of design schema
@@ -46,7 +46,7 @@ func GetKindFromComponent(comp Component) string { | |||
return kind | |||
} | |||
|
|||
func GetAnnotationsForWorkload(w v1alpha1.ComponentDefinition) map[string]string { | |||
func GetAnnotationsForWorkload(w ComponentDefinition) map[string]string { |
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.
What’s a Workload?
What considerations need to be made for Meshery server upgrades and for Meshery design compatibility? Is there a corresponding PR for Meshery extensions (e.g. MeshMap)? @aabidsofi19 |
Yes, there's a PR in meshery-extensions. |
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
9de637b
to
2b55870
Compare
Signed-off-by: MUzairS15 <[email protected]>
Description
This PR fixes #
Notes for Reviewers
Signed commits