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
KEP-2436 Leader Migration: to beta #103533
KEP-2436 Leader Migration: to beta #103533
Conversation
/assign @jpbetz |
Do we need conversions or defautls for v1beta1 like exist for v1alpha1? |
Conversions from/to v1beta1 are generated. Defaults are applied to internal version only. |
/lgtm |
@@ -49,5 +50,5 @@ func SetupCurrentKubernetesSpecificFeatureGates(featuregates featuregate.Mutable | |||
// To add a new feature, define a key for it at k8s.io/api/pkg/features and add it here. | |||
var cloudPublicFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ | |||
IPv6DualStack: {Default: true, PreRelease: featuregate.Beta}, | |||
ControllerManagerLeaderMigration: {Default: false, PreRelease: featuregate.Alpha}, | |||
ControllerManagerLeaderMigration: {Default: true, PreRelease: featuregate.Beta}, |
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.
I believe this should also exist in pkg/features/kube_features.go. (ala IPv6DualStack)
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 had this discussion when working on alpha. The conclusion was that ControllerManagerLeaderMigration
is a feature flag local to staging/controller-manger
thus does not need a place in pkg/features/kube_features.go
. I do not see a reason to inverse such conclusion during alpha-to-beta graduation. Could you illiterate a bit more why we need it in pkg/features/kube_features.go
now?
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.
I don't believe we did have a discussion on this in alpha. You did in fact make this assertion during alpha (#99417 (comment)) however I did not agree then and still do not. However as an alpha feature I was unwilling to block based on that alone. For beta I do consider this to be blocking. pkg/feature/kube_features is the master list and if its missing from there it will be missing from places like https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/.
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.
Thanks for pointing out the doc. Updating now.
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
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.
Are we getting rid of GenericControllerManagerConfiguration (https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/controller-manager/config/v1alpha1/types.go#L25)? If not then I think it should be moving to v1beta1 as well.
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.
GenericControllerManagerConfiguration
is extracted from common part of corresponding structures of KCM and CCM during the "make staging/controller-manager easier to consume task by @cici37". It is still needed unless we want to rollback any changes during the task. However, GenericControllerManagerConfiguration
should not go to v1beta
because:
- The stability is unknown, but it is definitely less than beta
- We are keeping
v1alpha
package following convention of how we graduate resources with feature, it would not hurt to keep GenericControllerManagerConfiguration there. There are examples of some resources in a group graduate later than other resources.CronJob
goes GA only in 1.21 while others of groupbatch
are GA long before 1.21 - If we are to graduate GenericControllerManagerConfiguration to beta, it would be far out of scope of this PR. We can do this in a separate PR to avoid scope creeping.
/assign @cheftako |
/cc @andrewsykim |
Fixing feature conflicts, 2nd time. |
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.
/approve
for pkg/features
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewsykim, BenTheElder, cheftako, jiahuif 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 |
/milestone v1.22 |
/retest |
This feature was in staging/src/k8s.io/controller-manager/pkg/features/kube_features.go but missing here.
fixing conflicts for the 3rd time. |
/retest |
/lgtm |
Here is a second batch for feature gate updates in 1.22. - CPUManagerPolicyOptions kubernetes/kubernetes#101432 - ControllerManagerLeaderMigration kubernetes/kubernetes#103533 - DelegateFSGroupToCSIDriver kubernetes/kubernetes#103244 - DynamicKubeletConfig kubernetes/kubernetes#102966 - EndpointSliceProxying kubernetes/kubernetes#103451 - EndpointSliceTerminatingCondition kubernetes/kubernetes#103596 - HugePageStorageMediumSize kubernetes/kubernetes#99144 - JobTrackingWithFinalizers kubernetes/kubernetes#98817 (also tracked in kubernetes#28841, can rebase). - MemoryQoS kubernetes/kubernetes#102970 - NodeSwap kubernetes/kubernetes#102823, kubernetes/kubernetes#103553 - ServiceInternalTrafficPolicy kubernetes/kubernetes#103462 - StatefulSetAutoDeletePVC kubernetes/kubernetes#99378 - WindowsEndpointSliceProxying kubernetes/kubernetes#103451 Some of these needs more detailed documentation.
Here is a second batch for feature gate updates in 1.22. - CPUManagerPolicyOptions kubernetes/kubernetes#101432 - ControllerManagerLeaderMigration kubernetes/kubernetes#103533 - DelegateFSGroupToCSIDriver kubernetes/kubernetes#103244 - DynamicKubeletConfig kubernetes/kubernetes#102966 - EndpointSliceProxying kubernetes/kubernetes#103451 - EndpointSliceTerminatingCondition kubernetes/kubernetes#103596 - HugePageStorageMediumSize kubernetes/kubernetes#99144 - JobTrackingWithFinalizers kubernetes/kubernetes#98817 (also tracked in kubernetes#28841, can rebase). - MemoryQoS kubernetes/kubernetes#102970 - NodeSwap kubernetes/kubernetes#102823, kubernetes/kubernetes#103553 - ServiceInternalTrafficPolicy kubernetes/kubernetes#103462 - StatefulSetAutoDeletePVC kubernetes/kubernetes#99378 - WindowsEndpointSliceProxying kubernetes/kubernetes#103451 Some of these needs more detailed documentation.
Here is a second batch for feature gate updates in 1.22. - CPUManagerPolicyOptions kubernetes/kubernetes#101432 - ControllerManagerLeaderMigration kubernetes/kubernetes#103533 - DelegateFSGroupToCSIDriver kubernetes/kubernetes#103244 - DynamicKubeletConfig kubernetes/kubernetes#102966 - EndpointSliceProxying kubernetes/kubernetes#103451 - EndpointSliceTerminatingCondition kubernetes/kubernetes#103596 - HugePageStorageMediumSize kubernetes/kubernetes#99144 - JobTrackingWithFinalizers kubernetes/kubernetes#98817 (also tracked in kubernetes#28841, can rebase). - MemoryQoS kubernetes/kubernetes#102970 - ServiceInternalTrafficPolicy kubernetes/kubernetes#103462 - StatefulSetAutoDeletePVC kubernetes/kubernetes#99378 - WindowsEndpointSliceProxying kubernetes/kubernetes#103451 Some of these needs more detailed documentation.
Here is a second batch for feature gate updates in 1.22. - CPUManagerPolicyOptions kubernetes/kubernetes#101432 - ControllerManagerLeaderMigration kubernetes/kubernetes#103533 - DynamicKubeletConfig kubernetes/kubernetes#102966 - EndpointSliceProxying kubernetes/kubernetes#103451 - EndpointSliceTerminatingCondition kubernetes/kubernetes#103596 - HugePageStorageMediumSize kubernetes/kubernetes#99144 - JobTrackingWithFinalizers kubernetes/kubernetes#98817 (also tracked in kubernetes#28841, can rebase). - MemoryQoS kubernetes/kubernetes#102970 - ServiceInternalTrafficPolicy kubernetes/kubernetes#103462 - StatefulSetAutoDeletePVC kubernetes/kubernetes#99378 - WindowsEndpointSliceProxying kubernetes/kubernetes#103451 Some of these needs more detailed documentation.
Here is a second batch for feature gate updates in 1.22. - CPUManagerPolicyOptions kubernetes/kubernetes#101432 - ControllerManagerLeaderMigration kubernetes/kubernetes#103533 - DynamicKubeletConfig kubernetes/kubernetes#102966 - EndpointSliceProxying kubernetes/kubernetes#103451 - EndpointSliceTerminatingCondition kubernetes/kubernetes#103596 - HugePageStorageMediumSize kubernetes/kubernetes#99144 - JobTrackingWithFinalizers kubernetes/kubernetes#98817 (also tracked in kubernetes#28841, can rebase). - ServiceInternalTrafficPolicy kubernetes/kubernetes#103462 - WindowsEndpointSliceProxying kubernetes/kubernetes#103451 Some of these needs more detailed documentation.
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR graduates kubernetes/enhancements#2436 , Leader Migration for Controller Managers, from alpha to beta, by making following changes:
v1alpha
resource definitions tov1beta
, and add corresponding registration & tests.Special notes for your reviewer:
Leader Migration can graduate to beta because:
For
vendor/
approver: This PR adds a new modulek8s.io/controller-manager/config/v1beta1
as a result of API graduation. The module needs to be vendor'ed as a part ofk8s.io/controller-manager
.For feature approver: This PR adds a feature gate defined in
staging/src/k8s.io/controller-manager/pkg/features/kube_features.go
topkg/features/kube_features.go
so thatpkg/features/kube_features.go
contains all feature gates ofk8s.io/controller-manager
.Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
[1] SIG Cloud Provider Meeting Agenda, June 23