forked from mtusi2026/mtusi2026lab3
Реализовать lab3 в общем Helm-релизе с Traefik, TLS и HPA
This commit is contained in:
@@ -16,6 +16,8 @@ const (
|
||||
|
||||
// Controller contains settings owned exclusively by the HTTP transport.
|
||||
type Controller struct {
|
||||
// InstanceID identifies this API process to the load balancer diagnostics.
|
||||
InstanceID string
|
||||
// Host is the IP address on which the listener binds.
|
||||
Host string
|
||||
// Port is the TCP port, in the range 1..65535.
|
||||
@@ -85,6 +87,7 @@ func defaultController() *Controller {
|
||||
|
||||
// loadEnvironment applies environment overrides to this configuration section.
|
||||
func (cfg *Controller) loadEnvironment() error {
|
||||
cfg.InstanceID = os.Getenv("INSTANCE_ID")
|
||||
if host, exists := os.LookupEnv("APP_HOST"); exists {
|
||||
cfg.Host = host
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user