-
Notifications
You must be signed in to change notification settings - Fork 116
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
add support to provision crds/operators #331
Conversation
Signed-off-by: MUzairS15 <muzair.shaikh810@gmail.com>
@@ -54,6 +54,10 @@ func GetAnnotationsForWorkload(w v1alpha1.ComponentDefinition) map[string]string | |||
res[strings.ReplaceAll(fmt.Sprintf("%s.%s", MesheryAnnotationPrefix, key), " ", "")] = v | |||
} | |||
} | |||
sourceURI, ok := w.Model.Metadata["source_uri"].(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.
How is this construct still being used?
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.
OAM and all references should be gone.
"gorm.io/gorm" | ||
) | ||
|
||
type Host 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.
Are you moving this table out of memory and into the database? If so, use the connections
table, not a new hosts
table.
|
||
func (h *Host) AfterFind(tx *gorm.DB) error { | ||
switch h.Hostname { | ||
case "artifacthub": |
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.
The connections
table has explicit categories and types.
if !isDeploy { | ||
summary = fmt.Sprintf("Undeployed helm chart%s: %s", strings.TrimSuffix(comp.Spec.Type, ".K8s"), comp.Name) | ||
} else { | ||
summary = fmt.Sprintf("Deployed helm chart%s: %s", strings.TrimSuffix(comp.Spec.Type, ".K8s"), comp.Name) |
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.
Can we kill off this practice of .K8s
, @Abhishek-kumar09 ?
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.
We can easily let it go, because, there is no .k8s
now. This function just trims/removes that .K8s
from the string, which anyway isn't available.
@MUzairS15 Any other reason for this to stay in the code?
Metadata string | ||
CreatedAt time.Time `json:"-"` | ||
UpdatedAt time.Time `json:"-"` | ||
IHost IHost `gorm:"-"` |
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 does "I" stand for here?
Description
This PR fixes #
Notes for Reviewers
Signed commits