X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fe06b864a537f5b6440a50bf85af9bc93d7aae80..0b90a6ee86fdfa5b2b8cb51d66d70cef00dc6800:/sdk/go/arvados/config.go diff --git a/sdk/go/arvados/config.go b/sdk/go/arvados/config.go index 9c667610bc..e04849bb89 100644 --- a/sdk/go/arvados/config.go +++ b/sdk/go/arvados/config.go @@ -9,11 +9,18 @@ import ( "errors" "fmt" "net/url" + "os" "git.curoverse.com/arvados.git/sdk/go/config" ) -const DefaultConfigFile = "/etc/arvados/config.yml" +var DefaultConfigFile = func() string { + if path := os.Getenv("ARVADOS_CONFIG"); path != "" { + return path + } else { + return "/etc/arvados/config.yml" + } +}() type Config struct { Clusters map[string]Cluster @@ -62,27 +69,34 @@ type Cluster struct { API struct { AsyncPermissionsUpdateInterval Duration - DisabledAPIs []string + DisabledAPIs map[string]struct{} MaxIndexDatabaseRead int MaxItemsPerResponse int MaxRequestAmplification int MaxRequestSize int RailsSessionSecretToken string RequestTimeout Duration + SendTimeout Duration + WebsocketClientEventQueue int + WebsocketServerEventQueue int } AuditLogs struct { MaxAge Duration MaxDeleteBatch int - UnloggedAttributes []string + UnloggedAttributes map[string]struct{} } Collections struct { - BlobSigning bool - BlobSigningKey string - BlobSigningTTL Duration - CollectionVersioning bool - DefaultTrashLifetime Duration - DefaultReplication int - ManagedProperties map[string]interface{} + BlobSigning bool + BlobSigningKey string + BlobSigningTTL Duration + CollectionVersioning bool + DefaultTrashLifetime Duration + DefaultReplication int + ManagedProperties map[string]struct { + Value interface{} + Function string + Protected bool + } PreserveVersionIfIdle Duration TrashSweepInterval Duration TrustAllContent bool @@ -121,10 +135,10 @@ type Cluster struct { AutoSetupNewUsers bool AutoSetupNewUsersWithRepository bool AutoSetupNewUsersWithVmUUID string - AutoSetupUsernameBlacklist []string + AutoSetupUsernameBlacklist map[string]struct{} EmailSubjectPrefix string - NewInactiveUserNotificationRecipients []string - NewUserNotificationRecipients []string + NewInactiveUserNotificationRecipients map[string]struct{} + NewUserNotificationRecipients map[string]struct{} NewUsersAreActive bool UserNotifierEmailFrom string UserProfileNotificationAddress string @@ -242,14 +256,18 @@ type InstanceType struct { type ContainersConfig struct { CloudVMs CloudVMsConfig + CrunchRunCommand string + CrunchRunArgumentsList []string DefaultKeepCacheRAM ByteSize DispatchPrivateKey string LogReuseDecisions bool MaxComputeVMs int MaxDispatchAttempts int MaxRetryAttempts int + MinRetryPeriod Duration + ReserveExtraRAM ByteSize StaleLockTimeout Duration - SupportedDockerImageFormats []string + SupportedDockerImageFormats map[string]struct{} UsePreemptibleInstances bool JobsAPI struct { @@ -274,13 +292,15 @@ type ContainersConfig struct { LogUpdateSize ByteSize } SLURM struct { - Managed struct { + PrioritySpread int64 + SbatchArgumentsList []string + Managed struct { DNSServerConfDir string DNSServerConfTemplate string DNSServerReloadCommand string DNSServerUpdateCommand string ComputeNodeDomain string - ComputeNodeNameservers []string + ComputeNodeNameservers map[string]struct{} AssignNodeHostname string } }