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

Add missing features to ingress metrics #1233

Merged
merged 1 commit into from
Aug 28, 2020

Conversation

spencerhance
Copy link
Contributor

@spencerhance spencerhance commented Aug 26, 2020

These features have been implemented but are currently not included in the metrics

  • SSLPolicy
  • Regional Static IP
  • Custom Health Checks

This PR adds metrics for them
All of them can be cherry-picked to v1.9 + v1.10

HTTPS Redirects will be added in a follow up since it is currently 1.10 only

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 26, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @spencerhance. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 26, 2020
@spencerhance
Copy link
Contributor Author

/assign @freehan

@spencerhance
Copy link
Contributor Author

/assign @prameshj

Pavithra, any chance you have bandwidth to review this?

@prameshj
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 26, 2020
@prameshj
Copy link
Contributor

Would it be better to split into 2 PRs - one with metrics that can be cherrypicked to 1.9 and one with those that cannot?

StaticIPNameKey: "user-spec-static-ip",
staticIPKey: "user-spec-static-ip",
StaticGlobalIPNameKey: "user-spec-static-ip",
staticIPKey: "user-spec-static-ip",
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should this value be an ip address?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both of the annotations represent the name of the address, rather than the address itself

@spencerhance
Copy link
Contributor Author

@prameshj Good call! I removed redirects from this. Once it is merged I'll submit a follow up PR.

@@ -191,15 +201,24 @@ func featuresForIngress(ing *v1beta1.Ingress) []feature {
if val, ok := ingAnnotations[staticIPKey]; ok && val != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean user has to specify both staticIPKey and StaticGlobalIPNameKey in order to use a given ip address name? Why do we need 2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, no staticIPKey is used as a status annotation


// Check for regional static IP
// We do this separately from the global static IP because regional static IP
// does not support the StaticIPKey annotation or a managed regional IP
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you rephrase this to say - "Controller does not populate StaticIPKey annotation when processing Regional static IP"?

Also, these annotations are also defined in annotations/ingress.go. Do they need to be redefined in features.go?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@skmatti what was the reason for this? Was there a circular dependency?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the comment

Copy link
Contributor

Choose a reason for hiding this comment

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

This was to enable backporting for the metrics PR to the release branches that do not have the annotations defined. Maybe it does not apply for these metrics.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay I removed the annotation

@spencerhance spencerhance force-pushed the 1-9-beta-metrics branch 2 times, most recently from fd32fc2 to 4989b38 Compare August 28, 2020 02:26

// Check for regional static IP
// We do this separately from the global static IP because Controller does not
// populate StaticIPKey annotation when processing Regional static IP regional static IP
Copy link
Contributor

Choose a reason for hiding this comment

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

remove

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

These features have been implemented but are currently not included in the metrics
- SSLPolicy
- Regional Static IP
- Custom Health Checks
Copy link
Contributor

@freehan freehan 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

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: freehan, spencerhance

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 28, 2020
@k8s-ci-robot k8s-ci-robot merged commit 906ebe7 into kubernetes:master Aug 28, 2020
@spencerhance spencerhance deleted the 1-9-beta-metrics branch August 28, 2020 23:22
k8s-ci-robot added a commit that referenced this pull request Aug 31, 2020
Cherry-pick #1233 [Add missing features to ingress metrics] into release-1-9
k8s-ci-robot added a commit that referenced this pull request Aug 31, 2020
Cherry-pick #1233 [Add missing features to ingress metrics] into release-1-10
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants