Skip to content

Commit

Permalink
feat(k8s): Update pods with correct probes and remove unnecessary dep…
Browse files Browse the repository at this point in the history
…endencies (#2362)
  • Loading branch information
Dexter Lee authored Apr 10, 2021
1 parent 6610666 commit f293add
Show file tree
Hide file tree
Showing 20 changed files with 256 additions and 24 deletions.
2 changes: 1 addition & 1 deletion contrib/kubernetes/datahub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Helm chart for LinkedIn DataHub
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.1
version: 0.1.2
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: latest #0.3.1
Expand Down
22 changes: 10 additions & 12 deletions contrib/kubernetes/datahub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@ datahub
=======
A Helm chart for LinkedIn DataHub

Current chart version is `0.1.1`

## Chart Requirements

| Repository | Name | Version |
|------------|------|---------|
| file://./charts/datahub-frontend | datahub-frontend | 0.2.1 |
| file://./charts/datahub-gms | datahub-gms | 0.2.1 |
| file://./charts/datahub-mae-consumer | datahub-mae-consumer | 0.2.1 |
| file://./charts/datahub-mce-consumer | datahub-mce-consumer | 0.2.1 |
| file://./charts/datahub-ingestion-cron | datahub-ingestion-cron | 0.2.1 |
Current chart version is `0.1.2`

#### Chart Values

Expand All @@ -34,6 +24,12 @@ Current chart version is `0.1.1`
| elasticsearchSetupJob.enabled | bool | `true` | |
| elasticsearchSetupJob.image.repository | string | `"linkedin/datahub-elasticsearch-setup"` | |
| elasticsearchSetupJob.image.tag | string | `"latest"` | |
| kafkaSetupJob.enabled | bool | `true` | |
| kafkaSetupJob.image.repository | string | `"linkedin/datahub-kafka-setup"` | |
| kafkaSetupJob.image.tag | string | `"latest"` | |
| mysqlSetupJob.enabled | bool | `false` | |
| mysqlSetupJob.image.repository | string | `""` | |
| mysqlSetupJob.image.tag | string | `""` | |
| global.datahub.appVersion | string | `"1.0"` | |
| global.datahub.gms.port | string | `"8080"` | |
| global.elasticsearch.host | string | `"elasticsearch"` | |
Expand All @@ -44,14 +40,16 @@ Current chart version is `0.1.1`
| global.hostAliases[0].hostnames[3] | string | `"neo4j"` | |
| global.hostAliases[0].ip | string | `"192.168.0.104"` | |
| global.kafka.bootstrap.server | string | `"broker:29092"` | |
| global.kafka.zookeeper.server | string | `"zookeeper:2181"` | |
| global.kafka.schemaregistry.url | string | `"http://schema-registry:8081"` | |
| global.neo4j.host | string | `"neo4j:7474"` | |
| global.neo4j.uri | string | `"bolt://neo4j"` | |
| global.neo4j.username | string | `"neo4j"` | |
| global.neo4j.password.secretRef | string | `"neo4j-secrets"` | |
| global.neo4j.password.secretKey | string | `"neo4j-password"` | |
| global.sql.datasource.driver | string | `"com.mysql.jdbc.Driver"` | |
| global.sql.datasource.host | string | `"mysql"` | |
| global.sql.datasource.host | string | `"mysql:3306"` | |
| global.sql.datasource.hostForMysqlClient | string | `"mysql"` | |
| global.sql.datasource.url | string | `"jdbc:mysql://mysql:3306/datahub?verifyServerCertificate=false\u0026useSSL=true"` | |
| global.sql.datasource.username | string | `"datahub"` | |
| global.sql.datasource.password.secretRef | string | `"mysql-secrets"` | |
Expand Down
8 changes: 8 additions & 0 deletions contrib/kubernetes/datahub/charts/datahub-frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Current chart version is `0.2.0`
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| datahub.play.mem.buffer.size | string | `"10MB"` | |
| existingGmsSecret | object | {} | Reference to GMS secret if already exists |
| exporters.jmx.enabled | boolean | false | |
| extraEnvs | Extra [environment variables][] which will be appended to the `env:` definition for the container | `[]` |
| extraVolumes | Templatable string of additional `volumes` to be passed to the `tpl` function | "" |
Expand All @@ -24,11 +25,18 @@ Current chart version is `0.2.0`
| ingress.enabled | bool | `false` | |
| ingress.hosts[0].host | string | `"chart-example.local"` | |
| ingress.hosts[0].paths | list | `[]` | |
| ingress.hosts[0].redirectPaths | list | `[]` | |
| ingress.tls | list | `[]` | |
| livenessProbe.initialDelaySeconds | int | `60` | |
| livenessProbe.periodSeconds | int | `30` | |
| livenessProbe.failureThreshold | int | `4` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| readinessProbe.initialDelaySeconds | int | `60` | |
| readinessProbe.periodSeconds | int | `30` | |
| readinessProbe.failureThreshold | int | `4` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,26 +46,38 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 9001
containerPort: 9002
protocol: TCP
livenessProbe:
httpGet:
path: /admin
port: http
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
readinessProbe:
httpGet:
path: /admin
port: http
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
env:
- name: DATAHUB_GMS_HOST
value: {{ printf "%s-%s" .Release.Name "datahub-gms" }}
- name: DATAHUB_GMS_PORT
value: "{{ .Values.global.datahub.gms.port }}"
- name: DATAHUB_SECRET
valueFrom:
{{- if .Values.existingGmsSecret }}
secretKeyRef:
name: "{{ .Values.existingGmsSecret.name }}"
key: "{{ .Values.existingGmsSecret.key }}"
{{- else }}
secretKeyRef:
name: {{ printf "%s-gms-secret" .Release.Name }}
key: datahub.gms.secret
{{- end }}
- name: DATAHUB_APP_VERSION
value: "{{ .Values.global.datahub.appVersion }}"
- name: DATAHUB_PLAY_MEM_BUFFER_SIZE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ spec:
- host: {{ .host | quote }}
http:
paths:
{{- range .redirectPaths }}
- path: {{ .path }}
backend:
serviceName: {{ .name }}
servicePort: {{ .port }}
{{- end }}
{{- range .paths }}
- path: {{ . }}
backend:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if not .Values.existingGmsSecret -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-gms-secret" .Release.Name }}
labels:
{{- include "datahub-frontend.labels" . | nindent 4 }}
type: Opaque
data:
datahub.gms.secret: {{ randAlphaNum 10 | b64enc | quote }}
{{- end -}}
13 changes: 12 additions & 1 deletion contrib/kubernetes/datahub/charts/datahub-frontend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ securityContext: {}

service:
type: LoadBalancer
port: 9001
port: 9002

ingress:
enabled: false
Expand All @@ -48,6 +48,7 @@ ingress:
hosts:
- host: chart-example.local
paths: []
redirectPaths: []
tls: []
# - secretName: chart-example-tls
# hosts:
Expand Down Expand Up @@ -135,6 +136,16 @@ exporters:
# scrapeTimeout: 30s
# scheme: http

livenessProbe:
initialDelaySeconds: 60
periodSeconds: 30
failureThreshold: 4

readinessProbe:
initialDelaySeconds: 60
periodSeconds: 30
failureThreshold: 4

datahub:
play:
mem:
Expand Down
6 changes: 6 additions & 0 deletions contrib/kubernetes/datahub/charts/datahub-gms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,16 @@ Current chart version is `0.2.0`
| ingress.hosts[0].host | string | `"chart-example.local"` | |
| ingress.hosts[0].paths | list | `[]` | |
| ingress.tls | list | `[]` | |
| livenessProbe.initialDelaySeconds | int | `60` | |
| livenessProbe.periodSeconds | int | `30` | |
| livenessProbe.failureThreshold | int | `8` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| readinessProbe.initialDelaySeconds | int | `60` | |
| readinessProbe.periodSeconds | int | `30` | |
| readinessProbe.failureThreshold | int | `8` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ spec:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
env:
- name: EBEAN_DATASOURCE_USERNAME
value: "{{ .Values.global.sql.datasource.username }}"
Expand Down

This file was deleted.

10 changes: 10 additions & 0 deletions contrib/kubernetes/datahub/charts/datahub-gms/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ exporters:
# scrapeTimeout: 30s
# scheme: http

livenessProbe:
initialDelaySeconds: 60
periodSeconds: 30
failureThreshold: 8

readinessProbe:
initialDelaySeconds: 60
periodSeconds: 30
failureThreshold: 8

#This section is useful if we are installing this chart separately for testing
# helm install datahub-gms datahub-gms/
global:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,16 @@ Current chart version is `0.2.0`
| ingress.hosts[0].host | string | `"chart-example.local"` | |
| ingress.hosts[0].paths | list | `[]` | |
| ingress.tls | list | `[]` | |
| livenessProbe.initialDelaySeconds | int | `60` | |
| livenessProbe.periodSeconds | int | `30` | |
| livenessProbe.failureThreshold | int | `8` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| readinessProbe.initialDelaySeconds | int | `60` | |
| readinessProbe.periodSeconds | int | `30` | |
| readinessProbe.failureThreshold | int | `8` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
livenessProbe:
httpGet:
path: /actuator/health
port: 9091
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
readinessProbe:
httpGet:
path: /actuator/health
port: 9091
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
env:
- name: KAFKA_BOOTSTRAP_SERVER
value: "{{ .Values.global.kafka.bootstrap.server }}"
Expand Down
10 changes: 10 additions & 0 deletions contrib/kubernetes/datahub/charts/datahub-mae-consumer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@ exporters:
# scrapeTimeout: 30s
# scheme: http

livenessProbe:
initialDelaySeconds: 60
periodSeconds: 30
failureThreshold: 8

readinessProbe:
initialDelaySeconds: 60
periodSeconds: 30
failureThreshold: 8

global:
elasticsearch:
host: "elasticsearch"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@ Current chart version is `0.2.0`
| ingress.hosts[0].host | string | `"chart-example.local"` | |
| ingress.hosts[0].paths | list | `[]` | |
| ingress.tls | list | `[]` | |
| livenessProbe.initialDelaySeconds | int | `60` | |
| livenessProbe.periodSeconds | int | `30` | |
| livenessProbe.failureThreshold | int | `4` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| readinessProbe.initialDelaySeconds | int | `60` | |
| readinessProbe.periodSeconds | int | `30` | |
| readinessProbe.failureThreshold | int | `4` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
livenessProbe:
httpGet:
path: /actuator/health
port: 9090
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
readinessProbe:
httpGet:
path: /actuator/health
port: 9090
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
env:
- name: KAFKA_BOOTSTRAP_SERVER
value: "{{ .Values.global.kafka.bootstrap.server }}"
Expand Down
10 changes: 10 additions & 0 deletions contrib/kubernetes/datahub/charts/datahub-mce-consumer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@ exporters:
# scrapeTimeout: 30s
# scheme: http

livenessProbe:
initialDelaySeconds: 60
periodSeconds: 30
failureThreshold: 4

readinessProbe:
initialDelaySeconds: 60
periodSeconds: 30
failureThreshold: 4

global:
kafka:
bootstrap:
Expand Down
Loading

0 comments on commit f293add

Please sign in to comment.