getConfigurationSchema() { return joi.object().keys({ socket: this.joi.string().default('/var/run/docker.sock'), host: this.joi.string(), port: this.joi.number().port().default(2375), cron: joi.string().cron().default('0 * * * *'), watchbydefault: this.joi.boolean().default(true), registries: joi.object().keys({ hub: joi.object().keys({ auth: joi.object().keys({ login: joi.string(), password: joi.string().required(), }), }), }), }); }
/** * Get the Trigger configuration schema. * @returns {*} */ getConfigurationSchema() { return this.joi.object().keys({ brokers: this.joi.string().required(), topic: this.joi.string().default('wud-image'), clientId: this.joi.string().default('wud'), ssl: this.joi.boolean().default(false), authentication: this.joi.object({ type: this.joi.string() .allow('PLAIN') .allow('SCRAM-SHA-256') .allow('SCRAM-SHA-512') .default('PLAIN'), user: this.joi.string().required(), password: this.joi.string().required(), }), }); }
backlogMetrics: { zkPath: joi.string().required(), intervalS: joi.number().default(60), }, }).required(), queueProcessor: joi.func(), fromOffset: joi.alternatives().try('latest', 'earliest', 'none'), concurrency: joi.number().greater(0).default(CONCURRENCY_DEFAULT), fetchMaxBytes: joi.number(), canary: joi.boolean().default(false), bootstrap: joi.boolean().default(false), }; const validConfig = joi.attempt(config, configJoi,