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

Fix hostname for Elasticsearch and add CI test #614

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
36f1f3f
correct indentation of imagePullSecrets in indexer and lookback cronj…
coryflucas May 3, 2024
4780e1b
Update Chart.yaml
pavelnikolov May 4, 2024
4269683
Bump chart version
pavelnikolov May 4, 2024
7d84655
quote host name in ingress templates (#572)
coryflucas May 6, 2024
026c454
Fix typo preventing use of global.imageRegistry (#577)
Stevenpc3 May 22, 2024
5cbfc49
upgrade jaeger-operator to latest 1.57 version (#573)
jimmy-ungerman May 23, 2024
7f77941
fix storage val in readme
pavelnikolov May 25, 2024
d2f428b
Add missing quotes in readme
pavelnikolov May 28, 2024
7837343
[jaeger] add new options, improvements into allInOne (#586)
rgaduput Jun 26, 2024
971a196
[jaeger] allInOne add option tolerations (#588)
chenlujjj Jul 11, 2024
6514064
Link to sub-READMEs
yurishkuro Jul 16, 2024
224088b
[jaeger] Add ability to edit port name and target port name in query …
vishukamble Jul 28, 2024
b4eba18
[jaeger-operator] Add ingressclasses to role.yaml so that the CRD has…
shivendoodeshmukh Jul 30, 2024
5bf976f
Fix Update role.yaml to solve issue 581 (#592)
kravciak Aug 7, 2024
86b3c31
[jaeger] Add securityContext for spark cron job (#587)
brainstorm82 Aug 28, 2024
fb7d680
Add cassandra schema job toleration (#598)
pavelnikolov Aug 28, 2024
7110c61
[jaeger] Add securityContext for the oauth sidecar in query-deploy.ya…
elukey Sep 11, 2024
6d51b06
[jaeger] Add missing loadBalancerIp to collector-svc template (#601)
K3ndu Sep 12, 2024
ce10d09
Jaeger allInOne allow different storage types (#603)
rgaduput Sep 20, 2024
e5352db
upgrade jaeger-operator to latest 1.61.0 (#605)
bowdenblair Sep 30, 2024
4dc1c31
added all-in-one deployment and configmap for jaeger-v2
hellspawn679 Oct 1, 2024
f14ffe3
lint fix
hellspawn679 Oct 1, 2024
dfec458
fixed hostname for es provisionDataStore.elasticsearch and added ci t…
hellspawn679 Oct 1, 2024
18b296e
Share setup sub-action in CI (#615)
yurishkuro Oct 31, 2024
1b91023
[jaeger] add new options, improvements into allInOne (#586)
rgaduput Jun 26, 2024
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
51 changes: 51 additions & 0 deletions .github/actions/prepare-k8s/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Prepare K8s for Helm tests
runs:
using: "composite"
steps:
- 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: Create kind cluster
uses: helm/kind-action@v1.9.0

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

- name: Set up cert-manager
shell: bash
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
shell: bash
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
shell: bash
run: |
cmctl check api --wait=5m
74 changes: 46 additions & 28 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ name: Lint and Test Charts
on: pull_request

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

Expand Down Expand Up @@ -39,34 +38,53 @@ jobs:
- 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
test-with-cassandra:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
version: 'v1.28.8'
id: install
fetch-depth: 0

- 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
- uses: ./.github/actions/prepare-k8s

- 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: Run cassandra-chart-testing (install)
run: ct install --config ct.yaml
test-with-allInOne:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: ./.github/actions/prepare-k8s

- name: Check if cert-manager is up
- name: Run allInOne-chart-testing (install)
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
run: |
cmctl check api --wait=5m
ct install --config ct.yaml --helm-extra-set-args "
--set provisionDataStore.cassandra=false
--set storage.type=memory
--set allInOne.enabled=true
--set agent.enabled=false
--set collector.enabled=false
--set query.enabled=false"

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

- name: Run chart-testing (install)
run: ct install --config ct.yaml
- uses: ./.github/actions/prepare-k8s

- name: Run elasticsearch-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"
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ $ helm repo add jaegertracing https://jaegertracing.github.io/helm-charts

You can then run `helm search repo jaegertracing` to see the charts.

See additional documentation:
* [Jaeger chart](./charts/jaeger)
* [Jaeger Operator chart](./charts/jaeger-operator)

## Contributing

We'd love to have you contribute! Please refer to our [contribution guidelines](CONTRIBUTING.md) for details.
Expand Down
2 changes: 2 additions & 0 deletions charts/jaeger-operator/COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ The following table shows the compatibility of `Jaeger Operator helm chart` with

| Chart version | Jaeger Operator | Kubernetes | Strimzi Operator | Cert-Manager |
|---------------------------|-----------------|-----------------|--------------------|--------------|
| 2.57.0 | v1.61.x | v1.19 to v1.29 | v0.32 | v1.6.1+ |
| 2.54.0 | v1.57.x | v1.19 to v1.29 | v0.32 | v1.6.1+ |
| 2.50.0 | v1.52.x | v1.19 to v1.28 | v0.32 | v1.6.1+ |
| 2.49.0 | v1.49.x | v1.19 to v1.28 | v0.32 | v1.6.1+ |
| 2.47.0 | v1.47.x | v1.19 to v1.26 | v0.23 | v1.6.1+ |
Expand Down
4 changes: 2 additions & 2 deletions charts/jaeger-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
description: jaeger-operator Helm chart for Kubernetes
name: jaeger-operator
version: 2.53.0
appVersion: 1.52.0
version: 2.57.0
appVersion: 1.61.0
home: https://www.jaegertracing.io/
icon: https://www.jaegertracing.io/img/jaeger-icon-reverse-color.svg
sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/jaeger-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The following table lists the configurable parameters of the jaeger-operator cha
| `serviceExtraLabels` | Additional labels to jaeger-operator service | `{}` |
| `extraLabels` | Additional labels to jaeger-operator deployment | `{}` |
| `image.repository` | Controller container image repository | `jaegertracing/jaeger-operator` |
| `image.tag` | Controller container image tag | `1.52.0` |
| `image.tag` | Controller container image tag | `1.61.0` |
| `image.pullPolicy` | Controller container image pull policy | `IfNotPresent` |
| `jaeger.create` | Jaeger instance will be created | `false` |
| `jaeger.spec` | Jaeger instance specification | `{}` |
Expand Down
7 changes: 7 additions & 0 deletions charts/jaeger-operator/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,13 @@ rules:
- patch
- update
- watch
- apiGroups:
- networking.k8s.io
resources:
- ingressclasses
verbs:
- list
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
Expand Down
2 changes: 1 addition & 1 deletion charts/jaeger-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

image:
repository: jaegertracing/jaeger-operator
tag: 1.52.0
tag: 1.61.0
pullPolicy: IfNotPresent
imagePullSecrets: []

Expand Down
4 changes: 2 additions & 2 deletions 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.0.4
version: 3.3.2
# CronJobs require v1.21
kubeVersion: ">= 1.21-0"
keywords:
Expand All @@ -12,7 +12,7 @@ keywords:
- tracing
- instrumentation
home: https://jaegertracing.io
icon: https://camo.githubusercontent.com/afa87494e0753b4b1f5719a2f35aa5263859dffb/687474703a2f2f6a61656765722e72656164746865646f63732e696f2f656e2f6c61746573742f696d616765732f6a61656765722d766563746f722e737667
icon: https://www.jaegertracing.io/img/jaeger-icon-reverse-color.svg
sources:
- https://hub.docker.com/u/jaegertracing/
maintainers:
Expand Down
4 changes: 2 additions & 2 deletions charts/jaeger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ provisionDataStore:
allInOne:
enabled: true
storage:
type: none
type: memory
agent:
enabled: false
collector:
Expand Down Expand Up @@ -399,7 +399,7 @@ extraObjects:
- apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ .Release.Name }}-someRoleBinding
name: "{{ .Release.Name }}-someRoleBinding"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
Expand Down
18 changes: 6 additions & 12 deletions 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 }}
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
{{- printf "%s://%s:%s" .Values.storage.elasticsearch.scheme $host $port }}
{{- end -}}

{{- define "jaeger.hotrod.tracing.host" -}}
Expand Down Expand Up @@ -408,16 +412,6 @@ memory related environment variables
{{- end }}
{{- end -}}

{{/*
allInOne currently only supports memory/badger storage type.
*/}}
{{- define "allInOne.storage.type" -}}
{{ $type := .Values.storage.type }}
{{- if or (eq $type "memory") (eq $type "badger") -}}
{{ .Values.storage.type }}
{{- end -}}
{{- end -}}


{{/*
Cassandra, Elasticsearch, or grpc-plugin, badger, memory related environment variables depending on which is used
Expand Down Expand Up @@ -565,7 +559,7 @@ If not tag is provided, it defaults to .Chart.AppVersion.
*/}}
{{- define "renderImage" -}}
{{- $image := merge .imageRoot (dict "tag" .context.Chart.AppVersion) -}}
{{- include "common.images.image" (dict "imageRoot" $image "global" .context.Values.Global) -}}
{{- include "common.images.image" (dict "imageRoot" $image "global" .context.Values.global) -}}
{{- end -}}

{{/*
Expand Down
22 changes: 17 additions & 5 deletions charts/jaeger/templates/allinone-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ spec:
prometheus.io/port: "14269"
prometheus.io/scrape: "true"
spec:
{{- include "allInOne.imagePullSecrets" . | nindent 6 }}
{{- include "allInOne.imagePullSecrets" . | nindent 6 }}
containers:
- env:
{{- if .Values.allInOne.extraEnv }}
{{- toYaml .Values.allInOne.extraEnv | nindent 12 }}
{{- end }}
- name: SPAN_STORAGE_TYPE
value: {{ include "allInOne.storage.type" . | required "Invalid storage type provided. Use either badger or memory for allInOne" }}
value: {{ .Values.storage.type }}
{{- include "storage.env" . | nindent 12 }}
- name: COLLECTOR_ZIPKIN_HOST_PORT
value: :9411
Expand All @@ -52,6 +52,8 @@ spec:
{{- with .Values.allInOne.envFrom }}
envFrom: {{- toYaml . | nindent 12 }}
{{- end }}
securityContext:
{{- toYaml .Values.allInOne.securityContext | nindent 12 }}
image: {{ include "allInOne.image" . }}
imagePullPolicy: {{ .Values.allInOne.image.pullPolicy }}
name: jaeger
Expand Down Expand Up @@ -118,9 +120,7 @@ spec:
readOnly: {{ .readOnly }}
{{- end }}
securityContext:
runAsUser: 10001
runAsGroup: 10001
fsGroup: 10001
{{- toYaml .Values.allInOne.podSecurityContext | nindent 8 }}
serviceAccountName: {{ template "jaeger.fullname" . }}
volumes:
{{- if not .Values.storage.badger.ephemeral }}
Expand All @@ -138,8 +138,20 @@ spec:
secret:
secretName: {{ .secretName }}
{{- end }}
{{- with .Values.allInOne.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.allInOne.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.allInOne.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.allInOne.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end -}}
1 change: 1 addition & 0 deletions charts/jaeger/templates/allinone-sa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.allInOne.serviceAccount.automountServiceAccountToken }}
{{- end -}}
4 changes: 4 additions & 0 deletions charts/jaeger/templates/cassandra-schema-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ spec:
secret:
secretName: {{ .Values.storage.cassandra.tls.secretName }}
{{- end }}
{{- with .Values.schema.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end -}}
{{- end -}}
{{- end -}}
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
2 changes: 1 addition & 1 deletion charts/jaeger/templates/collector-ing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
{{- end }}
rules:
{{- range .Values.collector.ingress.hosts }}
- host: {{ include "jaeger.collector.ingressHost" . }}
- host: {{ include "jaeger.collector.ingressHost" . | quote }}
http:
paths:
- path: {{ $basePath }}
Expand Down
Loading