Documentation ¶
Index ¶
- Variables
- func GetCertificateFunc(certs map[string]*tls.Certificate) func(*tls.ClientHelloInfo) (*tls.Certificate, error)
- func HostnameMatchSpecCandidates(hostname string) []string
- func ListenAndServeTLS(srv *http.Server, network string, certFile, keyFile string) error
- func RunBuildConfigChangeController(ctx *ControllerContext) (bool, error)
- func RunBuildController(ctx *ControllerContext) (bool, error)
- func RunBuilderRoleBindingController(ctx *ControllerContext) (bool, error)
- func RunBuilderServiceAccountController(ctx *ControllerContext) (bool, error)
- func RunControllerServer(servingInfo configv1.HTTPServingInfo, kubeExternal clientgoclientset.Interface) error
- func RunDefaultRoleBindingController(ctx *ControllerContext) (bool, error)
- func RunDeployerController(ctx *ControllerContext) (bool, error)
- func RunDeployerRoleBindingController(ctx *ControllerContext) (bool, error)
- func RunDeployerServiceAccountController(ctx *ControllerContext) (bool, error)
- func RunDeploymentConfigController(ctx *ControllerContext) (bool, error)
- func RunImageImportController(ctx *ControllerContext) (bool, error)
- func RunImagePullerRoleBindingController(ctx *ControllerContext) (bool, error)
- func RunImageSignatureImportController(ctx *ControllerContext) (bool, error)
- func RunImageTriggerController(ctx *ControllerContext) (bool, error)
- func RunInternalImageRegistryPullSecretsController(ctx *ControllerContext) (bool, error)
- func RunOriginNamespaceController(ctx *ControllerContext) (bool, error)
- func RunServiceAccountController(ctx *ControllerContext) (bool, error)
- func RunServiceAccountPullSecretsController(ctx *ControllerContext) (bool, error)
- func RunTemplateInstanceController(ctx *ControllerContext) (bool, error)
- func RunTemplateInstanceFinalizerController(ctx *ControllerContext) (bool, error)
- func RunUnidlingController(ctx *ControllerContext) (bool, error)
- type AuthenticatorMetrics
- type ControllerClientBuilder
- type ControllerContext
- type InitFunc
- type OpenshiftControllerClientBuilder
- func (b OpenshiftControllerClientBuilder) OpenshiftAppsClient(name string) (appsclient.Interface, error)
- func (b OpenshiftControllerClientBuilder) OpenshiftAppsClientOrDie(name string) appsclient.Interface
- func (b OpenshiftControllerClientBuilder) OpenshiftBuildClient(name string) (buildclient.Interface, error)
- func (b OpenshiftControllerClientBuilder) OpenshiftBuildClientOrDie(name string) buildclient.Interface
- func (b OpenshiftControllerClientBuilder) OpenshiftConfigClient(name string) (configclient.Interface, error)
- func (b OpenshiftControllerClientBuilder) OpenshiftConfigClientOrDie(name string) configclient.Interface
- func (b OpenshiftControllerClientBuilder) OpenshiftImageClient(name string) (imageclient.Interface, error)
- func (b OpenshiftControllerClientBuilder) OpenshiftImageClientOrDie(name string) imageclient.Interface
- func (b OpenshiftControllerClientBuilder) OpenshiftOperatorClient(name string) (operatorclient.Interface, error)
- func (b OpenshiftControllerClientBuilder) OpenshiftOperatorClientOrDie(name string) operatorclient.Interface
- func (b OpenshiftControllerClientBuilder) OpenshiftSecurityClient(name string) (securityclient.Interface, error)
- func (b OpenshiftControllerClientBuilder) OpenshiftSecurityClientOrDie(name string) securityclient.Interface
- func (b OpenshiftControllerClientBuilder) OpenshiftTemplateClient(name string) (templateclient.Interface, error)
- func (b OpenshiftControllerClientBuilder) OpenshiftTemplateClientOrDie(name string) templateclient.Interface
Constants ¶
This section is empty.
Variables ¶
var ControllerInitializers = map[openshiftcontrolplanev1.OpenShiftControllerName]InitFunc{ openshiftcontrolplanev1.OpenShiftServiceAccountController: RunServiceAccountController, openshiftcontrolplanev1.OpenShiftDefaultRoleBindingsController: RunDefaultRoleBindingController, openshiftcontrolplanev1.OpenShiftServiceAccountPullSecretsController: RunInternalImageRegistryPullSecretsController, openshiftcontrolplanev1.OpenShiftOriginNamespaceController: RunOriginNamespaceController, openshiftcontrolplanev1.OpenShiftBuilderServiceAccountController: RunBuilderServiceAccountController, openshiftcontrolplanev1.OpenShiftBuildController: RunBuildController, openshiftcontrolplanev1.OpenShiftBuildConfigChangeController: RunBuildConfigChangeController, openshiftcontrolplanev1.OpenShiftBuilderRoleBindingsController: RunBuilderRoleBindingController, openshiftcontrolplanev1.OpenShiftDeployerServiceAccountController: RunDeployerServiceAccountController, openshiftcontrolplanev1.OpenShiftDeployerController: RunDeployerController, openshiftcontrolplanev1.OpenShiftDeploymentConfigController: RunDeploymentConfigController, openshiftcontrolplanev1.OpenShiftDeployerRoleBindingsController: RunDeployerRoleBindingController, openshiftcontrolplanev1.OpenShiftImageTriggerController: RunImageTriggerController, openshiftcontrolplanev1.OpenShiftImageImportController: RunImageImportController, openshiftcontrolplanev1.OpenShiftImageSignatureImportController: RunImageSignatureImportController, openshiftcontrolplanev1.OpenShiftImagePullerRoleBindingsController: RunImagePullerRoleBindingController, openshiftcontrolplanev1.OpenShiftTemplateInstanceController: RunTemplateInstanceController, openshiftcontrolplanev1.OpenShiftTemplateInstanceFinalizerController: RunTemplateInstanceFinalizerController, openshiftcontrolplanev1.OpenShiftUnidlingController: RunUnidlingController, }
Functions ¶
func GetCertificateFunc ¶
func GetCertificateFunc(certs map[string]*tls.Certificate) func(*tls.ClientHelloInfo) (*tls.Certificate, error)
GetCertificateFunc returns a function that can be used in tls.Config#GetCertificate Returns nil if len(certs) == 0
func HostnameMatchSpecCandidates ¶
HostnameMatchSpecCandidates returns a list of match specs that would match the provided hostname Returns nil if len(hostname) == 0
func ListenAndServeTLS ¶
ListenAndServeTLS starts a server that listens on the provided TCP mode (as supported by net.Listen).
func RunBuildConfigChangeController ¶
func RunBuildConfigChangeController(ctx *ControllerContext) (bool, error)
func RunBuildController ¶
func RunBuildController(ctx *ControllerContext) (bool, error)
RunController starts the build sync loop for builds and buildConfig processing.
func RunBuilderRoleBindingController ¶
func RunBuilderRoleBindingController(ctx *ControllerContext) (bool, error)
func RunBuilderServiceAccountController ¶
func RunBuilderServiceAccountController(ctx *ControllerContext) (bool, error)
func RunControllerServer ¶
func RunControllerServer(servingInfo configv1.HTTPServingInfo, kubeExternal clientgoclientset.Interface) error
TODO make this an actual API server built on the genericapiserver
func RunDefaultRoleBindingController ¶
func RunDefaultRoleBindingController(ctx *ControllerContext) (bool, error)
func RunDeployerController ¶
func RunDeployerController(ctx *ControllerContext) (bool, error)
func RunDeployerRoleBindingController ¶
func RunDeployerRoleBindingController(ctx *ControllerContext) (bool, error)
func RunDeployerServiceAccountController ¶
func RunDeployerServiceAccountController(ctx *ControllerContext) (bool, error)
func RunDeploymentConfigController ¶
func RunDeploymentConfigController(ctx *ControllerContext) (bool, error)
func RunImageImportController ¶
func RunImageImportController(ctx *ControllerContext) (bool, error)
func RunImagePullerRoleBindingController ¶
func RunImagePullerRoleBindingController(ctx *ControllerContext) (bool, error)
func RunImageSignatureImportController ¶
func RunImageSignatureImportController(ctx *ControllerContext) (bool, error)
func RunImageTriggerController ¶
func RunImageTriggerController(ctx *ControllerContext) (bool, error)
func RunInternalImageRegistryPullSecretsController ¶
func RunInternalImageRegistryPullSecretsController(ctx *ControllerContext) (bool, error)
RunInternalImageRegistryPullSecretsController starts the control loops that manage the image pull secrets for the internal image registry.
func RunOriginNamespaceController ¶
func RunOriginNamespaceController(ctx *ControllerContext) (bool, error)
func RunServiceAccountController ¶
func RunServiceAccountController(ctx *ControllerContext) (bool, error)
func RunServiceAccountPullSecretsController ¶
func RunServiceAccountPullSecretsController(ctx *ControllerContext) (bool, error)
func RunTemplateInstanceController ¶
func RunTemplateInstanceController(ctx *ControllerContext) (bool, error)
func RunTemplateInstanceFinalizerController ¶
func RunTemplateInstanceFinalizerController(ctx *ControllerContext) (bool, error)
func RunUnidlingController ¶
func RunUnidlingController(ctx *ControllerContext) (bool, error)
Types ¶
type AuthenticatorMetrics ¶
type AuthenticatorMetrics struct { // RecordRequestTotal increments the total number of requests for webhooks RecordRequestTotal func(ctx context.Context, code string) // RecordRequestLatency measures request latency in seconds for webhooks. Broken down by status code. RecordRequestLatency func(ctx context.Context, code string, latency float64) }
AuthenticatorMetrics specifies a set of methods that are used to register various metrics
type ControllerClientBuilder ¶
type ControllerClientBuilder interface { clientbuilder.ControllerClientBuilder OpenshiftAppsClient(name string) (appsclient.Interface, error) OpenshiftAppsClientOrDie(name string) appsclient.Interface OpenshiftBuildClient(name string) (buildclient.Interface, error) OpenshiftBuildClientOrDie(name string) buildclient.Interface OpenshiftConfigClient(name string) (configclient.Interface, error) OpenshiftConfigClientOrDie(name string) configclient.Interface OpenshiftSecurityClient(name string) (securityclient.Interface, error) OpenshiftSecurityClientOrDie(name string) securityclient.Interface // OpenShift clients based on generated internal clientsets OpenshiftTemplateClient(name string) (templateclient.Interface, error) OpenshiftTemplateClientOrDie(name string) templateclient.Interface OpenshiftImageClient(name string) (imageclient.Interface, error) OpenshiftImageClientOrDie(name string) imageclient.Interface OpenshiftOperatorClient(name string) (operatorclient.Interface, error) OpenshiftOperatorClientOrDie(name string) operatorclient.Interface }
type ControllerContext ¶
type ControllerContext struct { OpenshiftControllerConfig openshiftcontrolplanev1.OpenShiftControllerManagerConfig // ClientBuilder will provide a client for this controller to use ClientBuilder ControllerClientBuilder // HighRateLimitClientBuilder will provide a client for this controller utilizing a higher rate limit. // This will have a rate limit of at least 100 QPS, with a burst up to 200 QPS. HighRateLimitClientBuilder ControllerClientBuilder KubernetesInformers informers.SharedInformerFactory OpenshiftConfigKubernetesInformers informers.SharedInformerFactory ControllerManagerKubeInformers informers.SharedInformerFactory TemplateInformers templateinformer.SharedInformerFactory AppsInformers appsinformer.SharedInformerFactory BuildInformers buildinformer.SharedInformerFactory ConfigInformers configinformer.SharedInformerFactory ImageInformers imageinformer.SharedInformerFactory OperatorInformers operatorinformer.SharedInformerFactory RestMapper meta.RESTMapper // Stop is the stop channel Stop <-chan struct{} Context context.Context // InformersStarted is closed after all of the controllers have been initialized and are running. After this point it is safe, // for an individual controller to start the shared informers. Before it is closed, they should not. InformersStarted chan struct{} // contains filtered or unexported fields }
func NewControllerContext ¶
func NewControllerContext( ctx context.Context, config openshiftcontrolplanev1.OpenShiftControllerManagerConfig, inClientConfig *rest.Config, ) (*ControllerContext, error)
func (*ControllerContext) IsControllerEnabled ¶
func (c *ControllerContext) IsControllerEnabled(name string) bool
func (*ControllerContext) StartInformers ¶
func (c *ControllerContext) StartInformers(stopCh <-chan struct{})
type InitFunc ¶
type InitFunc func(ctx *ControllerContext) (bool, error)
InitFunc is used to launch a particular controller. It may run additional "should I activate checks". Any error returned will cause the controller process to `Fatal` The bool indicates whether the controller was enabled.
type OpenshiftControllerClientBuilder ¶
type OpenshiftControllerClientBuilder struct {
clientbuilder.ControllerClientBuilder
}
func (OpenshiftControllerClientBuilder) OpenshiftAppsClient ¶
func (b OpenshiftControllerClientBuilder) OpenshiftAppsClient(name string) (appsclient.Interface, error)
OpenshiftAppsClient provides a REST client for the apps API. If the client cannot be created because of configuration error, this function will error.
func (OpenshiftControllerClientBuilder) OpenshiftAppsClientOrDie ¶
func (b OpenshiftControllerClientBuilder) OpenshiftAppsClientOrDie(name string) appsclient.Interface
OpenshiftAppsClientOrDie provides a REST client for the apps API. If the client cannot be created because of configuration error, this function will panic.
func (OpenshiftControllerClientBuilder) OpenshiftBuildClient ¶
func (b OpenshiftControllerClientBuilder) OpenshiftBuildClient(name string) (buildclient.Interface, error)
OpenshiftBuildClient provides a REST client for the build API. If the client cannot be created because of configuration error, this function will error.
func (OpenshiftControllerClientBuilder) OpenshiftBuildClientOrDie ¶
func (b OpenshiftControllerClientBuilder) OpenshiftBuildClientOrDie(name string) buildclient.Interface
OpenshiftBuildClientOrDie provides a REST client for the build API. If the client cannot be created because of configuration error, this function will panic.
func (OpenshiftControllerClientBuilder) OpenshiftConfigClient ¶
func (b OpenshiftControllerClientBuilder) OpenshiftConfigClient(name string) (configclient.Interface, error)
OpenshiftConfigClient provides a REST client for the build API. If the client cannot be created because of configuration error, this function will error.
func (OpenshiftControllerClientBuilder) OpenshiftConfigClientOrDie ¶
func (b OpenshiftControllerClientBuilder) OpenshiftConfigClientOrDie(name string) configclient.Interface
OpenshiftConfigClientOrDie provides a REST client for the build API. If the client cannot be created because of configuration error, this function will panic.
func (OpenshiftControllerClientBuilder) OpenshiftImageClient ¶
func (b OpenshiftControllerClientBuilder) OpenshiftImageClient(name string) (imageclient.Interface, error)
OpenshiftImageClient provides a REST client for the image API. If the client cannot be created because of configuration error, this function will error.
func (OpenshiftControllerClientBuilder) OpenshiftImageClientOrDie ¶
func (b OpenshiftControllerClientBuilder) OpenshiftImageClientOrDie(name string) imageclient.Interface
OpenshiftImageClientOrDie provides a REST client for the image API. If the client cannot be created because of configuration error, this function will panic.
func (OpenshiftControllerClientBuilder) OpenshiftOperatorClient ¶
func (b OpenshiftControllerClientBuilder) OpenshiftOperatorClient(name string) (operatorclient.Interface, error)
func (OpenshiftControllerClientBuilder) OpenshiftOperatorClientOrDie ¶
func (b OpenshiftControllerClientBuilder) OpenshiftOperatorClientOrDie(name string) operatorclient.Interface
func (OpenshiftControllerClientBuilder) OpenshiftSecurityClient ¶
func (b OpenshiftControllerClientBuilder) OpenshiftSecurityClient(name string) (securityclient.Interface, error)
func (OpenshiftControllerClientBuilder) OpenshiftSecurityClientOrDie ¶
func (b OpenshiftControllerClientBuilder) OpenshiftSecurityClientOrDie(name string) securityclient.Interface
func (OpenshiftControllerClientBuilder) OpenshiftTemplateClient ¶
func (b OpenshiftControllerClientBuilder) OpenshiftTemplateClient(name string) (templateclient.Interface, error)
OpenshiftInternalTemplateClient provides a REST client for the template API. If the client cannot be created because of configuration error, this function will return an error.
func (OpenshiftControllerClientBuilder) OpenshiftTemplateClientOrDie ¶
func (b OpenshiftControllerClientBuilder) OpenshiftTemplateClientOrDie(name string) templateclient.Interface
OpenshiftInternalTemplateClientOrDie provides a REST client for the template API. If the client cannot be created because of configuration error, this function will panic.