ricardozanini commented on code in PR #482:
URL:
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/482#discussion_r1630110990
##########
controllers/platform/k8s.go:
##########
@@ -233,8 +233,12 @@ func createOrUpdateService(ctx context.Context, client
client.Client, platform *
func getLabels(platform *operatorapi.SonataFlowPlatform, psh
services.PlatformServiceHandler) (map[string]string, map[string]string) {
lbl := map[string]string{
- workflowproj.LabelApp: platform.Name,
- workflowproj.LabelService: psh.GetServiceName(),
+ workflowproj.LabelApp: platform.Name,
+ workflowproj.LabelService: psh.GetServiceName(),
+ "app.kubernetes.io/name": psh.GetServiceName(),
+ "app.kubernetes.io/component": psh.GetContainerName(),
+ "app.kubernetes.io/part-of": platform.Name,
+ "app.kubernetes.io/managed-by": "sonataflow-operator",
Review Comment:
Please add these to
https://github.com/apache/incubator-kie-kogito-serverless-operator/blob/main/api/metadata/annotations.go#L22
##########
workflowproj/operator.go:
##########
@@ -85,8 +85,12 @@ func GetManagedPropertiesFileName(workflow
*operatorapi.SonataFlow) string {
// GetDefaultLabels gets the default labels based on the given workflow.
func GetDefaultLabels(workflow *operatorapi.SonataFlow) map[string]string {
return map[string]string{
- LabelApp: workflow.Name,
- LabelWorkflow: workflow.Name,
+ LabelApp: workflow.Name,
+ LabelWorkflow: workflow.Name,
+ "app.kubernetes.io/name": workflow.Name,
+ "app.kubernetes.io/component": "serverless-workflow",
+ "app.kubernetes.io/part-of":
workflow.Status.Services.DataIndexRef.Url,
Review Comment:
How hard it's to get the platform name here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]