Example #1
0
        /// <summary>
        ///     Create a new <see cref="SecretConfigurationSource"/>.
        /// </summary>
        /// <param name="settings">
        ///     The <see cref="SecretConfigurationSettings"/> used to create configuration providers.
        /// </param>
        public SecretConfigurationSource(SecretConfigurationSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            Settings = settings;
        }
Example #2
0
        /// <summary>
        ///     Create a new <see cref="SecretConfigurationProvider"/>.
        /// </summary>
        /// <param name="providerSettings">
        ///     The <see cref="ConfigMapConfigurationSettings"/> used to configure the provider.
        /// </param>
        public SecretConfigurationProvider(SecretConfigurationSettings providerSettings)
        {
            if (providerSettings == null)
            {
                throw new ArgumentNullException(nameof(providerSettings));
            }

            _client        = providerSettings.Client;
            _secretName    = providerSettings.SecretName;
            _kubeNamespace = providerSettings.KubeNamespace;
            _sectionName   = providerSettings.SectionName;
            _watch         = providerSettings.Watch;

            Log = _client.LoggerFactory.CreateLogger <SecretConfigurationProvider>();
        }