Skip to content

Conversation

@mmamczur
Copy link
Contributor

This just moves some types/functions to different packages.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 20, 2025
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 20, 2025
@mmamczur
Copy link
Contributor Author

/assign @TortillaZHawaii
/assign @kl52752

@mmamczur
Copy link
Contributor Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 20, 2025
Copy link
Member

@TortillaZHawaii TortillaZHawaii left a comment

Choose a reason for hiding this comment

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

Just a small request to change pkg/annotations to pkg/l7annotations or whatever name that would suggest that it is only for L7 application load balancers.

Comment on lines +45 to +53
// Service represents Service annotations.
type Service struct {
v map[string]string
}

// FromService extracts the annotations from an Service definition.
func FromService(obj *v1.Service) *Service {
return &Service{obj.Annotations}
}
Copy link
Member

Choose a reason for hiding this comment

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

This looks like an awkward API now. To get actual information related to NEGs we need to first call FromService, get *Service object and then call .NEGAnnotation or .NEGStatus on it. Since this PR only moves it around I would leave it, but I think it will lead to confusion for later users.

Also it's hard for me to decipher why some names use full caps NEG while others Neg. It should be NEG when it's in the middle of the word, or is exported; or neg if it's the first word and it's internal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know the answers to these questions or more, why someone decided to do it this way.

We can follow up with changing this code and after this CL we can easily change L4 and NEG but leave Ingress alone

@@ -1 +1 @@
/*
Copy link
Member

Choose a reason for hiding this comment

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

Can the package be renamed to l7annotations? It could be non obvious for others that the L4 annotations shouldn't go to annotations anymore.


// GetL4LoggingConfigMapAnnotation returns name of the config map which contains logging config.
// Returns false if annotation with the name is not specified.
func (svc *Service) GetL4LoggingConfigMapAnnotation() (string, bool) {
Copy link
Member

Choose a reason for hiding this comment

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

it's confusing to me why some func in this file use *Service, and others *v1.Service. Since this PR is just moving stuff let's leave it, but for the end user of this functions it looks awkward.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know why it was made this way but Service is a type inside this file as just annotations container while v1.Service is the full k8s resource... :/

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 20, 2025
@mmamczur mmamczur force-pushed the split_l4_neg_ingress branch from b33838b to a8b1dcc Compare November 21, 2025 14:04
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 21, 2025
@mmamczur
Copy link
Contributor Author

/assign @kl52752

Copy link
Contributor

@kl52752 kl52752 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 27, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kl52752, mmamczur

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

@mmamczur
Copy link
Contributor Author

mmamczur commented Dec 2, 2025

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 2, 2025
@k8s-ci-robot k8s-ci-robot merged commit 3ca6bb5 into kubernetes:master Dec 2, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants