{"modulePath":"github.phpd.cn/openshift/origin","version":"v4.1.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package controller\n\n## Constants\n\n```go\nconst (\n\tWaitForReadyAnnotation    = \"template.alpha.openshift.io/wait-for-ready\"\n\tTemplateInstanceOwner     = \"template.openshift.io/template-instance-owner\"\n\tTemplateInstanceFinalizer = \"template.openshift.io/finalizer\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\tTimeoutErr = errors.New(\"timeout while waiting for template instance to be ready\")\n)\n```\n\n## Functions\n\n```go\nfunc CanCheckReadiness(ref corev1.ObjectReference) bool\n```\nCanCheckReadiness indicates whether a readiness check exists for a GK.\n\n```go\nfunc CheckReadiness(oc buildv1client.Interface, ref corev1.ObjectReference, obj *unstructured.Unstructured) (bool, bool, error)\n```\nCheckReadiness 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.\n\n```go\nfunc TemplateInstanceHasCondition(templateInstance *templatev1.TemplateInstance, typ templatev1.TemplateInstanceConditionType, status corev1.ConditionStatus) bool\n```\n\n## Types\n\n```go\ntype TemplateInstanceController struct {\n\t// contains filtered or unexported fields\n}\n```\nTemplateInstanceController 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.\n\n```go\nfunc NewTemplateInstanceController(dynamicRestMapper meta.RESTMapper, dynamicClient dynamic.Interface, sarClient authorizationclient.SubjectAccessReviewsGetter, kc kubernetes.Interface, buildClient buildv1client.Interface, templateClient templatev1clienttyped.TemplateV1Interface, informer templatev1informer.TemplateInstanceInformer) *TemplateInstanceController\n```\nNewTemplateInstanceController returns a new TemplateInstanceController.\n\n```go\nfunc (c *TemplateInstanceController) Collect(ch chan\u003c- prometheus.Metric)\n```\n\n```go\nfunc (c *TemplateInstanceController) Describe(ch chan\u003c- *prometheus.Desc)\n```\n\n```go\nfunc (c *TemplateInstanceController) Run(workers int, stopCh \u003c-chan struct{})\n```\nRun runs the controller until stopCh is closed, with as many workers as specified.\n\n```go\ntype TemplateInstanceFinalizerController struct {\n\t// contains filtered or unexported fields\n}\n```\nTemplateInstanceFinalizerController watches for deletion of TemplateInstance objects and handles the cleanup of the associated resources before removing the finalizer.\n\n```go\nfunc NewTemplateInstanceFinalizerController(dynamicRestMapper meta.RESTMapper, dynamicClient dynamic.Interface, templateClient templateclient.Interface, informer templateinformer.TemplateInstanceInformer) *TemplateInstanceFinalizerController\n```\nNewTemplateInstanceFinalizerController returns a new TemplateInstanceFinalizerController.\n\n```go\nfunc (c *TemplateInstanceFinalizerController) Run(workers int, stopCh \u003c-chan struct{})\n```\nRun runs the controller until stopCh is closed, with as many workers as specified.\n\n","path":"github.phpd.cn/openshift/origin/pkg/template/controller","name":"controller","synopsis":"","isRedistributable":true}
