Skip to content

Commit

Permalink
added all-in-one deployment and configmap for jaeger-v2
Browse files Browse the repository at this point in the history
Signed-off-by: Mehul <mehulsharma4786@gmail.com>

lint fix

Signed-off-by: Mehul <mehulsharma4786@gmail.com>

fixed

Signed-off-by: Mehul <mehulsharma4786@gmail.com>

lint fix

Signed-off-by: Mehul <mehulsharma4786@gmail.com>

lint fix

Signed-off-by: Mehul <mehulsharma4786@gmail.com>

fixed using pre-hook

Signed-off-by: Mehul <mehulsharma4786@gmail.com>

fixed --config flag is not been passed

Signed-off-by: mehul <mehulsharam4786@gmail.com>

release ns for config-map.yaml

Signed-off-by: mehul <mehulsharam4786@gmail.com>

testing ci

Signed-off-by: mehul <mehulsharam4786@gmail.com>

testing ci

Signed-off-by: mehul <mehulsharam4786@gmail.com>

fixed ns

Signed-off-by: mehul <mehulsharam4786@gmail.com>

fixed ns

Signed-off-by: mehul <mehulsharam4786@gmail.com>

fixed template

Signed-off-by: mehul <mehulsharam4786@gmail.com>

removed sampling

Signed-off-by: mehul <mehulsharam4786@gmail.com>

removed adaptive sampling from processors

Signed-off-by: mehul <mehulsharam4786@gmail.com>

Revert "Jaeger v2 test2"

fixed hostname for es provisionDataStore.elasticsearch and added ci test for it

Signed-off-by: mehul <mehulsharam4786@gmail.com>

version bump

Signed-off-by: mehul <mehulsharam4786@gmail.com>

fix ci

Signed-off-by: mehul <mehulsharam4786@gmail.com>

added client url

Signed-off-by: mehul <mehulsharam4786@gmail.com>

fixed pod init

Signed-off-by: mehul <mehulsharam4786@gmail.com>

added https code check

Signed-off-by: mehul <mehulsharam4786@gmail.com>
  • Loading branch information
hellspawn679 authored and mehul committed Oct 29, 2024
1 parent 4aab996 commit c766beb
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 5 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/es.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: es Charts

on: pull_request

jobs:
elasticsearch-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.14.4

# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and
# yamllint (https://github.com/adrienverge/yamllint) which require Python
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1
with:
version: v3.10.1

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ct.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --config ct.yaml

- name: Create kind cluster
uses: helm/kind-action@v1.9.0
if: steps.list-changed.outputs.changed == 'true'

- name: Install kubectl
uses: azure/setup-kubectl@v4.0.0
with:
version: 'v1.28.8'
id: install

- name: Set up cert-manager
run: |
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml --namespace ingress-nginx
kubectl label node --all ingress-ready=true
kubectl describe pod --selector=app.kubernetes.io/component=controller -n ingress-nginx
kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=5m
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.6.1/cert-manager.yaml
- name: Set up cmctl
run: |
curl -sSL -o cmctl.tar.gz https://github.com/cert-manager/cert-manager/releases/download/v1.6.1/cmctl-linux-amd64.tar.gz
tar xzf cmctl.tar.gz
sudo mv cmctl /usr/local/bin
cmctl version
- name: Check if cert-manager is up
run: |
cmctl check api --wait=5m
- name: Run chart-testing (install)
run: |
ct install --config ct.yaml --helm-extra-set-args "
--set provisionDataStore.cassandra=false
--set provisionDataStore.elasticsearch=true
--set storage.type=elasticsearch
--set elasticsearch.master.masterOnly=false
--set elasticsearch.master.replicaCount=1
--set elasticsearch.data.replicaCount=0
--set elasticsearch.coordinating.replicaCount=0
--set elasticsearch.ingest.replicaCount=0
"
2 changes: 1 addition & 1 deletion charts/jaeger/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: 1.53.0
description: A Jaeger Helm chart for Kubernetes
name: jaeger
type: application
version: 3.3.1
version: 3.3.2
# CronJobs require v1.21
kubeVersion: ">= 1.21-0"
keywords:
Expand Down
6 changes: 5 additions & 1 deletion charts/jaeger/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,11 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
*/}}
{{- define "elasticsearch.client.url" -}}
{{- $port := .Values.storage.elasticsearch.port | toString -}}
{{- printf "%s://%s:%s" .Values.storage.elasticsearch.scheme .Values.storage.elasticsearch.host $port }}
{{- $host := .Values.storage.elasticsearch.host }}
{{- if .Values.provisionDataStore.elasticsearch }}
{{- $host = printf "%s-elasticsearch" .Release.Name }}
{{- end }}
{{- printf "%s://%s:%s" .Values.storage.elasticsearch.scheme $host $port }}
{{- end -}}

{{- define "jaeger.hotrod.tracing.host" -}}
Expand Down
14 changes: 14 additions & 0 deletions charts/jaeger/templates/collector-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ spec:
{{- toYaml .Values.collector.podLabels | nindent 8 }}
{{- end }}
spec:
{{- if .Values.provisionDataStore.elasticsearch }}
initContainers:
- name: elasticsearch-checker
image: curlimages/curl
command:
- sh
- "-c"
- |
url="{{ include "elasticsearch.client.url" . }}"
until [ "$(curl -s -o /dev/null -w '%{http_code}' "$url/_cluster/health")" = "200" ]; do
echo "Waiting for Elasticsearch at $url"
sleep 5
done
{{- end}}
{{- with .Values.collector.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
Expand Down
21 changes: 18 additions & 3 deletions charts/jaeger/templates/query-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,25 @@ spec:
{{- toYaml .Values.query.podSecurityContext | nindent 8 }}
serviceAccountName: {{ template "jaeger.query.serviceAccountName" . }}
{{- include "query.imagePullSecrets" . | nindent 6 }}
{{- if .Values.query.initContainers }}
{{- if or .Values.query.initContainers .Values.provisionDataStore.elasticsearch }}
initContainers:
{{- toYaml .Values.query.initContainers | nindent 8 }}
{{- end}}
{{- if .Values.query.initContainers }}
{{- toYaml .Values.query.initContainers | nindent 8 }}
{{- end }}
{{- if .Values.provisionDataStore.elasticsearch }}
- name: elasticsearch-checker
image: curlimages/curl
command:
- sh
- "-c"
- |
url="{{ include "elasticsearch.client.url" . }}"
until [ "$(curl -s -o /dev/null -w '%{http_code}' "$url/_cluster/health")" = "200" ]; do
echo "waiting for Elasticsearch at $url"
sleep 5
done
{{- end }}
{{- end }}
containers:
- name: {{ template "jaeger.query.name" . }}
securityContext:
Expand Down

0 comments on commit c766beb

Please sign in to comment.