-
Notifications
You must be signed in to change notification settings - Fork 4
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
Adds extraContainers to integration test elasticsearch #14
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
zipkin: | ||
storage: | ||
type: elasticsearch | ||
elasticsearch: | ||
hosts: http://localhost:9200 | ||
|
||
# extra containers are in the same pod, so accessible by localhost | ||
extraContainers: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reason this works without any other machinery is that zipkin checks its dependencies and doesn't return OK healthcheck until they are ok. Hence, it can resolve this as you'll see in the logs.. then the wget tests are safe to run. pretty handy
|
||
- name: elasticsearch | ||
image: 'ghcr.io/openzipkin/zipkin-elasticsearch8' | ||
ports: | ||
- containerPort: 9200 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,22 +48,32 @@ spec: | |
{{- toYaml .Values.securityContext | nindent 12 }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
env: | ||
{{- if .Values.zipkin.selfTracing.enabled }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. conditionally guarding is less cluttered. you can test like.. $ helm template charts/zipkin --values charts/zipkin/ci/elasticsearch-values.yaml
---
# Source: zipkin/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: release-name-zipkin
namespace: default
labels:
helm.sh/chart: zipkin-0.2.0
app.kubernetes.io/name: zipkin
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "3.0.6"
app.kubernetes.io/managed-by: Helm
---
# Source: zipkin/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: release-name-zipkin
namespace: default
labels:
helm.sh/chart: zipkin-0.2.0
app.kubernetes.io/name: zipkin
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "3.0.6"
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
ports:
- port: 9411
targetPort: 9411
protocol: TCP
name: http-query
selector:
app.kubernetes.io/name: zipkin
app.kubernetes.io/instance: release-name
---
# Source: zipkin/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: release-name-zipkin
namespace: default
labels:
helm.sh/chart: zipkin-0.2.0
app.kubernetes.io/name: zipkin
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "3.0.6"
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: zipkin
app.kubernetes.io/instance: release-name
template:
metadata:
annotations:
sidecar.istio.io/inject: "false"
labels:
app.kubernetes.io/name: zipkin
app.kubernetes.io/instance: release-name
spec:
automountServiceAccountToken: false
serviceAccountName: release-name-zipkin
securityContext:
{}
containers:
- name: zipkin
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
image: "openzipkin/zipkin-slim:3.0.6"
env:
- name: STORAGE_TYPE
value: "elasticsearch"
- name: ES_HOSTS
value: "http://localhost:9200"
imagePullPolicy: IfNotPresent
readinessProbe:
httpGet:
path: /health
port: 9411
initialDelaySeconds: 5
periodSeconds: 5
resources:
limits:
cpu: 500m
memory: 4096Mi
requests:
cpu: 100m
memory: 128Mi
- image: ghcr.io/openzipkin/zipkin-elasticsearch8
name: elasticsearch
ports:
- containerPort: 9200
---
# Source: zipkin/templates/tests/test-connection.yaml
apiVersion: v1
kind: Pod
metadata:
name: "release-name-zipkin-test-connection"
labels:
helm.sh/chart: zipkin-0.2.0
app.kubernetes.io/name: zipkin
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "3.0.6"
app.kubernetes.io/managed-by: Helm
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://release-name-zipkin:9411/api/v2/services' ]
restartPolicy: Never
|
||
- name: SELF_TRACING_ENABLED | ||
value: "{{ .Values.zipkin.selfTracing.enabled }}" | ||
value: "true" | ||
{{- end }} | ||
- name: STORAGE_TYPE | ||
value: "{{ .Values.zipkin.storage.type }}" | ||
{{- if eq .Values.zipkin.storage.type "elasticsearch" }} | ||
{{- with .Values.zipkin.storage.elasticsearch }} | ||
- name: ES_HOSTS | ||
value: "{{ .hosts }}" | ||
value: {{ .hosts | quote }} | ||
{{- if .index }} | ||
- name: ES_INDEX | ||
value: "{{ .index }}" | ||
value: {{ .index | quote }} | ||
{{- end }} | ||
{{- if .username }} | ||
- name: ES_USERNAME | ||
value: "{{ .username }}" | ||
value: {{ .username | quote }} | ||
{{- end }} | ||
{{- if .password }} | ||
- name: ES_PASSWORD | ||
value: "{{ .password }}" | ||
value: {{ .password | quote }} | ||
{{- end }} | ||
{{- if .sslNoVerify }} | ||
- name: ES_SSL_NO_VERIFY | ||
value: "{{ default false .sslNoVerify }}" | ||
value: "true" | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- range $key, $value := .Values.zipkin.extraEnv }} | ||
|
@@ -79,6 +89,7 @@ spec: | |
periodSeconds: 5 | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} | ||
{{- include "zipkin.extraContainers" . | nindent 6 }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really know why entirely, but you can't inline the expression. it causes an obscure key not found. I poked around and found otel did the same thing to dodge this, but there wasn't an explicit comment why. |
||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no good reason for us to have made this mandatory before