Documentation ¶
Index ¶
- Constants
- Variables
- func CanCheckReadiness(ref corev1.ObjectReference) bool
- func CheckReadiness(oc buildv1client.Interface, ref corev1.ObjectReference, ...) (bool, bool, error)
- func TemplateInstanceHasCondition(templateInstance *templatev1.TemplateInstance, ...) bool
- type TemplateInstanceController
- type TemplateInstanceFinalizerController
Constants ¶
const ( WaitForReadyAnnotation = "template.alpha.openshift.io/wait-for-ready" TemplateInstanceOwner = "template.openshift.io/template-instance-owner" TemplateInstanceFinalizer = "template.openshift.io/finalizer" )
Variables ¶
var (
TimeoutErr = errors.New("timeout while waiting for template instance to be ready")
)
Functions ¶
func CanCheckReadiness ¶ added in v3.7.0
func CanCheckReadiness(ref corev1.ObjectReference) bool
CanCheckReadiness indicates whether a readiness check exists for a GK.
func CheckReadiness ¶ added in v3.7.0
func CheckReadiness(oc buildv1client.Interface, ref corev1.ObjectReference, obj *unstructured.Unstructured) (bool, bool, error)
CheckReadiness runs the readiness check on a given object. TODO: remove "oc client.Interface" and error once BuildConfigs can report on the status of their latest build.
func TemplateInstanceHasCondition ¶ added in v3.11.0
func TemplateInstanceHasCondition(templateInstance *templatev1.TemplateInstance, typ templatev1.TemplateInstanceConditionType, status corev1.ConditionStatus) bool
Types ¶
type TemplateInstanceController ¶
type TemplateInstanceController struct {
// contains filtered or unexported fields
}
TemplateInstanceController watches for new TemplateInstance objects and instantiates the template contained within, using parameters read from a linked Secret object. The TemplateInstanceController instantiates objects using its own service account, first verifying that the requester also has permissions to instantiate.
func NewTemplateInstanceController ¶
func NewTemplateInstanceController(dynamicRestMapper meta.RESTMapper, dynamicClient dynamic.Interface, sarClient authorizationclient.SubjectAccessReviewsGetter, kc kubernetes.Interface, buildClient buildv1client.Interface, templateClient templatev1clienttyped.TemplateV1Interface, informer templatev1informer.TemplateInstanceInformer) *TemplateInstanceController
NewTemplateInstanceController returns a new TemplateInstanceController.
func (*TemplateInstanceController) Collect ¶ added in v3.7.0
func (c *TemplateInstanceController) Collect(ch chan<- prometheus.Metric)
func (*TemplateInstanceController) Describe ¶ added in v3.7.0
func (c *TemplateInstanceController) Describe(ch chan<- *prometheus.Desc)
func (*TemplateInstanceController) Run ¶
func (c *TemplateInstanceController) Run(workers int, stopCh <-chan struct{})
Run runs the controller until stopCh is closed, with as many workers as specified.
type TemplateInstanceFinalizerController ¶ added in v3.10.0
type TemplateInstanceFinalizerController struct {
// contains filtered or unexported fields
}
TemplateInstanceFinalizerController watches for new TemplateInstance objects and instantiates the template contained within, using parameters read from a linked Secret object. The TemplateInstanceFinalizerController instantiates objects using its own service account, first verifying that the requester also has permissions to instantiate.
func NewTemplateInstanceFinalizerController ¶ added in v3.10.0
func NewTemplateInstanceFinalizerController(dynamicRestMapper meta.RESTMapper, dynamicClient dynamic.Interface, templateClient templateclient.Interface, informer templateinformer.TemplateInstanceInformer) *TemplateInstanceFinalizerController
NewTemplateInstanceFinalizerController returns a new TemplateInstanceFinalizerController.
func (*TemplateInstanceFinalizerController) Run ¶ added in v3.10.0
func (c *TemplateInstanceFinalizerController) Run(workers int, stopCh <-chan struct{})
Run runs the controller until stopCh is closed, with as many workers as specified.