Skip to content

Commit

Permalink
Update to 1.12 and use new admin ports (#425)
Browse files Browse the repository at this point in the history
Signed-off-by: Gary Brown <[email protected]>
  • Loading branch information
objectiser authored May 22, 2019
1 parent 799d878 commit 9c40c48
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 18 deletions.
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)

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

0 comments on commit 9c40c48

Please sign in to comment.