Replies: 2 comments
-
Hi @evaldasc, can you give an example? |
Beta Was this translation helpful? Give feedback.
0 replies
-
certainly, @warber lets take this storage settings config applied to 4 hosts groups with anchors in the first one: configs:
- id: log-storage-settings-kong-non-a
config: &config
template: kong.json
skip: false
type:
settings:
<<: &settings
schema: builtin:logmonitoring.log-storage-settings
schemaVersion: 1.0.7
scope:
type: environment
name: EnonAkongRappTa
groupOverrides: &overrides
- group: non
override:
skip: true
- id: log-storage-settings-kong-prod-a
config: *config
type:
settings:
<<: *settings
scope:
type: environment
name: EprodAkongRappTa
groupOverrides: *overrides
- id: log-storage-settings-kong-non-b
config: *config
type:
settings:
<<: *settings
scope:
type: environment
name: EnonAkongRappTb
groupOverrides: *overrides
- id: log-storage-settings-kong-prod-b
config: *config
type:
settings:
<<: *settings
scope:
type: environment
name: EprodAkongRappTb
groupOverrides: *overrides we could have defaults moved separately so all configs are "equal", like this: defaults:
config: &config
template: kong.json
skip: false
settings: &settings
schema: builtin:logmonitoring.log-storage-settings
schemaVersion: 1.0.7
groupOverrides: &overrides
- group: non
override:
skip: true
configs:
- id: log-storage-settings-kong-non-a
config: *config
type:
settings:
<<: *settings
scope:
type: environment
name: EnonAkongRappTa
groupOverrides: *overrides
- id: log-storage-settings-kong-prod-a
config: *config
type:
settings:
<<: *settings
scope:
type: environment
name: EprodAkongRappTa
groupOverrides: *overrides
- id: log-storage-settings-kong-non-b
config: *config
type:
settings:
<<: *settings
scope:
type: environment
name: EnonAkongRappTb
groupOverrides: *overrides
- id: log-storage-settings-kong-prod-b
config: *config
type:
settings:
<<: *settings
scope:
type: environment
name: EprodAkongRappTb
groupOverrides: *overrides let me know if example is enough |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I believe it would be useful to have an area to set defaults inside yaml configuration file, using anchors.
Those can be reused below, making configuration less redundant.
it is currently possible to use anchors in the
configs
section - making first configuration id to be a template to others - which is fine, but option withdefaults
would be easier to read.Beta Was this translation helpful? Give feedback.
All reactions