forked from helm/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stable/apm-server] Add support for Service and Deployment (helm#11661)
* [stable/apm-server] Add support for Deployment Signed-off-by: Ali Essam <[email protected]> * [stable/apm-server] Update labels & apiVersion Signed-off-by: Ali Essam <[email protected]> * [stable/apm-server] Bump version to 1.0.0 Signed-off-by: Ali Essam <[email protected]> * feat(probes): add probes to deployment. Set default host as 0.0.0.0 Signed-off-by: Mahdi Dibaiee <[email protected]> * bump version for breaking change Signed-off-by: Paul Czarkowski <[email protected]>
- Loading branch information
1 parent
8ba2187
commit f3550f4
Showing
11 changed files
with
259 additions
and
32 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
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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
To verify that apm-server has started, run: | ||
|
||
kubectl --namespace={{ .Release.Namespace }} get pods -l "app={{ template "apm-server.name" . }},release={{ .Release.Name }}" | ||
kubectl --namespace={{ .Release.Namespace }} get pods -l "app.kubernetes.io/name={{ include "apm-server.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" |
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
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
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
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,105 @@ | ||
{{- if eq .Values.kind "Deployment" }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "apm-server.fullname" . }} | ||
labels: | ||
app.kubernetes.io/name: {{ include "apm-server.name" . }} | ||
helm.sh/chart: {{ include "apm-server.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ include "apm-server.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
minReadySeconds: 10 | ||
strategy: | ||
{{ toYaml .Values.updateStrategy | indent 4 }} | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ include "apm-server.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- range $key, $value := .Values.podLabels }} | ||
{{ $key }}: {{ $value }} | ||
{{- end }} | ||
annotations: | ||
checksum/secret: {{ toYaml .Values.config | sha256sum }} | ||
{{- range $key, $value := .Values.podAnnotations }} | ||
{{ $key }}: {{ $value }} | ||
{{- end }} | ||
spec: | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
args: | ||
- "-e" | ||
{{- if .Values.plugins }} | ||
- "--plugin" | ||
- {{ .Values.plugins | join "," | quote }} | ||
{{- end }} | ||
{{- if .Values.extraArgs }} | ||
{{ toYaml .Values.extraArgs | indent 8 }} | ||
{{- end }} | ||
env: | ||
{{- range $key, $value := .Values.extraVars }} | ||
- name: {{ $key }} | ||
value: {{ $value }} | ||
{{- end }} | ||
ports: | ||
- name: http | ||
containerPort: 8200 | ||
protocol: TCP | ||
livenessProbe: | ||
httpGet: | ||
path: /healthcheck | ||
port: http | ||
initialDelaySeconds: 60 | ||
readinessProbe: | ||
httpGet: | ||
path: /healthcheck | ||
port: http | ||
initialDelaySeconds: 60 | ||
securityContext: | ||
runAsUser: 0 | ||
resources: | ||
{{ toYaml .Values.resources | indent 10 }} | ||
volumeMounts: | ||
- name: apm-server-config | ||
mountPath: /usr/share/apm-server/apm-server.yml | ||
readOnly: true | ||
subPath: apm-server.yml | ||
- name: data | ||
mountPath: /usr/share/apm-server/data | ||
{{- if .Values.extraVolumeMounts }} | ||
{{ toYaml .Values.extraVolumeMounts | indent 8 }} | ||
{{- end }} | ||
volumes: | ||
- name: apm-server-config | ||
secret: | ||
secretName: {{ template "apm-server.fullname" . }} | ||
- name: data | ||
hostPath: | ||
path: /var/lib/apm-server | ||
type: DirectoryOrCreate | ||
{{- if .Values.extraVolumes }} | ||
{{ toYaml .Values.extraVolumes | indent 6 }} | ||
{{- end }} | ||
terminationGracePeriodSeconds: 60 | ||
serviceAccountName: {{ template "apm-server.serviceAccountName" . }} | ||
{{- if .Values.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml .Values.nodeSelector | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.tolerations }} | ||
tolerations: | ||
{{ toYaml .Values.tolerations | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.affinity }} | ||
affinity: | ||
{{ toYaml .Values.affinity | indent 8 }} | ||
{{- 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
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,51 @@ | ||
{{- if .Values.service.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ include "apm-server.name" . }} | ||
helm.sh/chart: {{ include "apm-server.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- range $key, $value := .Values.service.labels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
name: {{ template "apm-server.fullname" . }} | ||
{{- with .Values.service.annotations }} | ||
annotations: | ||
{{- range $key, $value := . }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.service.loadBalancerSourceRanges }} | ||
loadBalancerSourceRanges: | ||
{{- range $cidr := .Values.service.loadBalancerSourceRanges }} | ||
- {{ $cidr }} | ||
{{- end }} | ||
{{- end }} | ||
type: {{ .Values.service.type }} | ||
{{- if and (eq .Values.service.type "ClusterIP") .Values.service.clusterIP }} | ||
clusterIP: {{ .Values.service.clusterIP }} | ||
{{- end }} | ||
ports: | ||
- port: {{ .Values.service.port }} | ||
targetPort: http | ||
protocol: TCP | ||
{{ if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} | ||
nodePort: {{ .Values.service.nodePort }} | ||
{{ end }} | ||
{{- if .Values.service.portName }} | ||
name: {{ .Values.service.portName }} | ||
{{- end }} | ||
{{- if .Values.service.externalIPs }} | ||
externalIPs: | ||
{{ toYaml .Values.service.externalIPs | indent 4 }} | ||
{{- end }} | ||
selector: | ||
app.kubernetes.io/name: {{ include "apm-server.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- if .Values.service.loadBalancerIP }} | ||
loadBalancerIP: {{ .Values.service.loadBalancerIP }} | ||
{{- 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
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