Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(p Parameters, kubeClient kubernetes.Interface, openebsClient clientset.Interface, snapClient snapclient.Interface) (*webhook, error)
New creates a new instance of a webhook.
Types ¶
type AdmissionResponse ¶
type AdmissionResponse struct {
AR *v1beta1.AdmissionResponse
}
AdmissionResponse embeds K8S admission response API.
func BuildForAPIObject ¶
func BuildForAPIObject(ar *v1beta1.AdmissionResponse) *AdmissionResponse
BuildForAPIObject builds for api admission response object.
func NewAdmissionResponse ¶
func NewAdmissionResponse() *AdmissionResponse
NewAdmissionResponse returns an empty instance of AdmissionResponse.
func (*AdmissionResponse) SetAllowed ¶
func (ar *AdmissionResponse) SetAllowed() *AdmissionResponse
SetAllowed sets allowed to true.
func (*AdmissionResponse) UnSetAllowed ¶
func (ar *AdmissionResponse) UnSetAllowed() *AdmissionResponse
UnSetAllowed sets allowed to false.
func (*AdmissionResponse) WithResultAsFailure ¶
func (ar *AdmissionResponse) WithResultAsFailure(err error, code int32) *AdmissionResponse
WithResultAsFailure sets failure result.
func (*AdmissionResponse) WithResultAsSuccess ¶
func (ar *AdmissionResponse) WithResultAsSuccess(code int32) *AdmissionResponse
WithResultAsSuccess sets success result.
type Parameters ¶
type Parameters struct { // Port is webhook server port Port int //CertFile is path to the x509 certificate for https CertFile string //KeyFile is path to the x509 private key matching `CertFile` KeyFile string }
Parameters are server configures parameters
Click to show internal directories.
Click to hide internal directories.