mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
add warning log for csr controllers
This commit is contained in:
parent
df29573ec5
commit
c6a992a01d
@ -39,7 +39,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func startCSRSigningController(ctx ControllerContext) (http.Handler, bool, error) {
|
func startCSRSigningController(ctx ControllerContext) (http.Handler, bool, error) {
|
||||||
if !ctx.AvailableResources[schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"}] {
|
gvr := schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"}
|
||||||
|
if !ctx.AvailableResources[gvr] {
|
||||||
|
klog.Warningf("Resource %s is not available now", gvr.String())
|
||||||
return nil, false, nil
|
return nil, false, nil
|
||||||
}
|
}
|
||||||
if ctx.ComponentConfig.CSRSigningController.ClusterSigningCertFile == "" || ctx.ComponentConfig.CSRSigningController.ClusterSigningKeyFile == "" {
|
if ctx.ComponentConfig.CSRSigningController.ClusterSigningCertFile == "" || ctx.ComponentConfig.CSRSigningController.ClusterSigningKeyFile == "" {
|
||||||
@ -102,7 +104,9 @@ func startCSRSigningController(ctx ControllerContext) (http.Handler, bool, error
|
|||||||
}
|
}
|
||||||
|
|
||||||
func startCSRApprovingController(ctx ControllerContext) (http.Handler, bool, error) {
|
func startCSRApprovingController(ctx ControllerContext) (http.Handler, bool, error) {
|
||||||
if !ctx.AvailableResources[schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"}] {
|
gvr := schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"}
|
||||||
|
if !ctx.AvailableResources[gvr] {
|
||||||
|
klog.Warningf("Resource %s is not available now", gvr.String())
|
||||||
return nil, false, nil
|
return nil, false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user