This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.5.3.2.4.3. 조정 반복문
모든 컨트롤러에는 조정 반복문을 구현하는 Reconcile()
메서드가 포함된 조정기 오브젝트가 있습니다. 조정 반복문에는 캐시에서 기본 리소스 오브젝트인 Memcached
를 찾는 데 사용되는 네임스페이스 및 이름 키인 Request
인수가 전달됩니다.
반환 값, 결과, 오류에 따라 요청이 다시 큐에 추가되고 조정 루프가 다시 트리거될 수 있습니다.
Result.RequeueAfter
를 설정하여 유예 기간 후 요청을 다시 큐에 추가할 수 있습니다.
import "time" // Reconcile for any reason other than an error after 5 seconds return ctrl.Result{RequeueAfter: time.Second*5}, nil
import "time"
// Reconcile for any reason other than an error after 5 seconds
return ctrl.Result{RequeueAfter: time.Second*5}, nil
주기적으로 CR을 조정하도록 RequeueAfter
를 설정하여 Result
를 반환할 수 있습니다.
조정기, 클라이언트, 리소스 이벤트와의 상호 작용에 대한 자세한 내용은 Controller Runtime Client API 설명서를 참조하십시오.