lib/topological_inventory/orchestrator/config_map.rb
# Adds Source to this ConfigMap and Secret
# Collector's app reloads config map automatically
Adds Source to this ConfigMap and Secret
Collector's app reloads config map automatically
Adds Source to this ConfigMap and Secret Collector ' s app reloads config map automatically
def add_source(source)
        logger.info("Adding Source #{source} to ConfigMap #{self}")
        raise "ConfigMap not available" unless available?(source)
        if source.digest.present?
          if targeted_update
            upsert_one!(source)
          else
            if !digests.include?(source.digest)
              digests << source.digest
              sources << source
              update!
              logger.info("[OK] Added Source #{source} to ConfigMap #{self}")
            else
              logger.warn("[WARN] Trying to add already added source #{source} to ConfigMap #{self}")
            end
          end
        else
          logger.warn("[WARN] Trying to add source #{source} without digest to ConfigMap #{self}")
        end
      end
def add_source ( source ) logger . info ( "Adding Source #{source} to ConfigMap #{self}" ) raise "ConfigMap not available" unless available? ( source ) if source . digest . present? if targeted_update upsert_one! ( source ) else if ! digests . include? ( source . digest ) digests << source . digest sources << source update! logger . info ( "[OK] Added Source #{source} to ConfigMap #{self}" ) else logger . warn ( "[WARN] Trying to add already added source #{source} to ConfigMap #{self}" ) end end else logger . warn ( "[WARN] Trying to add source #{source} without digest to ConfigMap #{self}" ) end end
Adds Source to this ConfigMap and Secret
Collector's app reloads config map automatically
Adds Source to this ConfigMap and Secret Collector ' s app reloads config map automatically
source