Documentation ¶
Index ¶
- Variables
- func ConstructHeadersString(headers map[string]string) string
- type Config
- type EmailConfig
- func (emailConfig EmailConfig) ConstructEmailBody(podRuleResults []rules.PodRuleResult, ...) ([]byte, error)
- func (emailConfig EmailConfig) GetMailHeaders() map[string]string
- func (emailConfig EmailConfig) RenderTemplate(podRuleResults []rules.PodRuleResult, ...) (string, error)
- func (emailConfig EmailConfig) SendMail(podRuleResults []rules.PodRuleResult, ...) error
- func (emailConfig *EmailConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultEmailConfig = EmailConfig{ Enabled: false, Subject: "kube-conformity", Template: "mailtemplate.html", Port: 24, From: "no-reply@kube-conformity.com", } )
Functions ¶
func ConstructHeadersString ¶
Types ¶
type Config ¶
type Config struct { Interval time.Duration `yaml:"interval"` PodRulesLabelsFilledIn []rules.PodRuleLabelsFilledIn `yaml:"pod_rules_labels_filled_in"` PodRulesLimitsFilledIn []rules.PodRuleLimitsFilledIn `yaml:"pod_rules_limits_filled_in"` PodRulesRequestsFilledIn []rules.PodRuleRequestsFilledIn `yaml:"pod_rules_requests_filled_in"` DeploymentRuleReplicasMinimum []rules.DeploymentRuleReplicasMinimum `yaml:"deployment_rules_replicas_minimum"` StatefulSetRuleReplicasMinimum []rules.StatefulSetRuleReplicasMinimum `yaml:"stateful_set_rules_replicas_minimum"` EmailConfig EmailConfig `yaml:"email_config"` }
func (*Config) UnmarshalYAML ¶
type EmailConfig ¶
type EmailConfig struct { Enabled bool `yaml:"enabled"` To string `yaml:"to"` From string `yaml:"from"` Host string `yaml:"host"` Port int `yaml:"port"` Subject string `yaml:"subject"` AuthUsername string `yaml:"auth_username"` AuthPassword string `yaml:"auth_password"` AuthIdentity string `yaml:"auth_identity"` Template string `yaml:"template"` }
func (EmailConfig) ConstructEmailBody ¶
func (emailConfig EmailConfig) ConstructEmailBody(podRuleResults []rules.PodRuleResult, deploymentResults []rules.DeploymentRuleResult) ([]byte, error)
func (EmailConfig) GetMailHeaders ¶
func (emailConfig EmailConfig) GetMailHeaders() map[string]string
func (EmailConfig) RenderTemplate ¶
func (emailConfig EmailConfig) RenderTemplate(podRuleResults []rules.PodRuleResult, deploymentResults []rules.DeploymentRuleResult) (string, error)
func (EmailConfig) SendMail ¶
func (emailConfig EmailConfig) SendMail(podRuleResults []rules.PodRuleResult, deploymentRuleResults []rules.DeploymentRuleResult) error
func (*EmailConfig) UnmarshalYAML ¶
func (emailConfig *EmailConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
Click to show internal directories.
Click to hide internal directories.