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

Add jaeger for helm deployment #415

Merged
merged 1 commit into from
Jul 2, 2021
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
3 changes: 2 additions & 1 deletion deploy/charts/dragonfly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ The following table lists the configurable parameters of the dragonfly chart, an

| Parameter | Description | Default |
| ----------------------------------------- | ------------------------------------------------------------ | ----------------------------- |
| `installation.namespace` | namespace for dragonfly installation | `dragonfly-system` |
| `installation.namespace` | namespace for dragonfly installation | `dragonfly-system` |
| `installation.jaeger` | whether enable an all in one jaeger for tracing | `false` |

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

Expand Down
7 changes: 7 additions & 0 deletions deploy/charts/dragonfly/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@

3. Configure runtime to use dragonfly:
https://github.com/dragonflyoss/Dragonfly2/blob/main/docs/en/user-guide/quick-start.md
{{ if .Values.installation.jaeger }}
4. Get Jaeger query URL by running these commands:
export JAEGER_QUERY_PORT=$(kubectl --namespace {{ .Values.installation.namespace }} get services jaeger-all-in-one-query -o jsonpath="{.spec.ports[0].port}")
export JAEGER_QUERY_POD=$(kubectl --namespace {{ .Values.installation.namespace }} get pod -l app.kubernetes.io/name=jaeger-all-in-one -o jsonpath='{range .items[*]}{.metadata.name}{end}' | head -n 1)
kubectl --namespace {{ .Values.installation.namespace }} port-forward $JAEGER_QUERY_POD 16686:$JAEGER_QUERY_PORT
echo "Visit http://127.0.0.1:16686/search?limit=20&lookback=1h&maxDuration&minDuration&service=dragonfly to query download events"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ data:
gcInterval: {{ .Values.dfdaemon.config.gcInterval }}
keepStorage: {{ .Values.dfdaemon.config.keepStorage }}
verbose: {{ .Values.dfdaemon.config.verbose }}
{{- if .Values.dfdaemon.config.jaeger }}
jaeger: {{ .Values.dfdaemon.config.jaeger }}
{{- else if .Values.installation.jaeger }}
jaeger: http://jaeger-all-in-one-collector.{{ $.Values.installation.namespace }}.svc{{ $.Values.installation.clusterDomain }}:14268/api/traces
{{- end }}
scheduler:
netAddrs:
{{- $count := .Values.scheduler.replicas | int}}
Expand Down
297 changes: 297 additions & 0 deletions deploy/charts/dragonfly/templates/jaeger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,297 @@
{{- if .Values.installation.jaeger }}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: jaeger
app.kubernetes.io/component: service-account
app.kubernetes.io/instance: jaeger-all-in-one
app.kubernetes.io/name: jaeger-all-in-one
app.kubernetes.io/part-of: jaeger
name: jaeger-all-in-one
namespace: {{ .Values.installation.namespace }}

---

apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: jaeger
app.kubernetes.io/component: ui-configuration
app.kubernetes.io/instance: jaeger-all-in-one
app.kubernetes.io/name: jaeger-all-in-one-ui-configuration
app.kubernetes.io/part-of: jaeger
name: jaeger-all-in-one-ui-configuration
namespace: {{ .Values.installation.namespace }}
data:
ui: |-
{
"menu": [
{
"items": [
{
"label": "Documentation",
"url": "https://www.jaegertracing.io/docs/1.23"
}
],
"label": "About"
}
]
}

---

apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: jaeger
app.kubernetes.io/component: sampling-configuration
app.kubernetes.io/instance: jaeger-all-in-one
app.kubernetes.io/name: jaeger-all-in-one-sampling-configuration
app.kubernetes.io/part-of: jaeger
name: jaeger-all-in-one-sampling-configuration
namespace: {{ .Values.installation.namespace }}
data:
sampling: |-
{
"default_strategy": {
"param": 1,
"type": "probabilistic"
}
}

---

apiVersion: v1
kind: Service
metadata:
labels:
app: jaeger
app.kubernetes.io/component: service-collector
app.kubernetes.io/instance: jaeger-all-in-one
app.kubernetes.io/name: jaeger-all-in-one-collector
app.kubernetes.io/part-of: jaeger
name: jaeger-all-in-one-collector-headless
namespace: {{ .Values.installation.namespace }}
spec:
clusterIP: None
ports:
- name: http-zipkin
port: 9411
targetPort: 0
- name: http-grpc
port: 14250
targetPort: 0
- name: c-tchan-trft
port: 14267
targetPort: 0
- name: http-c-binary-trft
port: 14268
targetPort: 0
selector:
app: jaeger
app.kubernetes.io/component: all-in-one
app.kubernetes.io/instance: jaeger-all-in-one
app.kubernetes.io/name: jaeger-all-in-one
app.kubernetes.io/part-of: jaeger

---

apiVersion: v1
kind: Service
metadata:
labels:
app: jaeger
app.kubernetes.io/component: service-collector
app.kubernetes.io/instance: jaeger-all-in-one
app.kubernetes.io/name: jaeger-all-in-one-collector
app.kubernetes.io/part-of: jaeger
name: jaeger-all-in-one-collector
namespace: {{ .Values.installation.namespace }}
spec:
ports:
- name: http-zipkin
port: 9411
targetPort: 0
- name: http-grpc
port: 14250
targetPort: 0
- name: c-tchan-trft
port: 14267
targetPort: 0
- name: http-c-binary-trft
port: 14268
targetPort: 0
selector:
app: jaeger
app.kubernetes.io/component: all-in-one
app.kubernetes.io/instance: jaeger-all-in-one
app.kubernetes.io/name: jaeger-all-in-one
app.kubernetes.io/part-of: jaeger

