Skip to content

Commit

Permalink
metering labels: templates not updated
Browse files Browse the repository at this point in the history
  • Loading branch information
eguzki committed May 23, 2020
1 parent 3a82c6e commit d284a4a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pkg/3scale/amp/template/adapters/apicast.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,25 @@ func (a *Apicast) options() (*component.ApicastOptions, error) {
ao.ProductionReplicas = 1
ao.StagingReplicas = 1

ao.StagingLabels = a.setStagingLabels()
ao.ProductionLabels = a.setProductionLabels()

err := ao.Validate()
return ao, err
}

func (a *Apicast) setStagingLabels() map[string]string {
return map[string]string{
"app": "${APP_LABEL}",
"threescale_component": "apicast",
"threescale_component_element": "staging",
}
}

func (a *Apicast) setProductionLabels() map[string]string {
return map[string]string{
"app": "${APP_LABEL}",
"threescale_component": "apicast",
"threescale_component_element": "production",
}
}

0 comments on commit d284a4a

Please sign in to comment.