Skip to content

Commit

Permalink
server: removed http listener by default
Browse files Browse the repository at this point in the history
Since we don't have an option to overwrite in cilium-agent, there's no
need to expose a port for the cilium-agent to receive requests. By
default, all requests will be dealt by the cilium socket.

Signed-off-by: André Martins <andre@cilium.io>
  • Loading branch information
aanm authored and tgraf committed Mar 21, 2017
1 parent cffc5bd commit 706e9b6
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ runtime-tests:

generate-api:
swagger generate server -t api/v1 -f api/v1/openapi.yaml -a restapi \
-s server -C api/v1/cilium-server.yml
-s server --default-scheme=unix -C api/v1/cilium-server.yml
swagger generate client -t api/v1 -f api/v1/openapi.yaml -a restapi

.PHONY: force
Expand Down
2 changes: 0 additions & 2 deletions api/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ info:
title: Cilium API
description: Cilium
version: v1beta
schemes:
- http
x-schemes:
- unix
basePath: "/v1beta"
Expand Down
2 changes: 1 addition & 1 deletion api/v1/server/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Cilium
Schemes:
http
unix
Host: localhost
BasePath: /v1beta
Version: v1beta
Expand Down
3 changes: 0 additions & 3 deletions api/v1/server/embedded_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ func init() {
"produces": [
"application/json"
],
"schemes": [
"http"
],
"swagger": "2.0",
"info": {
"description": "Cilium",
Expand Down
1 change: 0 additions & 1 deletion api/v1/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ var defaultSchemes []string

func init() {
defaultSchemes = []string{
schemeHTTP,
schemeUnix,
}
}
Expand Down
2 changes: 1 addition & 1 deletion daemon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func runDaemon() {
api.IPAMDeleteIPAMIPHandler = NewDeleteIPAMIPHandler(d)

server := server.NewServer(api)
server.EnabledListeners = []string{"http", "unix"}
server.EnabledListeners = []string{"unix"}
server.SocketPath = flags.Filename(socketPath)
defer server.Shutdown()

Expand Down

0 comments on commit 706e9b6

Please sign in to comment.