Commit 089aec05 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

commit

parent 66bb1640
...@@ -39,7 +39,7 @@ type RegionConfig struct { ...@@ -39,7 +39,7 @@ type RegionConfig struct {
} }
func LoadConfig() *Config { func LoadConfig() *Config {
configFile := "config.yaml" configFile := "config/config.yaml"
if envFile := os.Getenv("CONFIG_FILE"); envFile != "" { if envFile := os.Getenv("CONFIG_FILE"); envFile != "" {
configFile = envFile configFile = envFile
} }
......
...@@ -13,7 +13,7 @@ spec: ...@@ -13,7 +13,7 @@ spec:
spec: spec:
containers: containers:
- name: waf-console - name: waf-console
image: waf-console:latest image: harbor.tensorsecurity.com/tensorsecurity/waf-console:testcn
resources: resources:
limits: limits:
memory: "128Mi" memory: "128Mi"
...@@ -22,7 +22,7 @@ spec: ...@@ -22,7 +22,7 @@ spec:
- containerPort: 8080 - containerPort: 8080
volumeMounts: volumeMounts:
- name: waf-console-config - name: waf-console-config
mountPath: / mountPath: /config
- name: waf-console-rules - name: waf-console-rules
mountPath: /rules mountPath: /rules
volumes: volumes:
......
...@@ -90,7 +90,7 @@ func (s *wafService) GetRule(ctx context.Context, ruleID int) (*WafRule, error) ...@@ -90,7 +90,7 @@ func (s *wafService) GetRule(ctx context.Context, ruleID int) (*WafRule, error)
func (s *wafService) SaveRuleCategoryToDB(ctx context.Context) error { func (s *wafService) SaveRuleCategoryToDB(ctx context.Context) error {
var categories []WafRuleCategory var categories []WafRuleCategory
yamlFile, err := os.ReadFile("waf-rules.yaml") yamlFile, err := os.ReadFile("rules/waf-rules.yaml")
if err != nil { if err != nil {
return fmt.Errorf("error reading yaml file: %v", err) return fmt.Errorf("error reading yaml file: %v", err)
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment