Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ rules:
- secrets
verbs:
- '*'
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- '*'
- apiGroups:
- garo.tietoevry.com
resources:
Expand Down
1 change: 1 addition & 0 deletions controllers/githubactionrunner_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func (r *GithubActionRunnerReconciler) IsValid(obj metav1.Object) (bool, error)
// +kubebuilder:rbac:groups="",resources=pods,verbs="*"
// +kubebuilder:rbac:groups="",resources=secrets,verbs="*"
// +kubebuilder:rbac:groups="",resources=events,verbs=create;patch
// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs="*"

// Reconcile is the main loop implementing the controller action
func (r *GithubActionRunnerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func main() {
Namespace: namespace,
LeaderElection: enableLeaderElection,
LeaderElectionID: "4ef9cd91.tietoevry.com",
LeaderElectionResourceLock: "configmaps",
LeaderElectionResourceLock: "configmapsleases",
}
if strings.Contains(namespace, ",") {
options.Namespace = ""
Expand Down