---

apiVersion: v1
kind: Service
metadata:
labels:
app: jaeger
app.kubernetes.io/component: service-query
app.kubernetes.io/instance: jaeger-all-in-one
app.kubernetes.io/name: jaeger-all-in-one-query
app.kubernetes.io/part-of: jaeger
name: jaeger-all-in-one-query
namespace: {{ .Values.installation.namespace }}
spec:
ports:
- name: http-query
port: 16686
targetPort: 16686
selector:
app: jaeger
app.kubernetes.io/component: all-in-one
app.kubernetes.io/instance: jaeger-all-in-one
app.kubernetes.io/name: jaeger-all-in-one
app.kubernetes.io/part-of: jaeger

---

apiVersion: v1
kind: Service
metadata:
labels:
app: jaeger
app.kubernetes.io/component: service-agent
app.kubernetes.io/instance: jaeger-all-in-one
app.kubernetes.io/name: jaeger-all-in-one-agent
app.kubernetes.io/part-of: jaeger
name: jaeger-all-in-one-agent
namespace: {{ .Values.installation.namespace }}
spec:
clusterIP: None
ports:
- name: zk-compact-trft
port: 5775
protocol: UDP
targetPort: 0
- name: config-rest
port: 5778
targetPort: 0
- name: jg-compact-trft
port: 6831
protocol: UDP
targetPort: 0
- name: jg-binary-trft
port: 6832
protocol: UDP
targetPort: 0
selector:
app: jaeger
app.kubernetes.io/component: all-in-one
app.kubernetes.io/instance: jaeger-all-in-one
app.kubernetes.io/name: jaeger-all-in-one
app.kubernetes.io/part-of: jaeger

---

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: jaeger
app.kubernetes.io/component: all-in-one
app.kubernetes.io/instance: jaeger-all-in-one
app.kubernetes.io/name: jaeger-all-in-one
app.kubernetes.io/part-of: jaeger
name: jaeger-all-in-one
namespace: {{ .Values.installation.namespace }}
spec:
selector:
matchLabels:
app: jaeger
app.kubernetes.io/component: all-in-one
app.kubernetes.io/instance: jaeger-all-in-one
app.kubernetes.io/name: jaeger-all-in-one
app.kubernetes.io/part-of: jaeger
strategy: {}
template:
metadata:
labels:
app: jaeger
app.kubernetes.io/component: all-in-one
app.kubernetes.io/instance: jaeger-all-in-one
app.kubernetes.io/name: jaeger-all-in-one
app.kubernetes.io/part-of: jaeger
spec:
containers:
- args:
- --query.ui-config=/etc/config/ui.json
- --sampling.strategies-file=/etc/jaeger/sampling/sampling.json
env:
- name: SPAN_STORAGE_TYPE
value: memory
- name: COLLECTOR_ZIPKIN_HTTP_PORT
value: "9411"
image: jaegertracing/all-in-one:1.23.0
livenessProbe:
failureThreshold: 5
httpGet:
path: /
port: 14269
initialDelaySeconds: 5
periodSeconds: 15
name: jaeger
ports:
- containerPort: 5775
name: zk-compact-trft
protocol: UDP
- containerPort: 5778
name: config-rest
- containerPort: 6831
name: jg-compact-trft
protocol: UDP
- containerPort: 6832
name: jg-binary-trft
protocol: UDP
- containerPort: 9411
name: zipkin
- containerPort: 14267
name: c-tchan-trft
- containerPort: 14268
name: c-binary-trft
- containerPort: 16686
name: query
- containerPort: 14269
name: admin-http
- containerPort: 14250
name: grpc
readinessProbe:
httpGet:
path: /
port: 14269
initialDelaySeconds: 1
resources: {}
volumeMounts:
- mountPath: /etc/config
name: jaeger-all-in-one-ui-configuration-volume
readOnly: true
- mountPath: /etc/jaeger/sampling
name: jaeger-all-in-one-sampling-configuration-volume
readOnly: true
serviceAccountName: jaeger-all-in-one
volumes:
- configMap:
items:
- key: ui
path: ui.json
name: jaeger-all-in-one-ui-configuration
name: jaeger-all-in-one-ui-configuration-volume
- configMap:
items:
- key: sampling
path: sampling.json
name: jaeger-all-in-one-sampling-configuration
name: jaeger-all-in-one-sampling-configuration-volume
{{- end }}
4 changes: 4 additions & 0 deletions deploy/charts/dragonfly/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ fullnameOverride: ""
installation:
namespace: dragonfly-system
clusterDomain: ""
# enable an all in one jaeger for tracing every downloading event
# should not use in production environment
jaeger: false

scheduler:
name: scheduler
Expand Down Expand Up @@ -136,6 +139,7 @@ dfdaemon:
gcInterval: 1m0s
keepStorage: false
verbose: true
jaeger: "" # customize jaeger like: http://localhost:14268/api/traces
host:
listenIP: 0.0.0.0
advertiseIP: 0.0.0.0
Expand Down