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

chore: pick update headless svc labels for the prometheus scrape job to release-0.9 (#8088) #8098

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pkg/constant/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ func GetClusterWellKnownLabels(clusterName string) map[string]string {
}
}

// GetKBKnownLabels returns the kb-known labels for the headless svc
func GetKBKnownLabels() map[string]string {
return map[string]string{
AppManagedByLabelKey: AppName,
}
}

// GetComponentWellKnownLabels returns the well-known labels for Component API
func GetComponentWellKnownLabels(clusterName, componentName string) map[string]string {
return map[string]string{
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/instanceset/object_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func buildHeadlessSvc(its workloads.InstanceSet, labels, selectors map[string]st
annotations := ParseAnnotationsOfScope(HeadlessServiceScope, its.Annotations)
hdlBuilder := builder.NewHeadlessServiceBuilder(its.Namespace, getHeadlessSvcName(its.Name)).
AddLabelsInMap(labels).
AddLabelsInMap(constant.GetKBKnownLabels()).
AddSelectorsInMap(selectors).
AddAnnotationsInMap(annotations).
SetPublishNotReadyAddresses(true)
Expand Down
Loading