Documentation ¶
Overview ¶
Package validator handles dynamic admission control checks for resources.
InitValidationServer and StartValidationServer are called from the main function of KubeDirector. This starts an independent webserver process to field validation requests. Then, when resources in kubedirector.hpe.com (KubeDirectorCluster and KubeDirectorApp) are created/changed/deleted, the validation function will be invoked to check the proposed operation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitValidationServer ¶
func InitValidationServer( ownerReference metav1.OwnerReference, ) error
InitValidationServer creates secret, service and admission validation k8s resources. All these resources are created in the same namespace where KubeDirector is running. XXX We could/should move to using the tls module now provided by the SDK. However, its interface requires storing the various certs/keys in two secrets and a configmap, while our current method uses one secret. Since there are now some existing deployments of KD, we would need a migration strategy.
func StartValidationServer ¶
func StartValidationServer() error
StartValidationServer starts the admission validation server. Prior to invoking this function, InitValidationServer function must be called to set up secret (for TLS certs) k8s resource. This function runs forever.
Types ¶
This section is empty.