Documentation
¶
Index ¶
- Constants
- func ConfigK8sAdmissionControl(k8sResInfo *ValidatingWebhookConfigInfo, ctrlState *share.CLUSAdmCtrlState) (bool, error)
- func EchoAdmWebhookConnection(tagExpected, svcname string)
- func GetAdmissionCtrlTypes(platform string) []string
- func GetSvcLabelKeysForTest(svcname string) (string, string)
- func InitK8sNsSelectorInfo(allowedNS, allowedNsWild, defAllowedNS utils.Set, selectorValue string, ...)
- func IsNsSelectorSupported() bool
- func ResetCABundle(svcName string, caBundle []byte) bool
- func SetCABundle(svcName string, caBundle []byte)
- func TestAdmWebhookConnection(svcname string) (int, error)
- func UnregK8sAdmissionControl(admType, nvAdmName string) error
- func UpdateAllowedK8sNs(isLead, admCtrlEnabled bool, newAllowedNS, newAllowedNsWild utils.Set)
- func VerifyK8sNs(admCtrlEnabled bool, nsName string, nsLabels map[string]string)
- type ClientConfig
- type ValidateWebhookSvcInfo
- type ValidatingWebhookConfigInfo
- type WebhookInfo
- type WebhookSvcLabelKey
Constants ¶
View Source
const ( UriAdmCtrlPrefix = "/v1" UriAdmCtrlNvStatus = "nvstatus" )
View Source
const ( K8sResOpCreate = "create" K8sResOpUpdate = "update" K8sResOpDelete = "delete" )
View Source
const ( TestSucceeded = iota TestFailedAtRead TestFailedAtWrite TestFailed TestAborted )
View Source
const (
AdmRuleCatK8s = "Kubernetes"
)
View Source
const ( //NvAdmMutateType = "mutate" // for Kubernetes NvAdmValidateType = "validate" // for Kubernetes )
Variables ¶
This section is empty.
Functions ¶
func ConfigK8sAdmissionControl ¶
func ConfigK8sAdmissionControl(k8sResInfo *ValidatingWebhookConfigInfo, ctrlState *share.CLUSAdmCtrlState) (bool, error)
func EchoAdmWebhookConnection ¶
func EchoAdmWebhookConnection(tagExpected, svcname string)
func GetAdmissionCtrlTypes ¶
func GetSvcLabelKeysForTest ¶
func InitK8sNsSelectorInfo ¶
func IsNsSelectorSupported ¶
func IsNsSelectorSupported() bool
func ResetCABundle ¶
func SetCABundle ¶
func UpdateAllowedK8sNs ¶
Types ¶
type ClientConfig ¶
type ValidateWebhookSvcInfo ¶
type ValidateWebhookSvcInfo struct {
Status int
SvcNodePort int32
SvcType string
LabelTag string
LabelEcho string
}
func GetValidateWebhookSvcInfo ¶
func GetValidateWebhookSvcInfo(svcname string) (error, *ValidateWebhookSvcInfo)
type ValidatingWebhookConfigInfo ¶
type ValidatingWebhookConfigInfo struct {
Name string
WebhooksInfo []*WebhookInfo
RevertCount *uint32
UnexpectedMatchExpr string
}
type WebhookInfo ¶
type WebhookInfo struct {
Name string
ClientConfig ClientConfig
FailurePolicy string
TimeoutSeconds int32
}
type WebhookSvcLabelKey ¶
Click to show internal directories.
Click to hide internal directories.