github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/nsadapter/adapter/configuration.go (about)

     1  package adapter
     2  
     3  import (
     4  	"time"
     5  
     6  	"github.com/kyma-incubator/compass/components/director/internal/healthz"
     7  
     8  	"github.com/kyma-incubator/compass/components/director/pkg/certloader"
     9  
    10  	"github.com/kyma-incubator/compass/components/director/pkg/log"
    11  	"github.com/kyma-incubator/compass/components/director/pkg/persistence"
    12  )
    13  
    14  // Configuration contains ns-adapter specific configuration values
    15  type Configuration struct {
    16  	ReadHeadersTimeout time.Duration `envconfig:"APP_READ_REQUEST_HEADERS_TIMEOUT,default=30s"`
    17  	ServerTimeout      time.Duration `envconfig:"APP_SERVER_TIMEOUT,default=30s"` // TODO What is the proper timeout value?
    18  	ClientTimeout      time.Duration `envconfig:"APP_CLIENT_TIMEOUT,default=30s"`
    19  	Address            string        `envconfig:"default=127.0.0.1:8080"`
    20  	Log                *log.Config
    21  
    22  	CertLoaderConfig certloader.Config
    23  
    24  	Database persistence.DatabaseConfig
    25  
    26  	SystemToTemplateMappings string `envconfig:"APP_SYSTEM_TO_TEMPLATE_MAPPINGS,default='{}'"`
    27  	AllowJWTSigningNone      bool   `envconfig:"APP_ALLOW_JWT_SIGNING_NONE,default=false"`
    28  	JwksEndpoint             string `envconfig:"APP_JWKS_ENDPOINT"`
    29  
    30  	ReadyConfig healthz.ReadyConfig
    31  
    32  	SelfRegisterDistinguishLabelKey string `envconfig:"APP_SELF_REGISTER_DISTINGUISH_LABEL_KEY"`
    33  	RuntimeTypeLabelKey             string `envconfig:"APP_RUNTIME_TYPE_LABEL_KEY,default=runtimeType"`
    34  	ApplicationTypeLabelKey         string `envconfig:"APP_APPLICATION_TYPE_LABEL_KEY,default=applicationType"`
    35  
    36  	ORDWebhookMappings string `envconfig:"APP_ORD_WEBHOOK_MAPPINGS"`
    37  
    38  	ExternalClientCertSecretName string `envconfig:"APP_EXTERNAL_CLIENT_CERT_SECRET_NAME"`
    39  	ExtSvcClientCertSecretName   string `envconfig:"APP_EXT_SVC_CLIENT_CERT_SECRET_NAME"`
    40  }