Documentation
¶
Index ¶
- Variables
- type BoolRule
- type ContainerExcludeRules
- type ContainerLinterConfig
- type ContainerLinterRules
- type ContainerRule
- type ContainerRuleExclude
- type ContainerRuleExcludeList
- type ConversionsRuleSettings
- type DefinitionFileRuleSettings
- type DocumentationLinterConfig
- type DocumentationLinterRules
- type GrafanaDashboardsSettings
- type HelmignoreRuleSettings
- type HooksLinterConfig
- type HooksLinterRules
- type ImageExcludeRules
- type ImageLinterConfig
- type ImageLinterRules
- type IngressRuleSettings
- type KindRule
- type KindRuleExclude
- type KindRuleExcludeList
- type Level
- type LicenseExcludeRule
- type LinterConfig
- type LinterError
- type LintersSettings
- type Module
- type ModuleExcludeRules
- type ModuleLinterConfig
- type ModuleLinterRules
- type NoCyrillicExcludeRules
- type NoCyrillicLinterConfig
- type NoCyrillicLinterRules
- type OSSRuleSettings
- type OpenAPIExcludeRules
- type OpenAPILinterConfig
- type OpenAPILinterRules
- type PatchesRuleSettings
- type PathRule
- type PrefixRule
- type PrefixRuleExclude
- type PrefixRuleExcludeList
- type PrometheusRuleSettings
- type RBACExcludeRules
- type RBACLinterConfig
- type RBACLinterRules
- type RuleConfig
- type RuleMeta
- type ServicePortExclude
- type ServicePortExcludeList
- type ServicePortRule
- type StringRule
- type StringRuleExclude
- type StringRuleExcludeList
- type TemplatesExcludeRules
- type TemplatesLinterConfig
- type TemplatesLinterRules
- type WerfRuleSettings
Constants ¶
This section is empty.
Variables ¶
View Source
var IgnoreDeckhouseReposList = []string{"deckhouse", "deckhouse-test-1", "deckhouse-test-2"}
TODO: THINK ABOUT HOW TO ENDURE
Functions ¶
This section is empty.
Types ¶
type ContainerExcludeRules ¶ added in v0.1.36
type ContainerExcludeRules struct {
ControllerSecurityContext KindRuleExcludeList
DNSPolicy KindRuleExcludeList
HostNetworkPorts ContainerRuleExcludeList
Ports ContainerRuleExcludeList
ReadOnlyRootFilesystem ContainerRuleExcludeList
NoNewPrivileges ContainerRuleExcludeList
SeccompProfile ContainerRuleExcludeList
ImageDigest ContainerRuleExcludeList
Resources ContainerRuleExcludeList
SecurityContext ContainerRuleExcludeList
Liveness ContainerRuleExcludeList
Readiness ContainerRuleExcludeList
Description StringRuleExcludeList
}
type ContainerLinterConfig ¶ added in v0.1.36
type ContainerLinterConfig struct {
LinterConfig
Rules ContainerLinterRules
ExcludeRules ContainerExcludeRules
}
type ContainerLinterRules ¶ added in v0.1.36
type ContainerLinterRules struct {
RecommendedLabelsRule RuleConfig
NamespaceLabelsRule RuleConfig
ApiVersionRule RuleConfig
PriorityClassRule RuleConfig
DNSPolicyRule RuleConfig
ControllerSecurityContextRule RuleConfig
NewRevisionHistoryLimitRule RuleConfig
// Container-specific rules
NameDuplicatesRule RuleConfig
ReadOnlyRootFilesystemRule RuleConfig
NoNewPrivilegesRule RuleConfig
SeccompProfileRule RuleConfig
HostNetworkPortsRule RuleConfig
EnvVariablesDuplicatesRule RuleConfig
ImageDigestRule RuleConfig
ImagePullPolicyRule RuleConfig
ResourcesRule RuleConfig
ContainerSecurityContextRule RuleConfig
PortsRule RuleConfig
LivenessRule RuleConfig
ReadinessRule RuleConfig
}
type ContainerRule ¶
type ContainerRule struct {
ExcludeRules []ContainerRuleExclude
}
func (*ContainerRule) Enabled ¶
func (r *ContainerRule) Enabled(object storage.StoreObject, container *corev1.Container) bool
type ContainerRuleExclude ¶
func (*ContainerRuleExclude) Enabled ¶
func (e *ContainerRuleExclude) Enabled(object storage.StoreObject, container *corev1.Container) bool
type ContainerRuleExcludeList ¶ added in v0.1.36
type ContainerRuleExcludeList []ContainerRuleExclude
ContainerRuleExcludeList represents a list of container exclusions
func (ContainerRuleExcludeList) Get ¶ added in v0.1.36
func (l ContainerRuleExcludeList) Get() []ContainerRuleExclude
type ConversionsRuleSettings ¶ added in v0.1.36
type ConversionsRuleSettings struct {
Disable bool
}
type DefinitionFileRuleSettings ¶ added in v0.1.36
type DefinitionFileRuleSettings struct {
Disable bool
}
type DocumentationLinterConfig ¶ added in v0.1.37
type DocumentationLinterConfig struct {
LinterConfig
Rules DocumentationLinterRules
}
type DocumentationLinterRules ¶ added in v0.1.37
type DocumentationLinterRules struct {
ReadmeRule RuleConfig
BilingualRule RuleConfig
CyrillicInEnglishRule RuleConfig
}
type GrafanaDashboardsSettings ¶ added in v0.1.36
type GrafanaDashboardsSettings struct {
Disable bool
}
type HelmignoreRuleSettings ¶ added in v0.1.36
type HelmignoreRuleSettings struct {
Disable bool
}
type HooksLinterConfig ¶ added in v0.1.36
type HooksLinterConfig struct {
LinterConfig
Rules HooksLinterRules
IngressRuleSettings IngressRuleSettings
}
type HooksLinterRules ¶ added in v0.1.36
type HooksLinterRules struct {
HooksRule RuleConfig
}
type ImageExcludeRules ¶ added in v0.1.36
type ImageExcludeRules struct {
SkipImageFilePathPrefix PrefixRuleExcludeList
SkipDistrolessFilePathPrefix PrefixRuleExcludeList
}
type ImageLinterConfig ¶ added in v0.1.36
type ImageLinterConfig struct {
LinterConfig
Rules ImageLinterRules
ExcludeRules ImageExcludeRules
Patches PatchesRuleSettings
Werf WerfRuleSettings
}
type ImageLinterRules ¶ added in v0.1.36
type ImageLinterRules struct {
DistrolessRule RuleConfig
ImageRule RuleConfig
PatchesRule RuleConfig
WerfRule RuleConfig
}
type IngressRuleSettings ¶ added in v0.1.36
type IngressRuleSettings struct {
Disable bool
}
type KindRule ¶
type KindRule struct {
ExcludeRules []KindRuleExclude
}
type KindRuleExclude ¶
func (*KindRuleExclude) Enabled ¶
func (e *KindRuleExclude) Enabled(kind, name string) bool
type KindRuleExcludeList ¶ added in v0.1.36
type KindRuleExcludeList []KindRuleExclude
func (KindRuleExcludeList) Get ¶ added in v0.1.36
func (l KindRuleExcludeList) Get() []KindRuleExclude
type LicenseExcludeRule ¶ added in v0.1.36
type LicenseExcludeRule struct {
Files StringRuleExcludeList `mapstructure:"files"`
Directories PrefixRuleExcludeList `mapstructure:"directories"`
}
type LinterConfig ¶ added in v0.1.36
type LinterConfig struct {
Impact *Level
}
func (*LinterConfig) SetLevel ¶ added in v0.1.36
func (rc *LinterConfig) SetLevel(level string)
type LinterError ¶
type LintersSettings ¶ added in v0.1.36
type LintersSettings struct {
Container ContainerLinterConfig
Image ImageLinterConfig
NoCyrillic NoCyrillicLinterConfig
OpenAPI OpenAPILinterConfig
Templates TemplatesLinterConfig
RBAC RBACLinterConfig
Hooks HooksLinterConfig
Module ModuleLinterConfig
Documentation DocumentationLinterConfig
}
type Module ¶ added in v0.1.37
type Module interface {
// GetName returns the name of the module
GetName() string
// GetNamespace returns the namespace where the module should be deployed
GetNamespace() string
// GetPath returns the filesystem path to the module directory
GetPath() string
// GetWerfFile returns the content of the werf.yaml file
GetWerfFile() string
// GetChart returns the Helm chart associated with the module
GetChart() *chart.Chart
// GetObjectStore returns the unstructured object store containing parsed Kubernetes resources
GetObjectStore() *storage.UnstructuredObjectStore
// GetStorage returns a map of all parsed Kubernetes resources indexed by ResourceIndex
GetStorage() map[storage.ResourceIndex]storage.StoreObject
}
Module represents a DMT module interface that provides access to module metadata and resources. This interface is used by linters to access only the necessary module information, following the Interface Segregation Principle.
type ModuleExcludeRules ¶ added in v0.1.36
type ModuleExcludeRules struct {
License LicenseExcludeRule
}
type ModuleLinterConfig ¶ added in v0.1.36
type ModuleLinterConfig struct {
LinterConfig
Rules ModuleLinterRules
OSSRuleSettings OSSRuleSettings
DefinitionFileRuleSettings DefinitionFileRuleSettings
ConversionsRuleSettings ConversionsRuleSettings
HelmignoreRuleSettings HelmignoreRuleSettings
ExcludeRules ModuleExcludeRules
}
type ModuleLinterRules ¶ added in v0.1.36
type ModuleLinterRules struct {
DefinitionFileRule RuleConfig
OSSRule RuleConfig
ConversionRule RuleConfig
HelmignoreRule RuleConfig
LicenseRule RuleConfig
RequarementsRule RuleConfig
LegacyReleaseFileRule RuleConfig
}
type NoCyrillicExcludeRules ¶ added in v0.1.36
type NoCyrillicExcludeRules struct {
Files StringRuleExcludeList
Directories PrefixRuleExcludeList
}
type NoCyrillicLinterConfig ¶ added in v0.1.36
type NoCyrillicLinterConfig struct {
LinterConfig
Rules NoCyrillicLinterRules
ExcludeRules NoCyrillicExcludeRules
}
type NoCyrillicLinterRules ¶ added in v0.1.36
type NoCyrillicLinterRules struct {
NoCyrillicRule RuleConfig
}
type OSSRuleSettings ¶ added in v0.1.36
type OSSRuleSettings struct {
Disable bool
}
type OpenAPIExcludeRules ¶ added in v0.1.36
type OpenAPIExcludeRules struct {
KeyBannedNames []string
EnumFileExcludes []string
HAAbsoluteKeysExcludes StringRuleExcludeList
CRDNamesExcludes StringRuleExcludeList
}
type OpenAPILinterConfig ¶ added in v0.1.36
type OpenAPILinterConfig struct {
LinterConfig
Rules OpenAPILinterRules
ExcludeRules OpenAPIExcludeRules
}
type OpenAPILinterRules ¶ added in v0.1.36
type OpenAPILinterRules struct {
EnumRule RuleConfig
HARule RuleConfig
CRDsRule RuleConfig
KeysRule RuleConfig
}
type PatchesRuleSettings ¶ added in v0.1.36
type PatchesRuleSettings struct {
Disable bool
}
type PathRule ¶ added in v0.1.3
type PathRule struct {
ExcludeStringRules []StringRuleExclude
ExcludePrefixRules []PrefixRuleExclude
}
type PrefixRule ¶ added in v0.1.3
type PrefixRule struct {
ExcludeRules []PrefixRuleExclude
}
func (*PrefixRule) Enabled ¶ added in v0.1.3
func (r *PrefixRule) Enabled(str string) bool
type PrefixRuleExclude ¶ added in v0.1.3
type PrefixRuleExclude string
func (PrefixRuleExclude) Enabled ¶ added in v0.1.3
func (e PrefixRuleExclude) Enabled(str string) bool
type PrefixRuleExcludeList ¶ added in v0.1.36
type PrefixRuleExcludeList []string
func (PrefixRuleExcludeList) Get ¶ added in v0.1.36
func (l PrefixRuleExcludeList) Get() []PrefixRuleExclude
type PrometheusRuleSettings ¶ added in v0.1.36
type PrometheusRuleSettings struct {
Disable bool
}
type RBACExcludeRules ¶ added in v0.1.36
type RBACExcludeRules struct {
BindingSubject StringRuleExcludeList
Placement KindRuleExcludeList
Wildcards KindRuleExcludeList
}
type RBACLinterConfig ¶ added in v0.1.36
type RBACLinterConfig struct {
LinterConfig
Rules RBACLinterRules
ExcludeRules RBACExcludeRules
}
type RBACLinterRules ¶ added in v0.1.36
type RBACLinterRules struct {
UserAuthRule RuleConfig
BindingRule RuleConfig
PlacementRule RuleConfig
WildcardsRule RuleConfig
}
type RuleConfig ¶ added in v0.1.36
type RuleConfig struct {
// contains filtered or unexported fields
}
func (*RuleConfig) GetLevel ¶ added in v0.1.36
func (rc *RuleConfig) GetLevel() *Level
func (*RuleConfig) SetLevel ¶ added in v0.1.36
func (rc *RuleConfig) SetLevel(level, backoff string)
func (*RuleConfig) SetStringLevel ¶ added in v0.1.36
func (rc *RuleConfig) SetStringLevel(current, backoff string)
type ServicePortExclude ¶
func (*ServicePortExclude) Enabled ¶
func (e *ServicePortExclude) Enabled(name, port string) bool
type ServicePortExcludeList ¶ added in v0.1.36
type ServicePortExcludeList []ServicePortExclude
func (ServicePortExcludeList) Get ¶ added in v0.1.36
func (l ServicePortExcludeList) Get() []ServicePortExclude
type ServicePortRule ¶
type ServicePortRule struct {
ExcludeRules []ServicePortExclude
}
func (*ServicePortRule) Enabled ¶
func (r *ServicePortRule) Enabled(name, port string) bool
type StringRule ¶
type StringRule struct {
ExcludeRules []StringRuleExclude
}
func (*StringRule) Enabled ¶
func (r *StringRule) Enabled(str string) bool
type StringRuleExclude ¶
type StringRuleExclude string
func (StringRuleExclude) Enabled ¶
func (e StringRuleExclude) Enabled(str string) bool
type StringRuleExcludeList ¶ added in v0.1.36
type StringRuleExcludeList []string
func (StringRuleExcludeList) Get ¶ added in v0.1.36
func (l StringRuleExcludeList) Get() []StringRuleExclude
type TemplatesExcludeRules ¶ added in v0.1.36
type TemplatesExcludeRules struct {
VPAAbsent KindRuleExcludeList
PDBAbsent KindRuleExcludeList
ServicePort ServicePortExcludeList
KubeRBACProxy StringRuleExcludeList
Ingress KindRuleExcludeList
}
type TemplatesLinterConfig ¶ added in v0.1.36
type TemplatesLinterConfig struct {
LinterConfig
Rules TemplatesLinterRules
ExcludeRules TemplatesExcludeRules
PrometheusRuleSettings PrometheusRuleSettings
GrafanaDashboardsSettings GrafanaDashboardsSettings
}
type TemplatesLinterRules ¶ added in v0.1.36
type TemplatesLinterRules struct {
VPARule RuleConfig
PDBRule RuleConfig
IngressRule RuleConfig
PrometheusRule RuleConfig
GrafanaRule RuleConfig
KubeRBACProxyRule RuleConfig
ServicePortRule RuleConfig
ClusterDomainRule RuleConfig
RegistryRule RuleConfig
}
type WerfRuleSettings ¶ added in v0.1.36
type WerfRuleSettings struct {
Disable bool
}
Click to show internal directories.
Click to hide internal directories.