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

Update base MR service to include labels and annotations for the BFF #525

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

Griffin-Sullivan
Copy link
Contributor

@Griffin-Sullivan Griffin-Sullivan commented Oct 30, 2024

Description

Adding a new label called component and setting it to model-registry. This will allow us to filter services in the BFF rather than looping through all services.

Also adding annotations for displayName and description. The BFF looks for these annotations to display the name of the MR when changing registries in the UI. Everything will work without these but this is a nicer UX and can help with determining which model registry is which.

How Has This Been Tested?

Tested locally on kind and got:

curl localhost:4000/api/v1/model_registry
{
	"data": [
		{
			"name": "model-registry-service",
			"displayName": "Default Model Registry",
			"description": "The default model registry"
		}
	]
}

Merge criteria:

  • All the commits have been signed-off (To pass the DCO check)
  • The commits have meaningful messages; the author will squash them after approval or in case of manual merges will ask to merge with squash.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work.
  • Code changes follow the kubeflow contribution guidelines.

If you have UI changes

  • The developer has added tests or explained why testing cannot be added.
  • Included any necessary screenshots or gifs if it was a UI change.
  • Verify that UI/UX changes conform the UX guidelines for Kubeflow.

Copy link
Member

@ederign ederign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but let's wait for other chime in before merge.

Copy link
Contributor

@lucferbux lucferbux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Let's wait on @tarilabs just to confirm.

Copy link

@lucferbux: changing LGTM is restricted to collaborators

In response to this:

/lgtm

Let's wait on @tarilabs just to confirm.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@tarilabs tarilabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @Griffin-Sullivan

/lgtm

some minor comments and tagged people for 👀

Comment on lines 5 to 10
app: metadata
component: model-registry
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestion is to seize this chance to align label app and component in the Service here as:

Suggested change
app: metadata
component: model-registry
app: model-registry
component: model-registry-server

to be consistent with the Deployment:

kind: Deployment
metadata:
name: model-registry-deployment
labels:
component: model-registry-server

@Al-Pragliola @isinyaaa @dhirajsb wdyt ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The app name is used to group related resources in a single app. E.g. the MR itself, it's deployment, service, istio resources, etc. should all use the same app name.
So, we set it to the MR name downstream. The downstream labels are:

  labels:                                                                                                                
    app: modelregistry-sample                                                                                            
    app.kubernetes.io/component: model-registry                                                                          
    app.kubernetes.io/created-by: model-registry-operator                                                                
    app.kubernetes.io/instance: modelregistry-sample                                                                     
    app.kubernetes.io/managed-by: model-registry-operator                                                                
    app.kubernetes.io/name: modelregistry-sample                                                                         
    app.kubernetes.io/part-of: model-registry                                                                            
    component: model-registry                                                                                            
  name: modelregistry-sample                                                                                             

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I should add all of these labels?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Al-Pragliola can you take up the task of consolidating the useful ones from here into a replacements yaml for an MR template for overlays?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Griffin-Sullivan we can start with app, and component labels, we can definitely skip the operator label values as they don't apply.
We should use app.kubernetes.io labels to be consistent with k8s recommendations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhirajsb let me know what you think I added the changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the service name the same. The sample I shared was to show the label names as an example, not the label values for kubeflow manifests.

Comment on lines 8 to 9
displayName: Default Model Registry
description: The default model registry
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
displayName: Default Model Registry
description: The default model registry
displayName: Kubeflow Model Registry
description: An example model registry

@lucferbux
Copy link
Contributor

/lgtm
@tarilabs @dhirajsb what do you think know?

Copy link

@lucferbux: changing LGTM is restricted to collaborators

In response to this:

/lgtm
@tarilabs @dhirajsb what do you think know?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tarilabs
Copy link
Member

/lgtm @tarilabs @dhirajsb what do you think know?

it looks to me #525 (comment) is not yet addressed.

@dhirajsb
Copy link
Contributor

/lgtm

Copy link

@dhirajsb: changing LGTM is restricted to collaborators

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@@ -2,8 +2,16 @@ kind: Service
apiVersion: v1
metadata:
labels:
app: metadata
name: model-registry-service
app: modelregistry-sample
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
app: modelregistry-sample
app: model-registry-service

name: model-registry-service
app: modelregistry-sample
app.kubernetes.io/component: model-registry
app.kubernetes.io/instance: modelregistry-sample
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
app.kubernetes.io/instance: modelregistry-sample
app.kubernetes.io/instance: model-registry-service

app: modelregistry-sample
app.kubernetes.io/component: model-registry
app.kubernetes.io/instance: modelregistry-sample
app.kubernetes.io/name: modelregistry-sample
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
app.kubernetes.io/name: modelregistry-sample
app.kubernetes.io/name: model-registry-service

annotations:
displayName: Kubeflow Model Registry
description: An example model registry
name: modelregistry-sample
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: modelregistry-sample
name: model-registry-service

Signed-off-by: Griffin-Sullivan <gsulliva@redhat.com>
Copy link
Contributor

@dhirajsb dhirajsb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link

@dhirajsb: changing LGTM is restricted to collaborators

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@tarilabs tarilabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@google-oss-prow google-oss-prow bot added the lgtm label Nov 18, 2024
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhirajsb, ederign, lucferbux, tarilabs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit ee461ba into kubeflow:main Nov 18, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants