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

NO-JIRA: Fix oauth-v2 and kcm-v2 #5306

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update KCM node monitor grace period
  • Loading branch information
muraee committed Dec 16, 2024
commit 286d57fc3ecd918b5c2fa2a1912b6bda78972582
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ spec:
- --cluster-signing-duration=17520h
- --tls-cert-file=/etc/kubernetes/certs/server/tls.crt
- --tls-private-key-file=/etc/kubernetes/certs/server/tls.key
- --node-monitor-grace-period=50s
- --cluster-cidr=10.132.0.0/14
- --service-cluster-ip-range=
- --node-monitor-grace-period=50s
- --tls-min-version=VersionTLS12
- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
- --feature-gates=OpenShiftPodSecurityAdmission=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ spec:
- --cluster-signing-duration=17520h
- --tls-cert-file=/etc/kubernetes/certs/server/tls.crt
- --tls-private-key-file=/etc/kubernetes/certs/server/tls.key
- --node-monitor-grace-period=50s
- --cluster-cidr=10.132.0.0/14
- --service-cluster-ip-range=
- --node-monitor-grace-period=50s
- --tls-min-version=VersionTLS12
- --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
- --feature-gates=OpenShiftPodSecurityAdmission=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ kind: Deployment
metadata:
name: kube-controller-manager
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
Expand Down Expand Up @@ -49,7 +48,6 @@ spec:
- --cluster-signing-duration=17520h
- --tls-cert-file=/etc/kubernetes/certs/server/tls.crt
- --tls-private-key-file=/etc/kubernetes/certs/server/tls.key
- --node-monitor-grace-period=50s
command:
- hyperkube
- kube-controller-manager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/utils/ptr"

"sigs.k8s.io/controller-runtime/pkg/client"
)
Expand All @@ -35,6 +34,13 @@ func adaptDeployment(cpContext component.WorkloadContext, deployment *appsv1.Dep
if hcp.Spec.Platform.Type == hyperv1.AzurePlatform {
c.Args = append(c.Args, fmt.Sprintf("--cloud-provider=%s", "external"))
}

if hcp.Spec.Platform.Type == hyperv1.IBMCloudPlatform {
c.Args = append(c.Args, "--node-monitor-grace-period=55s")
} else {
c.Args = append(c.Args, "--node-monitor-grace-period=50s")
}

if tlsMinVersion := config.MinTLSVersion(hcp.Spec.Configuration.GetTLSSecurityProfile()); tlsMinVersion != "" {
c.Args = append(c.Args, fmt.Sprintf("--tls-min-version=%s", tlsMinVersion))
}
Expand All @@ -44,6 +50,7 @@ func adaptDeployment(cpContext component.WorkloadContext, deployment *appsv1.Dep
if util.StringListContains(hcp.Annotations[hyperv1.DisableProfilingAnnotation], ComponentName) {
c.Args = append(c.Args, "--profiling=false")
}

for _, f := range config.FeatureGates(hcp.Spec.Configuration.GetFeatureGateSelection()) {
c.Args = append(c.Args, fmt.Sprintf("--feature-gates=%s", f))
}
Expand All @@ -69,11 +76,6 @@ func adaptDeployment(cpContext component.WorkloadContext, deployment *appsv1.Dep
}
})

deployment.Spec.Replicas = ptr.To[int32](2)
if hcp.Spec.ControllerAvailabilityPolicy == hyperv1.SingleReplica {
deployment.Spec.Replicas = ptr.To[int32](1)
}

return nil
}

Expand Down