-
Notifications
You must be signed in to change notification settings - Fork 197
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
Add HA Support for the Starboard Operator #452
Conversation
Codecov Report
@@ Coverage Diff @@
## main #452 +/- ##
==========================================
- Coverage 69.24% 69.17% -0.08%
==========================================
Files 57 57
Lines 3473 3478 +5
==========================================
+ Hits 2405 2406 +1
- Misses 788 790 +2
- Partials 280 282 +2
Continue to review full report at Codecov.
|
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.
👋 @xyoxo Good job. I tested it on my end and it seems to work as expected. I left a few questions though before we merge this PR.
I also noticed that controller-runtime is trying to create K8s events, but starboard-operator service account does not have such permission, i.e. I see the following errors in the log:
E0324 16:05:31.811972 1 event.go:264] Server rejected event '&v1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"starboard-operator.166f52e450b2f92f", GenerateName:"", Namespace:"starboard-operator", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, InvolvedObject:v1.ObjectReference{Kind:"ConfigMap", Namespace:"starboard-operator", Name:"starboard-operator", UID:"04b1b499-fca9-4bad-a905-c6ff6066a802", APIVersion:"v1", ResourceVersion:"1913", FieldPath:""}, Reason:"LeaderElection", Message:"starboard-operator-b7cffd786-7slnw_843590a9-06bb-4aad-b58f-ca6c85a05b7d became leader", Source:v1.EventSource{Component:"starboard-operator-b7cffd786-7slnw_843590a9-06bb-4aad-b58f-ca6c85a05b7d", Host:""}, FirstTimestamp:v1.Time{Time:time.Time{wall:0xc00ef6b2f03bcb2f, ext:531398242, loc:(*time.Location)(0x2336e20)}}, LastTimestamp:v1.Time{Time:time.Time{wall:0xc00ef6b2f03bcb2f, ext:531398242, loc:(*time.Location)(0x2336e20)}}, Count:1, Type:"Normal", EventTime:v1.MicroTime{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, Series:(*v1.EventSeries)(nil), Action:"", Related:(*v1.ObjectReference)(nil), ReportingController:"", ReportingInstance:""}': 'events is forbidden: User "system:serviceaccount:starboard-operator:starboard-operator" cannot create resource "events" in API group "" in the namespace "starboard-operator"' (will not retry!)
Resolves #219