161 lines
6.4 KiB
YAML
161 lines
6.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "dynatrace-service.fullname" . }}
|
|
labels:
|
|
{{- include "dynatrace-service.labels" . | nindent 4 }}
|
|
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
{{- include "dynatrace-service.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "dynatrace-service.labels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: dynatrace-service
|
|
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: dynatrace-service
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
{{- if .Values.image }}
|
|
image: {{ .Values.image }} # use image from .Values.image (e.g., when starting via skaffold)
|
|
{{- else }}
|
|
image: "{{ .Values.dynatraceService.image.repository }}:{{ .Values.dynatraceService.image.tag | default .Chart.AppVersion }}"
|
|
{{ end }}
|
|
imagePullPolicy: {{ .Values.dynatraceService.image.pullPolicy }}
|
|
ports:
|
|
- containerPort: 80
|
|
env:
|
|
- name: DATASTORE
|
|
value: ''
|
|
- name: RESOURCE_SERVICE
|
|
value: ''
|
|
- name: SHIPYARD_CONTROLLER
|
|
value: ''
|
|
- name: K8S_DEPLOYMENT_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: 'metadata.labels[''app.kubernetes.io/name'']'
|
|
- name: K8S_DEPLOYMENT_VERSION
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: 'metadata.labels[''app.kubernetes.io/version'']'
|
|
- name: K8S_DEPLOYMENT_COMPONENT
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: 'metadata.labels[''app.kubernetes.io/component'']'
|
|
- name: K8S_NAMESPACE
|
|
{{- if .Values.distributor.metadata.namespace }}
|
|
value: {{ .Values.distributor.metadata.namespace }}
|
|
{{- else }}
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: metadata.namespace
|
|
{{- end }}
|
|
- name: K8S_NODE_NAME
|
|
{{- if .Values.distributor.metadata.hostname }}
|
|
value: {{ .Values.distributor.metadata.hostname }}
|
|
{{- else }}
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: spec.nodeName
|
|
{{- end }}
|
|
- name: K8S_POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: metadata.name
|
|
- name: POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: metadata.namespace
|
|
- name: GENERATE_TAGGING_RULES
|
|
value: '{{ .Values.dynatraceService.config.generateTaggingRules }}'
|
|
- name: GENERATE_PROBLEM_NOTIFICATIONS
|
|
value: '{{ .Values.dynatraceService.config.generateProblemNotifications }}'
|
|
- name: GENERATE_MANAGEMENT_ZONES
|
|
value: '{{ .Values.dynatraceService.config.generateManagementZones }}'
|
|
- name: GENERATE_DASHBOARDS
|
|
value: '{{ .Values.dynatraceService.config.generateDashboards }}'
|
|
- name: GENERATE_METRIC_EVENTS
|
|
value: '{{ .Values.dynatraceService.config.generateMetricEvents }}'
|
|
- name: SYNCHRONIZE_DYNATRACE_SERVICES
|
|
value: '{{ .Values.dynatraceService.config.synchronizeDynatraceServices }}'
|
|
- name: SYNCHRONIZE_DYNATRACE_SERVICES_INTERVAL_SECONDS
|
|
value: '{{ .Values.dynatraceService.config.synchronizeDynatraceServicesIntervalSeconds }}'
|
|
- name: HTTP_SSL_VERIFY
|
|
value: '{{ .Values.dynatraceService.config.httpSSLVerify }}'
|
|
- name: HTTP_PROXY
|
|
value: '{{ .Values.dynatraceService.config.httpProxy }}'
|
|
- name: HTTPS_PROXY
|
|
value: '{{ .Values.dynatraceService.config.httpsProxy }}'
|
|
- name: NO_PROXY
|
|
value: '{{ .Values.dynatraceService.config.noProxy }}'
|
|
- name: LOG_LEVEL_DYNATRACE_SERVICE
|
|
value: '{{ .Values.dynatraceService.config.logLevel }}'
|
|
- name: KEPTN_API_URL
|
|
value: '{{ .Values.dynatraceService.config.keptnApiUrl }}'
|
|
- name: KEPTN_BRIDGE_URL
|
|
value: '{{ .Values.dynatraceService.config.keptnBridgeUrl }}'
|
|
- name: KEPTN_API_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: keptn-api-token
|
|
key: keptn-api-token
|
|
- name: WORK_GRACE_PERIOD_SECONDS
|
|
value: '{{ .Values.workGracePeriodSeconds }}'
|
|
- name: REPLY_GRACE_PERIOD_SECONDS
|
|
value: '{{ .Values.replyGracePeriodSeconds }}'
|
|
- name: SKIP_LOWERCASE_SLI_NAMES
|
|
value: '{{ .Values.dynatraceService.config.skipLowercaseSLINames | default false }}'
|
|
- name: SKIP_INCLUDE_SLO_DISPLAY_NAMES
|
|
value: '{{ .Values.dynatraceService.config.skipIncludeSLODisplayNames | default false }}'
|
|
- name: SKIP_CHECK_DUPLICATE_SLI_AND_DISPLAY_NAMES
|
|
value: '{{ .Values.dynatraceService.config.skipCheckDuplicateSLIAndDisplayNames | default false }}'
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8070
|
|
initialDelaySeconds: 0
|
|
periodSeconds: 5
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /ready
|
|
port: 8080
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|