-
Notifications
You must be signed in to change notification settings - Fork 39.3k
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 indexed job to beta #101292
Graduate indexed job to beta #101292
Conversation
Hi @AliceZhang2016. 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 Once the patch is verified, the new status will be reflected by the 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. |
"sync" | ||
|
||
"k8s.io/component-base/metrics" | ||
"k8s.io/component-base/metrics/legacyregistry" |
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.
The name of this package suggests it's deprecated. We can probably use prometheus as suggested here https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/instrumentation.md#quick-start
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.
The code of package metrics seems only wraps the prometheus, it also uses prometheus inside. https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/component-base/metrics/histogram.go#L95
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.
In that sense, there is no need for using legacyregistry, just use prometheus directly. Note that the guide was updated in February, so it's pretty up to date.
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.
but the example in that guide was updated 6 years ago.
kubernetes/pkg/apiserver/apiserver.go
Line 53 in cd32993
requestCounter = prometheus.NewCounterVec( |
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.
@logicalhan what is the up-to-date recommendation?
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.
You can't use prometheus directly, we actually have CI checks which should block you from merging PRs that use prometheus. The legacyregistry is deprecated because we want to eventually move off of using globals, which should happen hopefully this upcoming release.
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.
So the recommendation is to use the wrappers (from component base) and currently legacyregistry unless you are exposing a new metrics endpoint. I've submitted a PR to update the docs (kubernetes/community#5737), sorry for the confusion.
/ok-to-test |
7475e81
to
2f1341f
Compare
/triage accepted |
2f1341f
to
9c87df8
Compare
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.
/lgtm
(from sig instrumentation) sorry about the confusion in the docs.
9f3f610
to
8dbccdc
Compare
/lgtm |
8dbccdc
to
07f0ceb
Compare
07f0ceb
to
0c99f29
Compare
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.
/lgtm
validation change looks good to me. eric's approve is now effective |
/hold cancel |
This PR updates the feature gate status based on upstream implementation. The chanegs are listed below with links to upstream PRs merged: - BalanceAttacedNodeVolumes kubernetes/kubernetes#102443 - CSIMigrationvSphereComplete kubernetes/kubernetes#101272 - CSIServiceAccountToken kubernetes/kubernetes#103001 - DaemonSetUpdateSurge kubernetes/kubernetes#101742 - DisableCloudProviders kubernetes/kubernetes#100136 - IndexedJob kubernetes/kubernetes#101292 - LegacyNodeRoleBehavior kubernetes/kubernetes#100776 - NamespaceDefaultLabelName kubernetes/kubernetes#101342 - NetworkPolicyEndPort kubernetes/kubernetes#102834 - NodeDisruptionExclusion kubernetes/kubernetes#100776 - PodAffinityNamespaceSelector kubernetes/kubernetes#101496 - PodDeletionCost kubernetes/kubernetes#101080 - PreferNominatedNode kubernetes/kubernetes#102201 - ServiceLoadBalancerClass kubernetes/kubernetes#103129 - ServiceNodeExclusion kubernetes/kubernetes#100776 - ServiceTopology kubernetes/kubernetes#102412 - SizeMemoryBackedVoluems kubernetes/kubernetes#101048 - StatefulSetMinReadySeconds kubernetes/kubernetes#100842 - SuspendJob kubernetes/kubernetes#102022 - WindowsHostProcessContainers kubernetes/kubernetes#99576
This PR updates the feature gate status based on upstream implementation. The chanegs are listed below with links to upstream PRs merged: - BalanceAttacedNodeVolumes kubernetes/kubernetes#102443 - CSIMigrationvSphereComplete kubernetes/kubernetes#101272 - CSIServiceAccountToken kubernetes/kubernetes#103001 - DaemonSetUpdateSurge kubernetes/kubernetes#101742 - DisableCloudProviders kubernetes/kubernetes#100136 - IndexedJob kubernetes/kubernetes#101292 - LegacyNodeRoleBehavior kubernetes/kubernetes#100776 - NamespaceDefaultLabelName kubernetes/kubernetes#101342 - NetworkPolicyEndPort kubernetes/kubernetes#102834 - NodeDisruptionExclusion kubernetes/kubernetes#100776 - PodAffinityNamespaceSelector kubernetes/kubernetes#101496 - PodDeletionCost kubernetes/kubernetes#101080 - PreferNominatedNode kubernetes/kubernetes#102201 - ServiceLoadBalancerClass kubernetes/kubernetes#103129 - ServiceNodeExclusion kubernetes/kubernetes#100776 - ServiceTopology kubernetes/kubernetes#102412 - SizeMemoryBackedVoluems kubernetes/kubernetes#101048 - StatefulSetMinReadySeconds kubernetes/kubernetes#100842 - SuspendJob kubernetes/kubernetes#102022 - WindowsHostProcessContainers kubernetes/kubernetes#99576
This PR updates the feature gate status based on upstream implementation. The chanegs are listed below with links to upstream PRs merged: - BalanceAttacedNodeVolumes kubernetes/kubernetes#102443 - CSIMigrationvSphereComplete kubernetes/kubernetes#101272 - CSIServiceAccountToken kubernetes/kubernetes#103001 - DaemonSetUpdateSurge kubernetes/kubernetes#101742 - DisableCloudProviders kubernetes/kubernetes#100136 - IndexedJob kubernetes/kubernetes#101292 - LegacyNodeRoleBehavior kubernetes/kubernetes#100776 - NamespaceDefaultLabelName kubernetes/kubernetes#101342 - NetworkPolicyEndPort kubernetes/kubernetes#102834 - NodeDisruptionExclusion kubernetes/kubernetes#100776 - PodAffinityNamespaceSelector kubernetes/kubernetes#101496 - PodDeletionCost kubernetes/kubernetes#101080 - PreferNominatedNode kubernetes/kubernetes#102201 - ServiceLoadBalancerClass kubernetes/kubernetes#103129 - ServiceNodeExclusion kubernetes/kubernetes#100776 - ServiceTopology kubernetes/kubernetes#102412 - SizeMemoryBackedVoluems kubernetes/kubernetes#101048 - StatefulSetMinReadySeconds kubernetes/kubernetes#100842 - SuspendJob kubernetes/kubernetes#102022 - WindowsHostProcessContainers kubernetes/kubernetes#99576
This PR updates the feature gate status based on upstream implementation. The chanegs are listed below with links to upstream PRs merged: - BalanceAttacedNodeVolumes kubernetes/kubernetes#102443 - CSIMigrationvSphereComplete kubernetes/kubernetes#101272 - CSIServiceAccountToken kubernetes/kubernetes#103001 - DaemonSetUpdateSurge kubernetes/kubernetes#101742 - DisableCloudProviders kubernetes/kubernetes#100136 - IndexedJob kubernetes/kubernetes#101292 - LegacyNodeRoleBehavior kubernetes/kubernetes#100776 - NamespaceDefaultLabelName kubernetes/kubernetes#101342 - NetworkPolicyEndPort kubernetes/kubernetes#102834 - NodeDisruptionExclusion kubernetes/kubernetes#100776 - PodAffinityNamespaceSelector kubernetes/kubernetes#101496 - PodDeletionCost kubernetes/kubernetes#101080 - PreferNominatedNode kubernetes/kubernetes#102201 - ServiceLoadBalancerClass kubernetes/kubernetes#103129 - ServiceNodeExclusion kubernetes/kubernetes#100776 - ServiceTopology kubernetes/kubernetes#102412 - SizeMemoryBackedVoluems kubernetes/kubernetes#101048 - StatefulSetMinReadySeconds kubernetes/kubernetes#100842 - SuspendJob kubernetes/kubernetes#102022 - WindowsHostProcessContainers kubernetes/kubernetes#99576
This PR updates the feature gate status based on upstream implementation. The chanegs are listed below with links to upstream PRs merged: - BalanceAttacedNodeVolumes kubernetes/kubernetes#102443 - CSIMigrationvSphereComplete kubernetes/kubernetes#101272 - CSIServiceAccountToken kubernetes/kubernetes#103001 - DaemonSetUpdateSurge kubernetes/kubernetes#101742 - DisableCloudProviders kubernetes/kubernetes#100136 - IndexedJob kubernetes/kubernetes#101292 - LegacyNodeRoleBehavior kubernetes/kubernetes#100776 - NamespaceDefaultLabelName kubernetes/kubernetes#101342 - NetworkPolicyEndPort kubernetes/kubernetes#102834 - NodeDisruptionExclusion kubernetes/kubernetes#100776 - PodAffinityNamespaceSelector kubernetes/kubernetes#101496 - PodDeletionCost kubernetes/kubernetes#101080 - PreferNominatedNode kubernetes/kubernetes#102201 - ServiceLoadBalancerClass kubernetes/kubernetes#103129 - ServiceNodeExclusion kubernetes/kubernetes#100776 - ServiceTopology kubernetes/kubernetes#102412 - SizeMemoryBackedVoluems kubernetes/kubernetes#101048 - StatefulSetMinReadySeconds kubernetes/kubernetes#100842 - SuspendJob kubernetes/kubernetes#102022 - WindowsHostProcessContainers kubernetes/kubernetes#99576
This PR updates the feature gate status based on upstream implementation. The chanegs are listed below with links to upstream PRs merged: - BalanceAttacedNodeVolumes kubernetes/kubernetes#102443 - CSIMigrationvSphereComplete kubernetes/kubernetes#101272 - CSIServiceAccountToken kubernetes/kubernetes#103001 - DaemonSetUpdateSurge kubernetes/kubernetes#101742 - DisableCloudProviders kubernetes/kubernetes#100136 - IndexedJob kubernetes/kubernetes#101292 - LegacyNodeRoleBehavior kubernetes/kubernetes#100776 - NamespaceDefaultLabelName kubernetes/kubernetes#101342 - NetworkPolicyEndPort kubernetes/kubernetes#102834 - NodeDisruptionExclusion kubernetes/kubernetes#100776 - PodAffinityNamespaceSelector kubernetes/kubernetes#101496 - PodDeletionCost kubernetes/kubernetes#101080 - PreferNominatedNode kubernetes/kubernetes#102201 - ServiceLoadBalancerClass kubernetes/kubernetes#103129 - ServiceNodeExclusion kubernetes/kubernetes#100776 - ServiceTopology kubernetes/kubernetes#102412 - SizeMemoryBackedVoluems kubernetes/kubernetes#101048 - StatefulSetMinReadySeconds kubernetes/kubernetes#100842 - SuspendJob kubernetes/kubernetes#102022 - WindowsHostProcessContainers kubernetes/kubernetes#99576
This PR updates the feature gate status based on upstream implementation. The chanegs are listed below with links to upstream PRs merged: - BalanceAttacedNodeVolumes kubernetes/kubernetes#102443 - CSIMigrationvSphereComplete kubernetes/kubernetes#101272 - CSIServiceAccountToken kubernetes/kubernetes#103001 - DaemonSetUpdateSurge kubernetes/kubernetes#101742 - DisableCloudProviders kubernetes/kubernetes#100136 - IndexedJob kubernetes/kubernetes#101292 - LegacyNodeRoleBehavior kubernetes/kubernetes#100776 - NamespaceDefaultLabelName kubernetes/kubernetes#101342 - NetworkPolicyEndPort kubernetes/kubernetes#102834 - NodeDisruptionExclusion kubernetes/kubernetes#100776 - PodAffinityNamespaceSelector kubernetes/kubernetes#101496 - PodDeletionCost kubernetes/kubernetes#101080 - PreferNominatedNode kubernetes/kubernetes#102201 - ServiceLoadBalancerClass kubernetes/kubernetes#103129 - ServiceNodeExclusion kubernetes/kubernetes#100776 - ServiceTopology kubernetes/kubernetes#102412 - SizeMemoryBackedVoluems kubernetes/kubernetes#101048 - StatefulSetMinReadySeconds kubernetes/kubernetes#100842 - SuspendJob kubernetes/kubernetes#102022 - WindowsHostProcessContainers kubernetes/kubernetes#99576
This PR updates the feature gate status based on upstream implementation. The chanegs are listed below with links to upstream PRs merged: - BalanceAttacedNodeVolumes kubernetes/kubernetes#102443 - CSIMigrationvSphereComplete kubernetes/kubernetes#101272 - CSIServiceAccountToken kubernetes/kubernetes#103001 - DaemonSetUpdateSurge kubernetes/kubernetes#101742 - DisableCloudProviders kubernetes/kubernetes#100136 - IndexedJob kubernetes/kubernetes#101292 - LegacyNodeRoleBehavior kubernetes/kubernetes#100776 - NamespaceDefaultLabelName kubernetes/kubernetes#101342 - NetworkPolicyEndPort kubernetes/kubernetes#102834 - NodeDisruptionExclusion kubernetes/kubernetes#100776 - PodAffinityNamespaceSelector kubernetes/kubernetes#101496 - PodDeletionCost kubernetes/kubernetes#101080 - PreferNominatedNode kubernetes/kubernetes#102201 - ServiceLoadBalancerClass kubernetes/kubernetes#103129 - ServiceNodeExclusion kubernetes/kubernetes#100776 - ServiceTopology kubernetes/kubernetes#102412 - SizeMemoryBackedVoluems kubernetes/kubernetes#101048 - StatefulSetMinReadySeconds kubernetes/kubernetes#100842 - SuspendJob kubernetes/kubernetes#102022 - WindowsHostProcessContainers kubernetes/kubernetes#99576
This PR updates the feature gate status based on upstream implementation. The chanegs are listed below with links to upstream PRs merged: - BalanceAttacedNodeVolumes kubernetes/kubernetes#102443 - CSIMigrationvSphereComplete kubernetes/kubernetes#101272 - CSIServiceAccountToken kubernetes/kubernetes#103001 - DaemonSetUpdateSurge kubernetes/kubernetes#101742 - DisableCloudProviders kubernetes/kubernetes#100136 - IndexedJob kubernetes/kubernetes#101292 - LegacyNodeRoleBehavior kubernetes/kubernetes#100776 - NamespaceDefaultLabelName kubernetes/kubernetes#101342 - NetworkPolicyEndPort kubernetes/kubernetes#102834 - NodeDisruptionExclusion kubernetes/kubernetes#100776 - PodAffinityNamespaceSelector kubernetes/kubernetes#101496 - PodDeletionCost kubernetes/kubernetes#101080 - PreferNominatedNode kubernetes/kubernetes#102201 - ServiceLoadBalancerClass kubernetes/kubernetes#103129 - ServiceNodeExclusion kubernetes/kubernetes#100776 - ServiceTopology kubernetes/kubernetes#102412 - SizeMemoryBackedVoluems kubernetes/kubernetes#101048 - StatefulSetMinReadySeconds kubernetes/kubernetes#100842 - SuspendJob kubernetes/kubernetes#102022 - WindowsHostProcessContainers kubernetes/kubernetes#99576
What type of PR is this?
/kind feature
What this PR does / why we need it:
Graduate indexed job from alpha to beta, contain three parts in total:
add three metrics to job controller:
a. job_sync_duration_seconds: tracks the latency of a Job sync.
b. job_sync_total: tracks the number of Job syncs.
c. job_finished_total: tracks the number of finished job.
add limitations pods create/delete operations per job sync, so that:
a. big job will not occupy controller too much time which may get other jobs stuck, due to too many pods create/delete at once.
b. gives much better predictability of metrics job_sync_duration_seconds
change the default feature gate value of "IndexedJob" from false to true, to make it enabled by default in beta.
Which issue(s) this PR fixes:
fixes #98434
Special notes for your reviewer:
This is a requirement to graduate indexed job to Beta
The PR of changing hostname and podname is #101601
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: