lib/resource-enrichers/service-enricher.js
function defaultService (config) {
  const serviceConfig = _.merge({}, baseServiceConfig);

  // Apply MetaData
  serviceConfig.metadata = objectMetadata({
    name: config.projectName,
    namespace: config.namespace.name
  });

  serviceConfig.spec.selector = {
    project: config.projectName,
    provider: 'nodeshift'
  };

  serviceConfig.spec.ports = [
    {
      protocol: 'TCP',
      port: config.port,
      targetPort: config.port,
      name: 'http'
    }
  ];

  serviceConfig.spec.type = 'ClusterIP';

  return serviceConfig;
}
function defaultService (config) {
  const serviceConfig = _.merge({}, baseServiceConfig);

  // Apply MetaData
  serviceConfig.metadata = objectMetadata({
    name: config.projectName,
    namespace: config.namespace.name
  });

  serviceConfig.spec.selector = {
    project: config.projectName,
    provider: 'nodeshift'
  };

  serviceConfig.spec.ports = [
    {
      protocol: 'TCP',
      port: config.port,
      targetPort: config.port,
      name: 'http'
    }
  ];

  serviceConfig.spec.type = 'ClusterIP';

  return serviceConfig;
}
function defaultService ( config ) { const serviceConfig = _ . merge ( { } , baseServiceConfig ) ; // Apply MetaData serviceConfig . metadata = objectMetadata ( { name : config . projectName , namespace : config . namespace . name } ) ; serviceConfig . spec . selector = { project : config . projectName , provider : 'nodeshift' } ; serviceConfig . spec . ports = [ { protocol : 'TCP' , port : config . port , targetPort : config . port , name : 'http' } ] ; serviceConfig . spec . type = 'ClusterIP' ; return serviceConfig ; }
Returns a default service config. need to figure out a better way to do those port mappings
Returns a default service config . need to figure out a better way to do those port mappings