start karma faild , log: ]

This issue has been tracked since 2022-04-22.

config :

authentication:
  basicAuth:
    users:
      - username: admin
        password: password
      - username: view
        password: view
authorization:
  acls:
    silences: '/etc/karma/acls.yaml'
  groups:
    - name: admins
      members:
        - admin
    - name: users
      members:
        - view

Start falid ,

authentication:
  basicAuth:
    users:
      - username: admin
        password: password
      - username: view
        password: view
authorization:
#  acls:
#    silences: '/etc/karma/acls.yaml'
  groups:
    - name: admins
      members:
        - admin
    - name: users
      members:
        - view

start ok .

  • acls.yaml:
rules:
  - action: allow
    reason: admins are allowed
    scope:
      groups:
        - admins

start filed log:

ound in type struct { Groups []config.AuthorizationGroup; ACL struct { Silences string } "yaml:\"acl\" koanf:\"acl\"" }"
level=fatal msg="Execution failed" error="failed to parse configuration file "/etc/karma/karma.yaml": yaml: unmarshal errors:\n line 28: field acls not found in type struct { Groups []config.AuthorizationGroup; ACL struct { Silences string } "yaml:\"acl\" koanf:\"acl\"" }"
level=fatal msg="Execution failed" error="failed to parse configuration file "/etc/karma/karma.yaml": yaml: unmarshal errors:\n line 28: field acls not found in type struct { Groups []config.AuthorizationGroup; ACL struct { Silences string } "yaml:\"acl\" koanf:\"acl\"" }"
level=fatal msg="Execution failed" error="failed to parse configuration file "/etc/karma/karma.yaml": yaml: unmarshal errors:\n line 28: field acls not found in type struct { Groups []config.AuthorizationGroup; ACL struct { Silences string } "yaml:\"acl\" koanf:\"acl\"" }"
level=fatal msg="Execution failed" error="failed to parse configuration file "/etc/karma/karma.yaml": yaml: unmarshal errors:\n line 28: field acls not found in type struct { Groups []config.AuthorizationGroup; ACL struct { Silences string } "yaml:\"acl\" koanf:\"acl\"" }"
level=fatal msg="Execution failed" error="failed to parse configuration file "/etc/karma/karma.yaml": yaml: unmarshal errors:\n line 28: field acls not found in type struct { Groups []config.AuthorizationGroup; ACL struct { Silences string } "yaml:\"acl\" koanf:\"acl\"" }"

hongruiji wrote this answer on 2022-04-22

https://github.com/prymitive/karma/blob/main/docs/CONFIGURATION.md#alert-acknowledgement

authentication:
  basicAuth:
    users:
      - username: alice
        password: secret
      - username: bob
        password: secret
      - username: john
        password: secret
authorization:
  acls:    # Example Error   acl  not acls 
    silences: /etc/karma/acls.yaml
  groups:
    - name: admins
      members:
        - alice
        - bob
    - name: users
      members:
        - john
More Details About Repo
Owner Name prymitive
Repo Name karma
Full Name prymitive/karma
Language TypeScript
Created Date 2018-09-09
Updated Date 2023-03-17
Star Count 1921
Watcher Count 33
Fork Count 166
Issue Count 2

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date