Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 1.12 and use new admin ports #425

Merged
merged 1 commit into from
May 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jaeger.version
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# by default with the Jaeger Operator. This would usually be the latest
# stable Jaeger version. When you update this file, make sure to update the
# the docs as well.
1.11
1.12
12 changes: 9 additions & 3 deletions pkg/deployment/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ func (a *Agent) Get() *appsv1.DaemonSet {
configRest := util.GetPort("--http-server.host-port=", args, 5778)
jgCompactTrft := util.GetPort("--processor.jaeger-compact.server-host-port=", args, 6831)
jgBinaryTrft := util.GetPort("--processor.jaeger-binary.server-host-port=", args, 6832)
adminPort := util.GetPort("--admin-http-port=", args, 14271)

trueVar := true
labels := a.labels()

baseCommonSpec := v1.JaegerCommonSpec{
Annotations: map[string]string{
"prometheus.io/scrape": "true",
"prometheus.io/port": strconv.Itoa(int(configRest)),
"prometheus.io/port": strconv.Itoa(int(adminPort)),
"sidecar.istio.io/inject": "false",
},
}
Expand Down Expand Up @@ -128,12 +129,17 @@ func (a *Agent) Get() *appsv1.DaemonSet {
Name: "jg-binary-trft",
Protocol: corev1.ProtocolUDP,
},
{
ContainerPort: adminPort,
HostPort: adminPort,
Name: "admin-http",
},
},
ReadinessProbe: &corev1.Probe{
Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/metrics",
Port: intstr.FromInt(int(configRest)),
Path: "/",
Port: intstr.FromInt(int(adminPort)),
},
},
InitialDelaySeconds: 1,
Expand Down
13 changes: 11 additions & 2 deletions pkg/deployment/all-in-one.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package deployment
import (
"fmt"
"sort"
"strconv"

"github.com/spf13/viper"
appsv1 "k8s.io/api/apps/v1"
Expand Down Expand Up @@ -39,10 +40,14 @@ func (a *AllInOne) Get() *appsv1.Deployment {
labels := a.labels()
trueVar := true

args := append(a.jaeger.Spec.AllInOne.Options.ToArgs())

adminPort := util.GetPort("--admin-http-port=", args, 14269)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain what does 14269? Is it the dafault?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it is the default - so it is just checking for the default being overridden by an arg.


baseCommonSpec := v1.JaegerCommonSpec{
Annotations: map[string]string{
"prometheus.io/scrape": "true",
"prometheus.io/port": "16686",
"prometheus.io/port": strconv.Itoa(int(adminPort)),
"sidecar.istio.io/inject": "false",
},
}
Expand Down Expand Up @@ -152,12 +157,16 @@ func (a *AllInOne) Get() *appsv1.Deployment {
ContainerPort: 16686,
Name: "query",
},
{
ContainerPort: adminPort,
Name: "admin-http",
},
},
ReadinessProbe: &corev1.Probe{
Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/",
Port: intstr.FromInt(14269),
Port: intstr.FromInt(int(adminPort)),
},
},
InitialDelaySeconds: 1,
Expand Down
13 changes: 11 additions & 2 deletions pkg/deployment/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package deployment
import (
"fmt"
"sort"
"strconv"
"strings"

"github.com/spf13/viper"
Expand Down Expand Up @@ -50,10 +51,14 @@ func (c *Collector) Get() *appsv1.Deployment {
labels := c.labels()
trueVar := true

args := append(c.jaeger.Spec.Collector.Options.ToArgs())

adminPort := util.GetPort("--admin-http-port=", args, 14269)

baseCommonSpec := v1.JaegerCommonSpec{
Annotations: map[string]string{
"prometheus.io/scrape": "true",
"prometheus.io/port": "14268",
"prometheus.io/port": strconv.Itoa(int(adminPort)),
"sidecar.istio.io/inject": "false",
},
}
Expand Down Expand Up @@ -146,12 +151,16 @@ func (c *Collector) Get() *appsv1.Deployment {
ContainerPort: 14268,
Name: "c-binary-trft",
},
{
ContainerPort: adminPort,
Name: "admin-http",
},
},
ReadinessProbe: &corev1.Probe{
Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/",
Port: intstr.FromInt(14269),
Port: intstr.FromInt(int(adminPort)),
},
},
InitialDelaySeconds: 1,
Expand Down
17 changes: 9 additions & 8 deletions pkg/deployment/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package deployment
import (
"fmt"
"sort"
"strconv"
"strings"

"github.com/spf13/viper"
Expand Down Expand Up @@ -52,10 +53,14 @@ func (i *Ingester) Get() *appsv1.Deployment {
labels := i.labels()
trueVar := true

args := append(i.jaeger.Spec.Ingester.Options.ToArgs())

adminPort := util.GetPort("--admin-http-port=", args, 14270)

baseCommonSpec := v1.JaegerCommonSpec{
Annotations: map[string]string{
"prometheus.io/scrape": "true",
"prometheus.io/port": "14271",
"prometheus.io/port": strconv.Itoa(int(adminPort)),
"sidecar.istio.io/inject": "false",
},
}
Expand Down Expand Up @@ -124,19 +129,15 @@ func (i *Ingester) Get() *appsv1.Deployment {
EnvFrom: envFromSource,
Ports: []corev1.ContainerPort{
{
ContainerPort: 14270,
Name: "hc-http",
},
{
ContainerPort: 14271,
Name: "metrics-http",
ContainerPort: adminPort,
Name: "admin-http",
},
},
ReadinessProbe: &corev1.Probe{
Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/",
Port: intstr.FromInt(14270),
Port: intstr.FromInt(int(adminPort)),
},
},
InitialDelaySeconds: 1,
Expand Down
13 changes: 11 additions & 2 deletions pkg/deployment/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package deployment
import (
"fmt"
"sort"
"strconv"

"github.com/spf13/viper"
appsv1 "k8s.io/api/apps/v1"
Expand Down Expand Up @@ -48,10 +49,14 @@ func (q *Query) Get() *appsv1.Deployment {
labels := q.labels()
trueVar := true

args := append(q.jaeger.Spec.Query.Options.ToArgs())

adminPort := util.GetPort("--admin-http-port=", args, 16687)

baseCommonSpec := v1.JaegerCommonSpec{
Annotations: map[string]string{
"prometheus.io/scrape": "true",
"prometheus.io/port": "16686",
"prometheus.io/port": strconv.Itoa(int(adminPort)),
"sidecar.istio.io/inject": "false",

// note that we are explicitly using a string here, not the value from `inject.Annotation`
Expand Down Expand Up @@ -132,12 +137,16 @@ func (q *Query) Get() *appsv1.Deployment {
ContainerPort: 16686,
Name: "query",
},
{
ContainerPort: adminPort,
Name: "admin-http",
},
},
ReadinessProbe: &corev1.Probe{
Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/",
Port: intstr.FromInt(16687),
Port: intstr.FromInt(int(adminPort)),
},
},
InitialDelaySeconds: 1,
Expand Down