fix: missing role template after upgrade

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2020-08-20 23:06:59 +08:00
parent 1fcef6966f
commit 66d79aaf75
3 changed files with 6 additions and 3 deletions

View File

@@ -286,7 +286,10 @@ func (r *ReconcileNamespace) initRoles(namespace *corev1.Namespace) error {
old.Annotations = role.Annotations old.Annotations = role.Annotations
old.Rules = role.Rules old.Rules = role.Rules
return r.Update(context.Background(), &old) if err := r.Update(context.Background(), &old); err != nil {
klog.Error(err)
return err
}
} }
} }
} }

View File

@@ -130,7 +130,7 @@ func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error {
synced = append(synced, c.fedWorkspaceRoleCacheController.HasSynced) synced = append(synced, c.fedWorkspaceRoleCacheController.HasSynced)
} }
if ok := cache.WaitForCacheSync(stopCh); !ok { if ok := cache.WaitForCacheSync(stopCh, synced...); !ok {
return fmt.Errorf("failed to wait for caches to sync") return fmt.Errorf("failed to wait for caches to sync")
} }

View File

@@ -34,7 +34,7 @@ type KubernetesOptions struct {
// kubernetes clientset qps // kubernetes clientset qps
// +optional // +optional
QPS float32 `json:"qps,omitemtpy" yaml:"qps"` QPS float32 `json:"qps,omitempty" yaml:"qps"`
// kubernetes clientset burst // kubernetes clientset burst
// +optional // +optional