Documentation ¶
Index ¶
- Constants
- Variables
- func ControllerOnlyAttribute(attr string) bool
- func Validate(c Config) error
- type Config
- func (c Config) APIPort() int
- func (c Config) APIPortOpenDelay() time.Duration
- func (c Config) AgentRateLimitMax() int
- func (c Config) AgentRateLimitRate() time.Duration
- func (c Config) AllowModelAccess() bool
- func (c Config) AsSpaceConstraints(spaces *[]string) *[]string
- func (c Config) AuditLogCaptureArgs() bool
- func (c Config) AuditLogExcludeMethods() set.Strings
- func (c Config) AuditLogMaxBackups() int
- func (c Config) AuditLogMaxSizeMB() int
- func (c Config) AuditingEnabled() bool
- func (c Config) AutocertDNSName() string
- func (c Config) AutocertURL() string
- func (c Config) CAASImageRepo() string
- func (c Config) CAASOperatorImagePath() string
- func (c Config) CACert() (string, bool)
- func (c Config) CharmStoreURL() string
- func (c Config) ControllerAPIPort() int
- func (c Config) ControllerName() string
- func (c Config) ControllerUUID() string
- func (c Config) Features() set.Strings
- func (c Config) IdentityPublicKey() *bakery.PublicKey
- func (c Config) IdentityURL() string
- func (c Config) JujuDBSnapChannel() string
- func (c Config) JujuHASpace() string
- func (c Config) JujuManagementSpace() string
- func (c Config) MaxAgentStateSize() int
- func (c Config) MaxCharmStateSize() int
- func (c Config) MaxDebugLogDuration() time.Duration
- func (c Config) MaxPruneTxnBatchSize() int
- func (c Config) MaxPruneTxnPasses() int
- func (c Config) MaxTxnLogSizeMB() int
- func (c Config) MeteringURL() string
- func (c Config) MigrationMinionWaitMax() time.Duration
- func (c Config) ModelLogfileMaxBackups() int
- func (c Config) ModelLogfileMaxSizeMB() int
- func (c Config) ModelLogsSizeMB() int
- func (c Config) MongoMemoryProfile() string
- func (c Config) NUMACtlPreference() bool
- func (c Config) NonSyncedWritesToRaftLog() bool
- func (c Config) PruneTxnQueryCount() int
- func (c Config) PruneTxnSleepTime() time.Duration
- func (c Config) PublicDNSAddress() string
- func (c Config) StatePort() int
- func (c Config) Validate() error
- type StateServingInfo
Constants ¶
const ( // MongoProfLow represents the most conservative mongo memory profile. MongoProfLow = "low" // MongoProfDefault represents the mongo memory profile shipped by default. MongoProfDefault = "default" )
const ( // APIPort is the port used for api connections. APIPort = "api-port" // ControllerAPIPort is an optional port that may be set for controllers // that have a very heavy load. If this port is set, this port is used by // the controllers to talk to each other - used for the local API connection // as well as the pubsub forwarders, and the raft workers. If this value is // set, the api-port isn't opened until the controllers have started // properly. ControllerAPIPort = "controller-api-port" // Canonical name for the controller ControllerName = "controller-name" // AgentRateLimitMax is the maximum size of the token bucket used to // ratelimit the agent connections. AgentRateLimitMax = "agent-ratelimit-max" // AgentRateLimitRate is the time taken to add a new token to the bucket. // This effectively says that we can have a new agent connect per duration specified. AgentRateLimitRate = "agent-ratelimit-rate" // APIPortOpenDelay is a duration that the controller will wait // between when the controller has been deemed to be ready to open // the api-port and when the api-port is actually opened. This value // is only used when a controller-api-port value is set. APIPortOpenDelay = "api-port-open-delay" // AuditingEnabled determines whether the controller will record // auditing information. AuditingEnabled = "auditing-enabled" // AuditLogCaptureArgs determines whether the audit log will // contain the arguments passed to API methods. AuditLogCaptureArgs = "audit-log-capture-args" // AuditLogMaxSize is the maximum size for the current audit log // file, eg "250M". AuditLogMaxSize = "audit-log-max-size" // AuditLogMaxBackups is the number of old audit log files to keep // (compressed). AuditLogMaxBackups = "audit-log-max-backups" // AuditLogExcludeMethods is a list of Facade.Method names that // aren't interesting for audit logging purposes. A conversation // with only calls to these will be excluded from the // log. (They'll still appear in conversations that have other // interesting calls though.) AuditLogExcludeMethods = "audit-log-exclude-methods" // ReadOnlyMethodsWildcard is the special value that can be added // to the exclude-methods list that represents all of the read // only methods (see apiserver/observer/auditfilter.go). This // value will be stored in the DB (rather than being expanded at // write time) so any changes to the set of read-only methods in // new versions of Juju will be honoured. ReadOnlyMethodsWildcard = "ReadOnlyMethods" // StatePort is the port used for mongo connections. StatePort = "state-port" // CACertKey is the key for the controller's CA certificate attribute. CACertKey = "ca-cert" // CharmStoreURL is the key for the url to use for charmstore API calls CharmStoreURL = "charmstore-url" // ControllerUUIDKey is the key for the controller UUID attribute. ControllerUUIDKey = "controller-uuid" // IdentityURL sets the url of the identity manager. IdentityURL = "identity-url" // IdentityPublicKey sets the public key of the identity manager. IdentityPublicKey = "identity-public-key" // SetNUMAControlPolicyKey stores the value for this setting SetNUMAControlPolicyKey = "set-numa-control-policy" // AutocertDNSNameKey sets the DNS name of the controller. If a // client connects to this name, an official certificate will be // automatically requested. Connecting to any other host name // will use the usual self-generated certificate. AutocertDNSNameKey = "autocert-dns-name" // AutocertURLKey sets the URL used to obtain official TLS // certificates when a client connects to the API. By default, // certficates are obtains from LetsEncrypt. A good value for // testing is // "https://acme-staging.api.letsencrypt.org/directory". AutocertURLKey = "autocert-url" // AllowModelAccessKey sets whether the controller will allow users to // connect to models they have been authorized for even when // they don't have any access rights to the controller itself. AllowModelAccessKey = "allow-model-access" // MongoMemoryProfile sets whether mongo uses the least possible memory or the // detault MongoMemoryProfile = "mongo-memory-profile" // JujuDBSnapChannel selects the channel to use when installing mongo // snaps for focal or later. The value is ignored for older releases. JujuDBSnapChannel = "juju-db-snap-channel" // MaxDebugLogDuration is used to provide a backstop to the execution of a // debug-log command. If someone starts a debug-log session in a remote // screen for example, it is very easy to disconnect from the screen while // leaving the debug-log process running. This causes unnecessary load on // the API Server. The max debug-log duration has a default of 24 hours, // which should be more than enough time for a debugging session. // If the user needs more information, perhaps debug-log isn't the right source. MaxDebugLogDuration = "max-debug-log-duration" // ModelLogfileMaxSize is the maximum size of the log file written out by the // controller on behalf of workers running for a model. ModelLogfileMaxSize = "model-logfile-max-size" // ModelLogfileMaxBackups is the number of old model // log files to keep (compressed). ModelLogfileMaxBackups = "model-logfile-max-backups" // ModelLogsSize is the size of the capped collections used to hold the // logs for the models, eg "20M". Size is per model. ModelLogsSize = "model-logs-size" // MaxTxnLogSize is the maximum size the of capped txn log collection, eg "10M" MaxTxnLogSize = "max-txn-log-size" // MaxPruneTxnBatchSize (deprecated) is the maximum number of transactions // we will evaluate in one go when pruning. Default is 1M transactions. // A value <= 0 indicates to do all transactions at once. MaxPruneTxnBatchSize = "max-prune-txn-batch-size" // MaxPruneTxnPasses (deprecated) is the maximum number of batches that // we will process. So total number of transactions that can be processed // is MaxPruneTxnBatchSize * MaxPruneTxnPasses. A value <= 0 implies // 'do a single pass'. If both MaxPruneTxnBatchSize and MaxPruneTxnPasses // are 0, then the default value of 1M BatchSize and 100 passes // will be used instead. MaxPruneTxnPasses = "max-prune-txn-passes" // PruneTxnQueryCount is the number of transactions to read in a single query. // Minimum of 10, a value of 0 will indicate to use the default value (1000) PruneTxnQueryCount = "prune-txn-query-count" // PruneTxnSleepTime is the amount of time to sleep between processing each // batch query. This is used to reduce load on the system, allowing other // queries to time to operate. On large controllers, processing 1000 txs // seems to take about 100ms, so a sleep time of 10ms represents a 10% // slowdown, but allows other systems to operate concurrently. // A negative number will indicate to use the default, a value of 0 // indicates to not sleep at all. PruneTxnSleepTime = "prune-txn-sleep-time" // MaxCharmStateSize is the maximum allowed size of charm-specific // per-unit state data that charms can store to the controller in // bytes. A value of 0 disables the quota checks although in // principle, mongo imposes a hard (but configurable) limit of 16M. MaxCharmStateSize = "max-charm-state-size" // MaxAgentStateSize is the maximum allowed size of internal state // data that agents can store to the controller in bytes. A value of 0 // disables the quota checks although in principle, mongo imposes a // hard (but configurable) limit of 16M. MaxAgentStateSize = "max-agent-state-size" // NonSyncedWritesToRaftLog allows the operator to disable fsync calls // when writing to the raft log by setting this value to true. NonSyncedWritesToRaftLog = "non-synced-writes-to-raft-log" // MigrationMinionWaitMax is the maximum time that the migration-master // worker will wait for agents to report for a migration phase when // executing a model migration. MigrationMinionWaitMax = "migration-agent-wait-time" // JujuHASpace is the network space within which the MongoDB replica-set // should communicate. JujuHASpace = "juju-ha-space" // JujuManagementSpace is the network space that agents should use to // communicate with controllers. JujuManagementSpace = "juju-mgmt-space" // CAASOperatorImagePath sets the url of the docker image // used for the application operator. // Deprecated: use CAASImageRepo CAASOperatorImagePath = "caas-operator-image-path" // CAASImageRepo sets the docker repo to use // for the jujud operator and mongo images. CAASImageRepo = "caas-image-repo" // Features allows a list of runtime changeable features to be updated. Features = "features" // MeteringURL is the key for the url to use for metrics MeteringURL = "metering-url" // PublicDNSAddress is the public DNS address (and port) of the controller. PublicDNSAddress = "public-dns-address" // DefaultAgentRateLimitMax allows the first 10 agents to connect without // any issue. After that the rate limiting kicks in. DefaultAgentRateLimitMax = 10 // DefaultAgentRateLimitRate will allow four agents to connect every // second. A token is added to the ratelimit token bucket every 250ms. DefaultAgentRateLimitRate = 250 * time.Millisecond // DefaultAuditingEnabled contains the default value for the // AuditingEnabled config value. DefaultAuditingEnabled = true // DefaultAuditLogCaptureArgs is the default for the // AuditLogCaptureArgs setting (which is not to capture them). DefaultAuditLogCaptureArgs = false // DefaultAuditLogMaxSizeMB is the default size in MB at which we // roll the audit log file. DefaultAuditLogMaxSizeMB = 300 // DefaultAuditLogMaxBackups is the default number of files to // keep. DefaultAuditLogMaxBackups = 10 // DefaultNUMAControlPolicy should not be used by default. // Only use numactl if user specifically requests it DefaultNUMAControlPolicy = false // DefaultStatePort is the default port the controller is listening on. DefaultStatePort int = 37017 // DefaultAPIPort is the default port the API server is listening on. DefaultAPIPort int = 17070 // DefaultAPIPortOpenDelay is the default value for api-port-open-delay. // It is a string representation of a time.Duration. DefaultAPIPortOpenDelay = "2s" // DefaultMongoMemoryProfile is the default profile used by mongo. DefaultMongoMemoryProfile = MongoProfDefault // DefaultJujuDBSnapChannel is the default snap channel for installing // mongo in focal or later. DefaultJujuDBSnapChannel = "4.0/stable" // DefaultMaxDebugLogDuration is the default duration that debug-log // commands can run before being terminated by the API server. DefaultMaxDebugLogDuration = 24 * time.Hour // DefaultMaxTxnLogCollectionMB is the maximum size the txn log collection. DefaultMaxTxnLogCollectionMB = 10 // 10 MB // DefaultMaxPruneTxnBatchSize is the normal number of transaction // we will prune in a given pass (1M) (deprecated) DefaultMaxPruneTxnBatchSize = 1 * 1000 * 1000 // DefaultMaxPruneTxnPasses is the default number of // batches we will process. (deprecated) DefaultMaxPruneTxnPasses = 100 // DefaultModelLogfileMaxSize is the maximum file size in MB of // the log file written out by the controller on behalf of workers // running for a model. DefaultModelLogfileMaxSize = 10 // DefaultModelLogfileMaxBackups is the number of old model // log files to keep (compressed). DefaultModelLogfileMaxBackups = 2 // DefaultModelLogsSizeMB is the size in MB of the capped logs collection // for each model. DefaultModelLogsSizeMB = 20 // DefaultPruneTxnQueryCount is the number of transactions // to read in a single query. DefaultPruneTxnQueryCount = 1000 // DefaultPruneTxnSleepTime is the amount of time to sleep between // processing each batch query. This is used to reduce load on the system, // allowing other queries to time to operate. On large controllers, // processing 1000 txs seems to take about 100ms, so a sleep time of 10ms // represents a 10% slowdown, but allows other systems to // operate concurrently. DefaultPruneTxnSleepTime = "10ms" // DefaultMaxCharmStateSize is the maximum size (in bytes) of charm // state data that each unit can store to the controller. DefaultMaxCharmStateSize = 2 * 1024 * 1024 // DefaultMaxAgentStateSize is the maximum size (in bytes) of internal // state data that agents can store to the controller. DefaultMaxAgentStateSize = 512 * 1024 // DefaultNonSyncedWritesToRaftLog is the default value for the // non-synced-writes-to-raft-log value. It is set to false by default. DefaultNonSyncedWritesToRaftLog = false // DefaultMigrationMinionMaxWait is the default value for DefaultMigrationMinionWaitMax = "15m" )
Variables ¶
var ( // ControllerOnlyConfigAttributes are attributes which are only relevant // for a controller, never a model. ControllerOnlyConfigAttributes = []string{ AllowModelAccessKey, AgentRateLimitMax, AgentRateLimitRate, APIPort, APIPortOpenDelay, AutocertDNSNameKey, AutocertURLKey, CACertKey, CharmStoreURL, ControllerAPIPort, ControllerName, ControllerUUIDKey, IdentityPublicKey, IdentityURL, SetNUMAControlPolicyKey, StatePort, MongoMemoryProfile, JujuDBSnapChannel, MaxDebugLogDuration, MaxTxnLogSize, MaxPruneTxnBatchSize, MaxPruneTxnPasses, ModelLogfileMaxBackups, ModelLogfileMaxSize, ModelLogsSize, PruneTxnQueryCount, PruneTxnSleepTime, PublicDNSAddress, JujuHASpace, JujuManagementSpace, AuditingEnabled, AuditLogCaptureArgs, AuditLogMaxSize, AuditLogMaxBackups, AuditLogExcludeMethods, CAASOperatorImagePath, CAASImageRepo, Features, MeteringURL, MaxCharmStateSize, MaxAgentStateSize, NonSyncedWritesToRaftLog, MigrationMinionWaitMax, } // For backwards compatibility, we must include "anything", "juju-apiserver" // and "juju-mongodb" as hostnames as that is what clients specify // as the hostname for verification (this certificate is used both // for serving MongoDB and API server connections). We also // explicitly include localhost. DefaultDNSNames = []string{ "localhost", "juju-apiserver", "juju-mongodb", "anything", } // AllowedUpdateConfigAttributes contains all of the controller // config attributes that are allowed to be updated after the // controller has been created. AllowedUpdateConfigAttributes = set.NewStrings( AgentRateLimitMax, AgentRateLimitRate, APIPortOpenDelay, AuditingEnabled, AuditLogCaptureArgs, AuditLogExcludeMethods, ControllerAPIPort, ControllerName, MaxDebugLogDuration, MaxPruneTxnBatchSize, MaxPruneTxnPasses, ModelLogfileMaxBackups, ModelLogfileMaxSize, ModelLogsSize, MongoMemoryProfile, PruneTxnQueryCount, PruneTxnSleepTime, PublicDNSAddress, JujuHASpace, JujuManagementSpace, CAASOperatorImagePath, CAASImageRepo, Features, MaxCharmStateSize, MaxAgentStateSize, NonSyncedWritesToRaftLog, MigrationMinionWaitMax, ) // DefaultAuditLogExcludeMethods is the default list of methods to // exclude from the audit log. DefaultAuditLogExcludeMethods = []string{ ReadOnlyMethodsWildcard, } )
var ConfigSchema = environschema.Fields{ AgentRateLimitMax: { Description: "The maximum size of the token bucket used to ratelimit agent connections", Type: environschema.Tint, }, AgentRateLimitRate: { Description: "The time taken to add a new token to the ratelimit bucket", Type: environschema.Tstring, }, AuditingEnabled: { Description: "Determines if the controller records auditing information", Type: environschema.Tbool, }, AuditLogCaptureArgs: { Description: `Determines if the audit log contains the arguments passed to API methods`, Type: environschema.Tbool, }, AuditLogMaxSize: { Description: "The maximum size for the current controller audit log file", Type: environschema.Tstring, }, AuditLogMaxBackups: { Type: environschema.Tint, Description: "The number of old audit log files to keep (compressed)", }, AuditLogExcludeMethods: { Type: environschema.FieldType("list of strings"), Description: "The list of Facade.Method names that aren't interesting for audit logging purposes.", }, APIPort: { Type: environschema.Tint, Description: "The port used for api connections", }, APIPortOpenDelay: { Type: environschema.Tstring, Description: `The duration that the controller will wait between when the controller has been deemed to be ready to open the api-port and when the api-port is actually opened (only used when a controller-api-port value is set).`, }, ControllerAPIPort: { Type: environschema.Tint, Description: `An optional port that may be set for controllers that have a very heavy load. If this port is set, this port is used by the controllers to talk to each other - used for the local API connection as well as the pubsub forwarders, and the raft workers. If this value is set, the api-port isn't opened until the controllers have started properly.`, }, StatePort: { Type: environschema.Tint, Description: `The port used for mongo connections`, }, IdentityURL: { Type: environschema.Tstring, Description: `The url of the identity manager`, }, IdentityPublicKey: { Type: environschema.Tstring, Description: `The public key of the identity manager`, }, SetNUMAControlPolicyKey: { Type: environschema.Tbool, Description: `Determines if the NUMA control policy is set`, }, AutocertURLKey: { Type: environschema.Tstring, Description: `The URL used to obtain official TLS certificates when a client connects to the API`, }, AutocertDNSNameKey: { Type: environschema.Tstring, Description: `The DNS name of the controller`, }, AllowModelAccessKey: { Type: environschema.Tbool, Description: `Determines if the controller allows users to connect to models they have been authorized for even when they don't have any access rights to the controller itself`, }, MongoMemoryProfile: { Type: environschema.Tstring, Description: `Sets mongo memory profile`, }, JujuDBSnapChannel: { Type: environschema.Tstring, Description: `Sets channel for installing mongo snaps when bootstrapping on focal or later`, }, MaxDebugLogDuration: { Type: environschema.Tstring, Description: `The maximum duration that a debug-log session is allowed to run`, }, MaxTxnLogSize: { Type: environschema.Tstring, Description: `The maximum size the of capped txn log collection`, }, MaxPruneTxnBatchSize: { Type: environschema.Tint, Description: `(deprecated) The maximum number of transactions evaluated in one go when pruning`, }, MaxPruneTxnPasses: { Type: environschema.Tint, Description: `(deprecated) The maximum number of batches processed when pruning`, }, ModelLogfileMaxBackups: { Type: environschema.Tint, Description: "The number of old model log files to keep (compressed)", }, ModelLogfileMaxSize: { Type: environschema.Tstring, Description: `The maximum size of the log file written out by the controller on behalf of workers running for a model`, }, ModelLogsSize: { Type: environschema.Tstring, Description: `The size of the capped collections used to hold the logs for the models`, }, PruneTxnQueryCount: { Type: environschema.Tint, Description: `The number of transactions to read in a single query`, }, PruneTxnSleepTime: { Type: environschema.Tstring, Description: `The amount of time to sleep between processing each batch query`, }, PublicDNSAddress: { Type: environschema.Tstring, Description: `Public DNS address (with port) of the controller.`, }, JujuHASpace: { Type: environschema.Tstring, Description: `The network space within which the MongoDB replica-set should communicate`, }, JujuManagementSpace: { Type: environschema.Tstring, Description: `The network space that agents should use to communicate with controllers`, }, CAASOperatorImagePath: { Type: environschema.Tstring, Description: `(deprected) The url of the docker image used for the application operator. Use "caas-image-repo" instead.`, }, CAASImageRepo: { Type: environschema.Tstring, Description: `The docker repo to use for the jujud operator and mongo images`, }, Features: { Type: environschema.FieldType("list of strings"), Description: `A list of runtime changeable features to be updated`, }, CharmStoreURL: { Type: environschema.Tstring, Description: `The url for charmstore API calls`, }, MeteringURL: { Type: environschema.Tstring, Description: `The url for metrics`, }, MaxCharmStateSize: { Type: environschema.Tint, Description: `The maximum size (in bytes) of charm-specific state that units can store to the controller`, }, MaxAgentStateSize: { Type: environschema.Tint, Description: `The maximum size (in bytes) of internal state data that agents can store to the controller`, }, NonSyncedWritesToRaftLog: { Type: environschema.Tbool, Description: `Do not perform fsync calls after appending entries to the raft log. Disabling sync improves performance at the cost of reliability`, }, MigrationMinionWaitMax: { Type: environschema.Tstring, Description: `The maximum during model migrations that the migration worker will wait for agents to report on phases of the migration`, }, }
ConfigSchema holds information on all the fields defined by the config package.
Functions ¶
func ControllerOnlyAttribute ¶
ControllerOnlyAttribute returns true if the specified attribute name is only relevant for a controller.
Types ¶
type Config ¶
type Config map[string]interface{}
Config is a string-keyed map of controller configuration attributes.
func NewConfig ¶
NewConfig creates a new Config from the supplied attributes. Default values will be used where defaults are available.
The controller UUID and CA certificate must be passed in. The UUID is typically generated by the immediate caller, and the CA certificate generated by environs/bootstrap.NewConfig.
func (Config) APIPortOpenDelay ¶
APIPortOpenDelay returns the duration to wait before opening the APIPort once the controller has started up. Only used when the ControllerAPIPort is non-zero.
func (Config) AgentRateLimitMax ¶
AgentRateLimitMax is the initial size of the token bucket that is used to rate limit agent connections.
func (Config) AgentRateLimitRate ¶
AgentRateLimitRate is the time taken to add a token into the token bucket that is used to rate limit agent connections.
func (Config) AllowModelAccess ¶
AllowModelAccess reports whether users are allowed to access models they have been granted permission for even when they can't access the controller.
func (Config) AsSpaceConstraints ¶
AsSpaceConstraints checks to see whether config has spaces names populated for management and/or HA (Mongo). Non-empty values are merged with any input spaces and returned as a new slice reference. A slice pointer is used for congruence with the Spaces member in constraints.Value.
func (Config) AuditLogCaptureArgs ¶
AuditLogCaptureArgs returns whether audit logging should capture the arguments to API methods. The default is false.
func (Config) AuditLogExcludeMethods ¶
AuditLogExcludeMethods returns the set of method names that are considered uninteresting for audit logging. Conversations containing only these will be excluded from the audit log.
func (Config) AuditLogMaxBackups ¶
AuditLogMaxBackups returns the maximum number of backup audit log files to keep.
func (Config) AuditLogMaxSizeMB ¶
AuditLogMaxSizeMB returns the maximum size for an audit log file in MB.
func (Config) AuditingEnabled ¶
AuditingEnabled returns whether or not auditing has been enabled for the environment. The default is false.
func (Config) AutocertDNSName ¶
AutocertDNSName returns the DNS name of the controller. See AutocertDNSNameKey for more details.
func (Config) AutocertURL ¶
AutocertURL returns the URL used to obtain official TLS certificates when a client connects to the API. See AutocertURLKey for more details.
func (Config) CAASImageRepo ¶
CAASImageRepo sets the url of the docker repo used for the jujud operator and mongo images.
func (Config) CAASOperatorImagePath ¶
CAASOperatorImagePath sets the url of the docker image used for the application operator.
func (Config) CACert ¶
CACert returns the certificate of the CA that signed the controller certificate, in PEM format, and whether the setting is available.
TODO(axw) once the controller config is completely constructed, there will always be a CA certificate. Get rid of the bool result.
func (Config) CharmStoreURL ¶
CharmStoreURL returns the URL to use for charmstore api calls.
func (Config) ControllerAPIPort ¶
ControllerAPIPort returns the optional API port to be used for the controllers to talk to each other. A zero value means that it is not set.
func (Config) ControllerName ¶
ControllerName returns the name for the controller
func (Config) ControllerUUID ¶
ControllerUUID returns the uuid for the controller.
func (Config) IdentityPublicKey ¶
IdentityPublicKey returns the public key of the identity manager.
func (Config) IdentityURL ¶
IdentityURL returns the url of the identity manager.
func (Config) JujuDBSnapChannel ¶
JujuDBSnapChannel returns the channel for installing mongo snaps.
func (Config) JujuHASpace ¶
JujuHASpace is the network space within which the MongoDB replica-set should communicate.
func (Config) JujuManagementSpace ¶
JujuManagementSpace is the network space that agents should use to communicate with controllers.
func (Config) MaxAgentStateSize ¶
MaxAgentStateSize returns the max size (in bytes) of state data that agents can store to the controller. A value of zero indicates no limit.
func (Config) MaxCharmStateSize ¶
MaxCharmStateSize returns the max size (in bytes) of charm-specific state that each unit can store to the controller. A value of zero indicates no limit.
func (Config) MaxDebugLogDuration ¶
MaxDebugLogDuration is the maximum time a debug-log session is allowed to run before it is terminated by the server.
func (Config) MaxPruneTxnBatchSize ¶
MaxPruneTxnBatchSize is the maximum size of the txn log collection.
func (Config) MaxPruneTxnPasses ¶
MaxPruneTxnPasses is the maximum number of batches of the txn log collection we will process at a time.
func (Config) MaxTxnLogSizeMB ¶
MaxTxnLogSizeMB is the maximum size in MiB of the txn log collection.
func (Config) MeteringURL ¶
MeteringURL returns the URL to use for metering api calls.
func (Config) MigrationMinionWaitMax ¶
MigrationMinionWaitMax returns a duration for the maximum time that the migration-master worker should wait for migration-minion reports during phases of a model migration.
func (Config) ModelLogfileMaxBackups ¶
ModelLogfileMaxBackups is the number of old model log files to keep (compressed).
func (Config) ModelLogfileMaxSizeMB ¶
ModelLogfileMaxSizeMB is the maximum size of the log file written out by the controller on behalf of workers running for a model.
func (Config) ModelLogsSizeMB ¶
ModelLogsSizeMB is the size of the capped collection used to store the model logs. Total size on disk will be ModelLogsSizeMB * number of models.
func (Config) MongoMemoryProfile ¶
MongoMemoryProfile returns the selected profile or low.
func (Config) NUMACtlPreference ¶
NUMACtlPreference returns if numactl is preferred.
func (Config) NonSyncedWritesToRaftLog ¶
NonSyncedWritesToRaftLog returns true if fsync calls should be skipped after each write to the raft log.
func (Config) PruneTxnQueryCount ¶
PruneTxnQueryCount is the size of small batches for pruning
func (Config) PruneTxnSleepTime ¶
PruneTxnSleepTime is the amount of time to sleep between batches.
func (Config) PublicDNSAddress ¶
PublicDNSAddress returns the DNS name of the controller.
type StateServingInfo ¶
type StateServingInfo struct { APIPort int ControllerAPIPort int StatePort int Cert string PrivateKey string CAPrivateKey string // this will be passed as the KeyFile argument to MongoDB SystemIdentity string }
StateServingInfo holds network/auth information needed by a controller.
Directories ¶
Path | Synopsis |
---|---|
Package modelmanager provides the business logic for model management operations in the controller.
|
Package modelmanager provides the business logic for model management operations in the controller. |