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 utils.Set, selectorValue string, admCtrlEnabled bool)
- 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 ValidateK8sSetting(k8sResInfo ValidatingWebhookConfigInfo) bool
- func VerifyAdmClusterRole() (bool, error)
- func VerifyAdmClusterRoleBinding() (bool, error)
- 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 ¶
func ValidateK8sSetting ¶
func ValidateK8sSetting(k8sResInfo ValidatingWebhookConfigInfo) bool
func VerifyAdmClusterRole ¶
https://kubernetes.io/docs/reference/using-api/deprecation-guide/ The rbac.authorization.k8s.io/v1beta1 API version of ClusterRole, ClusterRoleBinding, Role, and RoleBinding is no longer served as of v1.22.
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 }
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.