Skip to content

Commit

Permalink
fix the cluster name is digital
Browse files Browse the repository at this point in the history
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
  • Loading branch information
zhiweiyin318 authored and xiangjingli committed Sep 19, 2024
1 parent 90b7a75 commit 7cd39e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addon/manifests/permission/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: open-cluster-management:addons:application-manager
namespace: {{ .ClusterName }}
namespace: "{{ .ClusterName }}"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
6 changes: 6 additions & 0 deletions cmd/manager/exec/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"context"
"crypto/tls"
"fmt"
"math"
"net/http"
"os"
"strings"
Expand Down Expand Up @@ -245,6 +246,11 @@ func RunManager() {
os.Exit(1)
}

// Validate the LeaseDurationSeconds value to ensure it fits within int32 limits
if Options.LeaseDurationSeconds > math.MaxInt32 || Options.LeaseDurationSeconds < math.MinInt32 {
klog.Fatalf("lease-duration exceeds int32 range: %d", Options.LeaseDurationSeconds)
}

leaseReconciler := leasectrl.LeaseReconciler{
HubKubeClient: hubKubeClient,
HubConfigFilePathName: Options.HubConfigFilePathName,
Expand Down

0 comments on commit 7cd39e2

Please sign in to comment.