-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Graduate metrics/v1alpha1 to v1beta1 #51653
Graduate metrics/v1alpha1 to v1beta1 #51653
Conversation
cc @kubernetes/sig-instrumentation-api-reviews cc @piosz |
Is there a feature issue to attach to this? |
Whoops, yep, will do -- it's part of kubernetes/enhancements#118 ("the master metrics API... needs to be stabilized"). |
/retest |
let's see if that actually kicks the tests off -- it's been sitting here for a day, not doing anything |
b6221aa
to
5b8f083
Compare
So other than the name of the group I don't see any issues here with API. Will need sig approval and LGTM though. |
5b8f083
to
2451b45
Compare
@@ -22,7 +22,7 @@ import ( | |||
) | |||
|
|||
// GroupName is the group name use in this package | |||
const GroupName = "metrics" | |||
const GroupName = "resource-metrics.metrics.k8s.io" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not having just metrics.k8s.io
. metrics.metrics sounds weird to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have custom-metrics.metrics.k8s.io, so it just seemed strange to use it as both a "namespace" for groups and a group itself. This would make it resource-metrics.metrics and custom-metrics.metrics, so they match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have:
metrics.k8s.io
for resource metrics
custom.metrics.k8s.io
for custom metrics?
Yeah those groups sound fine to me. |
We can get a release exception if that goes past code freeze since this would be new APIs, so if we generally agree on the shorter names we should do that for 1.8 |
// +k8s:deepcopy-gen=package,register | ||
|
||
// +groupName=resource-metrics.metrics.k8s.io |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How was group name decided? Is there a reason to stutter? "resource.metrics.k8s.io" is shorter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(this was my old comment that was not committed).
I'd prefer metrics.k8s.io
and custom.metrics.k8s.io
@smarterclayton which group names sound fine for you? |
SGTM |
@smarterclayton cool |
@@ -215,7 +214,8 @@ func Convert_batch_JobTemplate_To_v1beta1_JobTemplate(in *batch.JobTemplate, out | |||
|
|||
func autoConvert_v1beta1_JobTemplateSpec_To_batch_JobTemplateSpec(in *v1beta1.JobTemplateSpec, out *batch.JobTemplateSpec, s conversion.Scope) error { | |||
out.ObjectMeta = in.ObjectMeta | |||
if err := batch_v1.Convert_v1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { | |||
// TODO: Inefficient conversion - can we improve it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change intended? Looks weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it's not. It's weird that the conversion-gen changed it...
pkg/generated/openapi/BUILD
Outdated
@@ -59,6 +59,7 @@ openapi_library( | |||
"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1", | |||
"k8s.io/metrics/pkg/apis/custom_metrics/v1alpha1", | |||
"k8s.io/metrics/pkg/apis/metrics/v1alpha1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be removed?
@@ -98,6 +98,7 @@ func New() *Generator { | |||
`k8s.io/api/networking/v1`, | |||
`k8s.io/kubernetes/federation/apis/federation/v1beta1`, | |||
`k8s.io/metrics/pkg/apis/metrics/v1alpha1`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
) | ||
|
||
// GroupName is the group name use in this package | ||
const GroupName = "metrics" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metrics.k8s.io?
/approve Names |
bc506b3
to
c571aac
Compare
/retest |
Wait... when did kops drop off the required list?! I'm not complaining; it was blocking the world. Just didn't notice before I started the retest. |
It is non-blocking while they work out why it wasn't running tests using the test code from the PR being tested |
Automatic merge from submit-queue (batch tested with PRs 49727, 51792) Introducing metrics-server ref kubernetes/enhancements#271 There is still some work blocked on problems with repo synchronization: - migrate to `v1beta1` introduced in #51653 - bump deps to HEAD Will do it in a follow up PRs once the issue is resolved. ```release-note Introduced Metrics Server ```
This commit graduates them resource metrics API from v1alpha1 to v1beta1.
This commit updates the REST metrics client to use metrics/v1beta1. The legacy client still uses metrics/v1alpha1.
This commit renames metrics to metrics.k8s.io for the v1beta1 version, to give it a properly namespaced name which mirrors custom.metrics.k8s.io.
c571aac
to
e1a22e8
Compare
@DirectXMan12: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
@piosz is there an active release exception covering this yet? This is API approved |
@smarterclayton I don't know how the exception process works but my feeling is that it was reviewed and approved before the code freeze. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DirectXMan12, piosz, smarterclayton Associated issue: 118 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 51603, 51653) |
Ups. I unintentionally triggered merge. We can consider reverting this if people disagree with my #51653 (comment). |
This introduces v1beta1 of the resource metrics API, previously in alpha.
The v1alpha1 version remains for compatibility with the Heapster legacy version
of the resource metrics API, which is compatible with the v1alpha1 version. It also
renames the v1beta1 version to
resource-metrics.metrics.k8s.io
.The HPA controller's REST clients (but not the legacy client) have been migrated as well.
Part of kubernetes/enhancements#118.