This repository has been archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
974 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tests/ | ||
.pytest_cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
description: Official Elastic helm chart for Elastic APM Server | ||
home: https://github.com/elastic/helm-charts | ||
maintainers: | ||
- email: helm-charts@elastic.co | ||
name: Elastic | ||
name: apm-server | ||
version: 7.5.1 | ||
appVersion: 7.5.1 | ||
sources: | ||
- https://github.com/elastic/apm | ||
icon: https://helm.elastic.co/icons/apm.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../helpers/common.mk |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
default: test | ||
include ../../../helpers/examples.mk | ||
|
||
RELEASE := helm-es-apm-six | ||
|
||
install: | ||
helm upgrade --wait --timeout=600 --install $(RELEASE) --values ./values.yaml ../../ | ||
|
||
restart: | ||
helm upgrade --set terminationGracePeriod=121 --wait --timeout=600 --install $(RELEASE) --values ./values.yaml ../../ | ||
|
||
test: install goss | ||
|
||
purge: | ||
helm del --purge $(RELEASE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
http: | ||
http://localhost:8200?pretty: | ||
status: 200 | ||
timeout: 2000 | ||
body: | ||
- '"version" : "7.5.1"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
imageTag: "6.8.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
default: test | ||
|
||
include ../../../helpers/examples.mk | ||
|
||
RELEASE := helm-apm-server-default | ||
|
||
install: | ||
helm upgrade --wait --timeout=600 --install $(RELEASE) ../../ | ||
|
||
test: install goss | ||
|
||
purge: | ||
helm del --purge $(RELEASE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
http: | ||
http://localhost:8200?pretty: | ||
status: 200 | ||
timeout: 2000 | ||
body: | ||
- '"version" : "7.5.1"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
default: test | ||
|
||
include ../../../helpers/examples.mk | ||
|
||
RELEASE := helm-apm-server-oss | ||
|
||
install: | ||
helm upgrade --wait --timeout=600 --install $(RELEASE) --values values.yaml ../../ | ||
|
||
test: install goss | ||
|
||
purge: | ||
helm del --purge $(RELEASE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
http: | ||
http://localhost:8200?pretty: | ||
status: 200 | ||
timeout: 2000 | ||
body: | ||
- '"version" : "7.5.1"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
image: docker.elastic.co/apm/apm-server-oss:7.5.1 | ||
|
||
apmConfig: | ||
apm-server.yml: | | ||
apm-server: | ||
host: "0.0.0.0:8200" | ||
queue: {} | ||
output.file: | ||
enabled: false | ||
output.elasticsearch: | ||
hosts: ["http://oss-master:9200"] | ||
## If you have security enabled- you'll need to add the credentials | ||
## as environment variables | ||
# username: "${ELASTICSEARCH_USERNAME}" | ||
# password: "${ELASTICSEARCH_PASSWORD}" | ||
## If SSL is enabled | ||
# protocol: https | ||
# ssl.certificate_authorities: | ||
# - /usr/share/apm-server/config/certs/elastic-ca.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
default: test | ||
|
||
include ../../../helpers/examples.mk | ||
|
||
RELEASE := helm-apm-server-security | ||
|
||
install: | ||
helm upgrade --wait --timeout=600 --install $(RELEASE) --values values.yaml ../../ | ||
|
||
test: install goss | ||
|
||
purge: | ||
helm del --purge $(RELEASE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
http: | ||
http://localhost:8200?pretty: | ||
status: 200 | ||
timeout: 2000 | ||
body: | ||
- '"version" : "7.5.1"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
apmConfig: | ||
apm-server.yml: | | ||
apm-server: | ||
host: "0.0.0.0:8200" | ||
queue: {} | ||
output.elasticsearch: | ||
username: '${ELASTICSEARCH_USERNAME}' | ||
password: '${ELASTICSEARCH_PASSWORD}' | ||
protocol: https | ||
hosts: ["security-master:9200"] | ||
ssl.certificate_authorities: | ||
- /usr/share/apm-server/config/certs/elastic-certificate.pem | ||
secretMounts: | ||
- name: elastic-certificate-pem | ||
secretName: elastic-certificate-pem | ||
path: /usr/share/apm-server/config/certs | ||
|
||
extraEnvs: | ||
- name: 'ELASTICSEARCH_USERNAME' | ||
valueFrom: | ||
secretKeyRef: | ||
name: elastic-credentials | ||
key: username | ||
- name: 'ELASTICSEARCH_PASSWORD' | ||
valueFrom: | ||
secretKeyRef: | ||
name: elastic-credentials | ||
key: password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1. Watch all containers come up. | ||
$ kubectl get pods --namespace={{ .Release.Namespace }} -l app={{ template "apm.fullname" . }} -w |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "apm.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
*/}} | ||
{{- define "apm.fullname" }} | ||
{{- $name := default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-"}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return the appropriate apiVersion for ingress. | ||
*/}} | ||
{{- define "apm.ingress.apiVersion" -}} | ||
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} | ||
{{- print "extensions/v1beta1" -}} | ||
{{- else -}} | ||
{{- print "networking.k8s.io/v1beta1" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- define "apm.autoscaling.apiVersion" -}} | ||
{{- if semverCompare "<1.12-0" .Capabilities.KubeVersion.GitVersion -}} | ||
{{- print "autoscaling/v2beta1" -}} | ||
{{- else -}} | ||
{{- print "autoscaling/v2beta2" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{/* | ||
Use the fullname if the serviceAccount value is not set | ||
*/}} | ||
{{- define "apm.serviceAccount" -}} | ||
{{- if .Values.serviceAccount }} | ||
{{- .Values.serviceAccount -}} | ||
{{- else }} | ||
{{- template "apm.fullname" . }} | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- if .Values.managedServiceAccount }} | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ template "apm.serviceAccount" . }}-cluster-role | ||
labels: | ||
app: "{{ template "apm.fullname" . }}" | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- namespaces | ||
- pods | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{- if .Values.managedServiceAccount }} | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ template "apm.serviceAccount" . }}-cluster-role-binding | ||
labels: | ||
app: "{{ template "apm.fullname" . }}" | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
roleRef: | ||
kind: ClusterRole | ||
name: {{ template "apm.serviceAccount" . }}-cluster-role | ||
apiGroup: rbac.authorization.k8s.io | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ template "apm.serviceAccount" . }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if .Values.apmConfig }} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "apm.fullname" . }}-config | ||
labels: | ||
app: "{{ template "apm.fullname" . }}" | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
data: | ||
{{- range $path, $config := .Values.apmConfig }} | ||
{{ $path }}: | | ||
{{ $config | indent 4 -}} | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "apm.fullname" . }} | ||
labels: | ||
app: {{ .Chart.Name }} | ||
release: {{ .Release.Name | quote }} | ||
{{- range $key, $value := .Values.labels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
spec: | ||
replicas: {{ .Values.replicas }} | ||
strategy: | ||
{{ toYaml .Values.updateStrategy | indent 4 }} | ||
selector: | ||
matchLabels: | ||
app: apm-server | ||
release: {{ .Release.Name | quote }} | ||
template: | ||
metadata: | ||
labels: | ||
app: apm-server | ||
release: {{ .Release.Name | quote }} | ||
annotations: | ||
{{- range $key, $value := .Values.podAnnotations }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{/* This forces a restart if the configmap has changed */}} | ||
{{- if .Values.apmConfig }} | ||
configChecksum: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.priorityClassName }} | ||
priorityClassName: {{ .Values.priorityClassName }} | ||
{{- end }} | ||
{{- if .Values.serviceAccount }} | ||
serviceAccountName: {{ .Values.serviceAccount }} | ||
{{- end }} | ||
volumes: | ||
{{- range .Values.secretMounts }} | ||
- name: {{ .name }} | ||
secret: | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- if .Values.apmConfig }} | ||
- name: apm-server-config | ||
configMap: | ||
name: {{ template "apm.fullname" . }}-config | ||
defaultMode: 0600 | ||
{{- end }} | ||
{{- if .Values.extraVolumes }} | ||
{{ toYaml .Values.extraVolumes | indent 8 }} | ||
{{- end }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{ toYaml .Values.imagePullSecrets | indent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: apm-server | ||
image: "{{ .Values.image }}:{{ .Values.imageTag }}" | ||
imagePullPolicy: "{{ .Values.imagePullPolicy }}" | ||
{{- with .Values.extraEnvs }} | ||
env: | ||
{{ toYaml . | nindent 10 }} | ||
{{- end }} | ||
{{- if .Values.podSecurityContext }} | ||
securityContext: | ||
{{ toYaml .Values.podSecurityContext | indent 10 }} | ||
{{- end }} | ||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
initialDelaySeconds: 30 | ||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
initialDelaySeconds: 30 | ||
ports: | ||
- containerPort: {{ .Values.service.port }} | ||
name: http | ||
{{- if .Values.lifecycle }} | ||
lifecycle: | ||
{{ toYaml .Values.lifecycle | indent 10 }} | ||
{{- end }} | ||
resources: | ||
{{ toYaml .Values.resources | indent 10 }} | ||
volumeMounts: | ||
{{- range .Values.secretMounts }} | ||
- name: {{ .name }} | ||
mountPath: {{ .path }} | ||
{{- if .subPath }} | ||
subPath: {{ .subPath }} | ||
{{- end }} | ||
{{- end }} | ||
{{- range $path, $config := .Values.apmConfig }} | ||
- name: apm-server-config | ||
mountPath: /usr/share/apm-server/{{ $path }} | ||
subPath: {{ $path }} | ||
readOnly: true | ||
{{- end -}} | ||
{{- if .Values.extraVolumes }} | ||
{{ toYaml .Values.extraVolumeMounts | indent 10 }} | ||
{{- end }} |
Oops, something went wrong.