configgin 0.14.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/configgin/version.rb +1 -1
- data/lib/environment_config_transmogrifier.rb +0 -2
- data/lib/job.rb +14 -1
- data/lib/kube_link_generator.rb +2 -3
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: c2a9f4d7934d6daf2749f6a8b3655fbe40bf5029
         | 
| 4 | 
            +
              data.tar.gz: dd2fc1734da0c2c1cb9e5421c63cc97649bce6b0
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: '009e5dd0ca2b3a3e54317fba19f05c8ba64727dd73ce5f039d734236c55c6415258f6fd5107e80a9c7be060815dc779e8c333f1baf0794610c7de6206e7efb1d'
         | 
| 7 | 
            +
              data.tar.gz: 7e6670ce466bba34c1d7284ad0788f7d7e0cbd8cf066afbcc98278f7f227cc45993a7a419c21cc776287ce2a53df850a4a4462676aca2f113409b7fa6130f4be
         | 
    
        data/lib/configgin/version.rb
    CHANGED
    
    
    
        data/lib/job.rb
    CHANGED
    
    | @@ -8,7 +8,12 @@ class Job | |
| 8 8 | 
             
                @spec = spec
         | 
| 9 9 | 
             
                @namespace = namespace
         | 
| 10 10 | 
             
                @client = client
         | 
| 11 | 
            -
                @spec['links'] = KubeLinkSpecs.new(@spec, @namespace, @client, client_stateful_set)
         | 
| 11 | 
            +
                links = @spec['links'] = KubeLinkSpecs.new(@spec, @namespace, @client, client_stateful_set)
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                # Figure out whether _this_ should bootstrap
         | 
| 14 | 
            +
                pods = @client.get_pods(namespace: @namespace, label_selector: "skiff-role-name=#{self_role}")
         | 
| 15 | 
            +
                pods_per_image = links.get_pods_per_image(pods)
         | 
| 16 | 
            +
                @spec['bootstrap'] = pods_per_image[self_pod.metadata.uid] < 2
         | 
| 12 17 | 
             
              end
         | 
| 13 18 |  | 
| 14 19 | 
             
              attr_reader :spec
         | 
| @@ -31,6 +36,14 @@ class Job | |
| 31 36 | 
             
                @exported_properties = exported_properties
         | 
| 32 37 | 
             
              end
         | 
| 33 38 |  | 
| 39 | 
            +
              def self_pod
         | 
| 40 | 
            +
                @self_pod ||= @client.get_pod(ENV['HOSTNAME'], @namespace)
         | 
| 41 | 
            +
              end
         | 
| 42 | 
            +
             | 
| 43 | 
            +
              def self_role
         | 
| 44 | 
            +
                self_pod['metadata']['labels']['skiff-role-name']
         | 
| 45 | 
            +
              end
         | 
| 46 | 
            +
             | 
| 34 47 | 
             
              # Process the given template using a provided spec and output filename
         | 
| 35 48 | 
             
              #
         | 
| 36 49 | 
             
              # @param input_file_path    [String] The input filepath for the template
         | 
    
        data/lib/kube_link_generator.rb
    CHANGED
    
    | @@ -20,7 +20,7 @@ class KubeLinkSpecs | |
| 20 20 | 
             
                @spec['job']['name']
         | 
| 21 21 | 
             
              end
         | 
| 22 22 |  | 
| 23 | 
            -
              # pod_index returns a number for the given  | 
| 23 | 
            +
              # pod_index returns a number for the given pod name. The number is expected to
         | 
| 24 24 | 
             
              # be unique across all pods for the role.
         | 
| 25 25 | 
             
              def pod_index(name)
         | 
| 26 26 | 
             
                index = name.rpartition('-').last
         | 
| @@ -137,8 +137,7 @@ class KubeLinkSpecs | |
| 137 137 | 
             
                provider = @spec['consumes'][key]
         | 
| 138 138 | 
             
                unless provider
         | 
| 139 139 | 
             
                  $stderr.puts "No link provider found for #{key}"
         | 
| 140 | 
            -
                  @links[key] = nil
         | 
| 141 | 
            -
                  return @links[key]
         | 
| 140 | 
            +
                  return @links[key] = nil
         | 
| 142 141 | 
             
                end
         | 
| 143 142 |  | 
| 144 143 | 
             
                if provider['role'] == this_name
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: configgin
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.15.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - SUSE
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2018- | 
| 11 | 
            +
            date: 2018-04-10 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         |