Documentation
¶
Index ¶
Constants ¶
const (
CloudscaleLoadbalancerUUIDAnnotation = "k8s.cloudscale.ch/loadbalancer-uuid"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NamespaceQuotaValidator ¶ added in v0.10.0
type NamespaceQuotaValidator struct {
Decoder admission.Decoder
// Client is used to fetch namespace counts
Client client.Reader
Skipper skipper.Skipper
// SkipValidateQuota allows skipping the quota validation.
// If the validation is skipped only the organization label is checked.
SkipValidateQuota bool
OrganizationLabel string
UserDefaultOrganizationAnnotation string
// SelectedProfile is the name of the ZoneUsageProfile to use for the quota
SelectedProfile string
// QuotaOverrideNamespace is the namespace in which the quota overrides are stored
QuotaOverrideNamespace string
}
NamespaceQuotaValidator checks if a user is allowed to create a namespace. The user or the namespace must have a label with the organization name. The organization name is used to count the number of namespaces for the organization.
type PodNodeSelectorMutator ¶ added in v0.6.0
type PodNodeSelectorMutator struct {
Decoder admission.Decoder
// Client is used to fetch namespace metadata
Client client.Reader
// DefaultNodeSelector is the default node selector to apply to pods
DefaultNodeSelector map[string]string
// DefaultNamespaceNodeSelectorAnnotation is the annotation to use for the default node selector
DefaultNamespaceNodeSelectorAnnotation string
Skipper skipper.Skipper
}
PodNodeSelectorMutator checks namespaces for allowed node selectors.
type RatioValidator ¶
type RatioValidator struct {
Decoder admission.Decoder
Client client.Client
Ratio ratioFetcher
RatioLimits limits.Limits
// DefaultNodeSelector is the default node selector to apply to pods
DefaultNodeSelector map[string]string
// DefaultNamespaceNodeSelectorAnnotation is the annotation to use for the default node selector
DefaultNamespaceNodeSelectorAnnotation string
}
RatioValidator checks for every action in a namespace whether the Memory to CPU ratio limit is exceeded and will return a warning if it is.
type ServiceCloudscaleLBValidator ¶ added in v0.14.0
ServiceCloudscaleLBValidator checks if a user is allowed to create a namespace. The user or the namespace must have a label with the organization name. The organization name is used to count the number of namespaces for the organization.