mirror of https://github.com/linkerd/linkerd2.git
Fix non-default proxy-api port (#979)
Running `conduit install --api-port xxx` where xxx != 8086 would yield a broken install. Fix the install command to correctly propagate the `api-port` flag, setting it as the serve address in the proxy-api container. Signed-off-by: Andrew Seigner <siggy@buoyant.io>
This commit is contained in:
parent
55d7228959
commit
8a1a3b31d4
|
@ -30,6 +30,7 @@ type installConfig struct {
|
|||
ControllerLogLevel string
|
||||
ControllerComponentLabel string
|
||||
CreatedByAnnotation string
|
||||
ProxyAPIPort uint
|
||||
}
|
||||
|
||||
type installOptions struct {
|
||||
|
@ -97,6 +98,7 @@ func validateAndBuildConfig(options *installOptions) (*installConfig, error) {
|
|||
ControllerLogLevel: options.controllerLogLevel,
|
||||
ControllerComponentLabel: k8s.ControllerComponentLabel,
|
||||
CreatedByAnnotation: k8s.CreatedByAnnotation,
|
||||
ProxyAPIPort: options.proxyAPIPort,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ func TestRender(t *testing.T) {
|
|||
ControllerLogLevel: "ControllerLogLevel",
|
||||
ControllerComponentLabel: "ControllerComponentLabel",
|
||||
CreatedByAnnotation: "CreatedByAnnotation",
|
||||
ProxyAPIPort: 123,
|
||||
}
|
||||
|
||||
testCases := []struct {
|
||||
|
|
|
@ -170,6 +170,7 @@ spec:
|
|||
resources: {}
|
||||
- args:
|
||||
- proxy-api
|
||||
- -addr=:8086
|
||||
- -log-level=info
|
||||
- -logtostderr=true
|
||||
image: gcr.io/runconduit/controller:undefined
|
||||
|
|
|
@ -111,8 +111,8 @@ spec:
|
|||
ControllerComponentLabel: controller
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 8086
|
||||
targetPort: 8086
|
||||
port: 123
|
||||
targetPort: 123
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
|
@ -171,13 +171,14 @@ spec:
|
|||
resources: {}
|
||||
- args:
|
||||
- proxy-api
|
||||
- -addr=:123
|
||||
- -log-level=ControllerLogLevel
|
||||
- -logtostderr=true
|
||||
image: ControllerImage
|
||||
imagePullPolicy: ImagePullPolicy
|
||||
name: proxy-api
|
||||
ports:
|
||||
- containerPort: 8086
|
||||
- containerPort: 123
|
||||
name: grpc
|
||||
- containerPort: 9996
|
||||
name: admin-http
|
||||
|
|
|
@ -114,8 +114,8 @@ spec:
|
|||
{{.ControllerComponentLabel}}: controller
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 8086
|
||||
targetPort: 8086
|
||||
port: {{.ProxyAPIPort}}
|
||||
targetPort: {{.ProxyAPIPort}}
|
||||
|
||||
---
|
||||
kind: Deployment
|
||||
|
@ -167,13 +167,14 @@ spec:
|
|||
- name: proxy-api
|
||||
ports:
|
||||
- name: grpc
|
||||
containerPort: 8086
|
||||
containerPort: {{.ProxyAPIPort}}
|
||||
- name: admin-http
|
||||
containerPort: 9996
|
||||
image: {{.ControllerImage}}
|
||||
imagePullPolicy: {{.ImagePullPolicy}}
|
||||
args:
|
||||
- "proxy-api"
|
||||
- "-addr=:{{.ProxyAPIPort}}"
|
||||
- "-log-level={{.ControllerLogLevel}}"
|
||||
- "-logtostderr=true"
|
||||
- name: tap
|
||||
|
|
Loading…
Reference in New Issue