INNER CODE UNIT · Go
func
evryfs/github-actions-runner-operator · controllers/githubactionrunner_controller.go:61
func (r *GithubActionRunnerReconciler) IsValid(obj metav1.Object) (bool, error) {
instance, ok := obj.(*garov1alpha1.GithubActionRunner)
if !ok {
return false, errors.New("not a GithubActionRunner object")
}
return instance.Spec.IsValid()
}
// +kubebuilder:rbac:groups=garo.tietoevry.com,resources=githubactionrunners,verbs="*"
// +kubebuilder:rbac:groups=garo.tietoevry.com,resources=githubactionrunners/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=garo.tietoevry.com,resources=githubactionrunners/finalizers,verbs=update
// +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) {