Skip to content

Commit

Permalink
adds selfTracing property and tests
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
Adrian Cole committed Feb 19, 2024
1 parent 6849bde commit ae7d6fa
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 17 deletions.
4 changes: 2 additions & 2 deletions charts/zipkin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
apiVersion: v2
appVersion: 3.0.3
appVersion: 3.0.6
name: zipkin
description: A Zipkin helm chart for kubernetes
type: application
version: 0.1.2
version: 0.2.0
maintainers:
- name: openzipkin
email: [email protected]
3 changes: 3 additions & 0 deletions charts/zipkin/ci/default-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
zipkin:
{ }
4 changes: 4 additions & 0 deletions charts/zipkin/ci/selfTracing-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
zipkin:
selfTracing:
enabled: true
2 changes: 2 additions & 0 deletions charts/zipkin/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
env:
- name: SELF_TRACING_ENABLED
value: "{{ .Values.zipkin.selfTracing.enabled }}"
- name: STORAGE_TYPE
value: "{{ .Values.zipkin.storage.type }}"
{{- if eq .Values.zipkin.storage.type "elasticsearch" }}
Expand Down
23 changes: 23 additions & 0 deletions charts/zipkin/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "zipkin.fullname" . }}-test-connection"
labels:
{{- include "zipkin.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: get-api-services
image: 'ghcr.io/openzipkin/alpine:3.19.1'
command: [ '/bin/sh', '-c' ]
# Get an arbitrary API endpoint using the ClusterIP and service port
args: [ 'wget -qO ---spider --header "b3: cafebabecafebabe-cafebabecafebabe-1" http://{{ include "zipkin.fullname" . }}:{{ .Values.service.port }}/api/v2/services' ]
{{- if .Values.zipkin.selfTracing.enabled }}
- name: get-trace
image: 'ghcr.io/openzipkin/alpine:3.19.1'
command: [ '/bin/sh', '-c' ]
# If self-tracing, sleep for the trace to process, the get it by the constant ID passed above.
args: [ 'sleep 1 && wget -qO ---spider http://{{ include "zipkin.fullname" . }}:{{ .Values.service.port }}/api/v2/trace/cafebabecafebabe' ]
{{- end }}
restartPolicy: Never
33 changes: 18 additions & 15 deletions charts/zipkin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ image:
# Overrides the image tag whose default is the chart appVersion.
tag: ""

imagePullSecrets: []
imagePullSecrets: [ ]

Check failure on line 21 in charts/zipkin/values.yaml

View workflow job for this annotation

GitHub Actions / lint

21:20 [brackets] too many spaces inside empty brackets
nameOverride: ""
fullnameOverride: ""
namespaceOverride: ""
Expand All @@ -27,7 +27,7 @@ serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
annotations: { }

Check failure on line 30 in charts/zipkin/values.yaml

View workflow job for this annotation

GitHub Actions / lint

30:17 [braces] too many spaces inside empty braces
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
Expand All @@ -38,8 +38,8 @@ podAnnotations:
sidecar.istio.io/inject: "false"

podSecurityContext:
{}
# fsGroup: 2000
{ }

Check failure on line 41 in charts/zipkin/values.yaml

View workflow job for this annotation

GitHub Actions / lint

41:4 [braces] too many spaces inside empty braces
# fsGroup: 2000

securityContext:
# capabilities:
Expand All @@ -56,13 +56,13 @@ service:
ingress:
enabled: false
annotations:
{}
{ }

Check failure on line 59 in charts/zipkin/values.yaml

View workflow job for this annotation

GitHub Actions / lint

59:6 [braces] too many spaces inside empty braces
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
# kubernetes.io/tls-acme: "true"
# className: nginx
host: chart-example.local
path: /
tls: []
tls: [ ]

Check failure on line 65 in charts/zipkin/values.yaml

View workflow job for this annotation

GitHub Actions / lint

65:9 [brackets] too many spaces inside empty brackets
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
Expand Down Expand Up @@ -92,20 +92,23 @@ autoscaling:
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

nodeSelector: {}
nodeSelector: { }

Check failure on line 95 in charts/zipkin/values.yaml

View workflow job for this annotation

GitHub Actions / lint

95:16 [braces] too many spaces inside empty braces

tolerations: []
tolerations: [ ]

Check failure on line 97 in charts/zipkin/values.yaml

View workflow job for this annotation

GitHub Actions / lint

97:15 [brackets] too many spaces inside empty brackets

affinity: {}
affinity: { }

Check failure on line 99 in charts/zipkin/values.yaml

View workflow job for this annotation

GitHub Actions / lint

99:12 [braces] too many spaces inside empty braces

priorityClassName: ""

zipkin:
# selfTracing generates traces for HTTP paths under /api
selfTracing:
enabled: false
storage:
type: mem
# type: elasticsearch
# elasticsearch:
# hosts: hostA hostB
# index: fooIndex
extraEnv: {}
# type: elasticsearch
# elasticsearch:
# hosts: hostA hostB
# index: fooIndex
extraEnv: { }

Check failure on line 113 in charts/zipkin/values.yaml

View workflow job for this annotation

GitHub Actions / lint

113:14 [braces] too many spaces inside empty braces
# JAVA_OPTS: "-Xms128m -Xmx512m -XX:+ExitOnOutOfMemoryError"

0 comments on commit ae7d6fa

Please sign in to comment.