Skip to content

feat: allow default values for anything in the config file #583

@pruje

Description

@pruje

Is your feature request related to a problem? Please describe.
I'm using argus for requesting a large amount of services, and for all of them I'm using HTTP headers to request deployed services.
My config.yml file is growing and becoming a mess to edit, and there is a problem of data duplication.

Describe the solution you'd like
It would be great if we could define defaults values for any fields. Like we could have this:

defaults:
  service:
    latest_version:
      type: url
      url_commands:
        - type: regex
          regex: ([0-9.]+)
    deployed_version:
      type: url
      method: GET
      headers:
        - key: Authorization
          value: Bearer <Personal-Access-Token>
service:
  app1:
    latest_version:
      url: https://...
    deployed_version:
      url: https://...
  app2:
    latest_version:
      url: https://...
    deployed_version:
      url: https://...

instead of this:

service:
  app1:
    latest_version:
      type: url
      url: https://...
      url_commands:
        - type: regex
          regex: ([0-9.]+)
    deployed_version:
      type: url
      method: GET
      url: https://...
      headers:
        - key: Authorization
          value: Bearer <Personal-Access-Token>

  app2:
    latest_version:
      type: url
      url: https://...
      url_commands:
        - type: regex
          regex: ([0-9.]+)
    deployed_version:
      type: url
      method: GET
      url: https://...
      headers:
        - key: Authorization
          value: Bearer <Personal-Access-Token>

Describe alternatives you've considered

  • Copy/paste everywhere
  • Use environment variables
  • Write a custom python script to manipulate data

Thanks!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions