Skip to content

Commit

Permalink
fix: add a name (http) to the service port (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
lance committed Apr 25, 2018
1 parent bd3f10b commit c599dc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/resource-enrichers/service-enricher.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ function defaultService (config) {
provider: 'nodeshift'
};

// TODO: verify the ports property/add the ports property if missing?
serviceConfig.spec.ports = [
{
protocol: 'TCP',
port: config.port,
targetPort: config.port
targetPort: config.port,
name: 'http'
}
];

Expand Down
1 change: 1 addition & 0 deletions test/enricher-tests/service-enricher-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ test('service enricher test - service', async (t) => {
t.ok(Array.isArray(se[0].spec.ports), 'ports prop should be here');
t.ok(se[0].spec.type, 'type prop should be here');
t.equal(se[0].spec.type, 'ClusterIP', 'spec.type should be ClusterIP');
t.equal(se[0].spec.ports[0].name, 'http');
t.end();
});

0 comments on commit c599dc0

Please sign in to comment.