From 236d5e6271f23a39b3010ed9aa63dd19d541b611 Mon Sep 17 00:00:00 2001 From: shakti-garg-saxo <68685481+shakti-garg-saxo@users.noreply.github.com> Date: Thu, 20 Aug 2020 15:12:22 +0530 Subject: [PATCH] feat(kubernetes): Improve the security of the kubernetes/helm charts (#1782) * 1747 | remove obsolete yaml files * 1747 | remove configmap and its hardcoded references * 1747 | add missing input parameter of neo4j.host * 1747 | remove obsolete secrets and parameterize the rest * 1747 | auto-generate gms secret * 1747 | remove fullName overrides * 1747 | fix parameters in subchart's values.yaml * 1747 | remove hardcoding from parameters for gms host and port * 1747 | upgrade chart version * 1747 | update helm docs * 1747 | add extraEnv, extraVolume and extraMounts * 1747 | Alters pull policy of images to 'always' for ldh Co-authored-by: shakti-garg --- contrib/kubernetes/README.md | 46 +-------- contrib/kubernetes/datahub/Chart.yaml | 10 +- contrib/kubernetes/datahub/README.md | 13 +-- .../charts/datahub-frontend/Chart.yaml | 2 +- .../datahub/charts/datahub-frontend/README.md | 7 +- .../templates/deployment.yaml | 15 ++- .../datahub-frontend/templates/secrets.yaml | 9 -- .../charts/datahub-frontend/values.yaml | 23 ++++- .../datahub/charts/datahub-gms/Chart.yaml | 2 +- .../datahub/charts/datahub-gms/README.md | 29 +++--- .../datahub-gms/templates/configmap.yaml | 16 ---- .../datahub-gms/templates/deployment.yaml | 74 +++++--------- .../charts/datahub-gms/templates/secrets.yaml | 10 +- .../charts/datahub-gms/templates/service.yaml | 4 +- .../datahub/charts/datahub-gms/values.yaml | 34 +++++-- .../charts/datahub-mae-consumer/Chart.yaml | 2 +- .../charts/datahub-mae-consumer/README.md | 14 ++- .../templates/deployment.yaml | 50 ++++------ .../charts/datahub-mae-consumer/values.yaml | 38 +++++++- .../charts/datahub-mce-consumer/Chart.yaml | 2 +- .../charts/datahub-mce-consumer/README.md | 9 +- .../templates/deployment.yaml | 23 +++-- .../charts/datahub-mce-consumer/values.yaml | 27 +++++- contrib/kubernetes/datahub/values.yaml | 13 ++- .../kubernetes/yaml/datahub-configmap.yaml | 18 ---- .../yaml/datahub-frontend-deployment.yaml | 60 ------------ .../yaml/datahub-gms-deployment.yaml | 96 ------------------- .../yaml/datahub-mae-consumer-deployment.yaml | 56 ----------- .../yaml/datahub-mce-consumer-deployment.yaml | 41 -------- contrib/kubernetes/yaml/datahub-secret.yaml | 11 --- 30 files changed, 252 insertions(+), 502 deletions(-) delete mode 100644 contrib/kubernetes/datahub/charts/datahub-frontend/templates/secrets.yaml delete mode 100644 contrib/kubernetes/datahub/charts/datahub-gms/templates/configmap.yaml delete mode 100644 contrib/kubernetes/yaml/datahub-configmap.yaml delete mode 100644 contrib/kubernetes/yaml/datahub-frontend-deployment.yaml delete mode 100644 contrib/kubernetes/yaml/datahub-gms-deployment.yaml delete mode 100644 contrib/kubernetes/yaml/datahub-mae-consumer-deployment.yaml delete mode 100644 contrib/kubernetes/yaml/datahub-mce-consumer-deployment.yaml delete mode 100644 contrib/kubernetes/yaml/datahub-secret.yaml diff --git a/contrib/kubernetes/README.md b/contrib/kubernetes/README.md index dc7c5e08e2772..c3367d6271005 100644 --- a/contrib/kubernetes/README.md +++ b/contrib/kubernetes/README.md @@ -31,48 +31,10 @@ The following table lists the configuration parameters and its default values | Repository | Name | Version | |------------|------|---------| -| file://./charts/datahub-frontend | datahub-frontend | 0.1.0 | -| file://./charts/datahub-gms | datahub-gms | 0.1.0 | -| file://./charts/datahub-mae-consumer | datahub-mae-consumer | 0.1.0 | -| file://./charts/datahub-mce-consumer | datahub-mce-consumer | 0.1.0 | - -#### Chart Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| datahub-frontend.enabled | bool | `true` | | -| datahub-frontend.image.repository | string | `"linkedin/datahub-frontend"` | | -| datahub-frontend.image.tag | string | `"latest"` | | -| datahub-gms.enabled | bool | `true` | | -| datahub-gms.image.repository | string | `"linkedin/datahub-gms"` | | -| datahub-gms.image.tag | string | `"latest"` | | -| datahub-mae-consumer.enabled | bool | `true` | | -| datahub-mae-consumer.image.repository | string | `"linkedin/datahub-mae-consumer"` | | -| datahub-mae-consumer.image.tag | string | `"latest"` | | -| datahub-mce-consumer.enabled | bool | `true` | | -| datahub-mce-consumer.image.repository | string | `"linkedin/datahub-mce-consumer"` | | -| datahub-mce-consumer.image.tag | string | `"latest"` | | -| global.datahub.appVersion | string | `"1.0"` | | -| global.datahub.gms.host | string | `"datahub-gms-deployment"` | | -| global.datahub.gms.port | string | `"8080"` | | -| global.datahub.gms.secret | string | `"YouKnowNothing"` | | -| global.elasticsearch.host | string | `"elasticsearch"` | | -| global.elasticsearch.port | string | `"9200"` | | -| global.hostAliases[0].hostnames[0] | string | `"broker"` | | -| global.hostAliases[0].hostnames[1] | string | `"mysql"` | | -| global.hostAliases[0].hostnames[2] | string | `"elasticsearch"` | | -| 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.schemaregistry.url | string | `"http://schema-registry:8081"` | | -| global.neo4j.password | string | `"datahub"` | | -| global.neo4j.uri | string | `"bolt://neo4j"` | | -| global.neo4j.username | string | `"neo4j"` | | -| global.sql.datasource.driver | string | `"com.mysql.jdbc.Driver"` | | -| global.sql.datasource.host | string | `"mysql"` | | -| global.sql.datasource.password | string | `"datahub"` | | -| global.sql.datasource.url | string | `"jdbc:mysql://mysql:3306/datahub?verifyServerCertificate=false\u0026useSSL=true"` | | -| global.sql.datasource.username | string | `"datahub"` | | +| file://./charts/datahub-frontend | datahub-frontend | 0.2.0 | +| file://./charts/datahub-gms | datahub-gms | 0.2.0 | +| file://./charts/datahub-mae-consumer | datahub-mae-consumer | 0.2.0 | +| file://./charts/datahub-mce-consumer | datahub-mce-consumer | 0.2.0 | ## Install DataHub Navigate to the current directory and run the below command. Update the `datahub/values.yaml` file with valid hostname/IP address configuration for elasticsearch, neo4j, schema-registry, broker & mysql. diff --git a/contrib/kubernetes/datahub/Chart.yaml b/contrib/kubernetes/datahub/Chart.yaml index 1b4a90ef0671a..b61d55a6bc661 100644 --- a/contrib/kubernetes/datahub/Chart.yaml +++ b/contrib/kubernetes/datahub/Chart.yaml @@ -4,24 +4,24 @@ 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.0.1 +version: 0.1.0 # 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 dependencies: - name: datahub-gms - version: 0.1.0 + version: 0.2.0 repository: file://./charts/datahub-gms condition: datahub-gms.enabled - name: datahub-frontend - version: 0.1.0 + version: 0.2.0 repository: file://./charts/datahub-frontend condition: datahub-frontend.enabled - name: datahub-mae-consumer - version: 0.1.0 + version: 0.2.0 repository: file://./charts/datahub-mae-consumer condition: datahub-mae-consumer.enabled - name: datahub-mce-consumer - version: 0.1.0 + version: 0.2.0 repository: file://./charts/datahub-mce-consumer condition: datahub-mce-consumer.enabled \ No newline at end of file diff --git a/contrib/kubernetes/datahub/README.md b/contrib/kubernetes/datahub/README.md index 357b5f9484651..6b7b48b71a41d 100644 --- a/contrib/kubernetes/datahub/README.md +++ b/contrib/kubernetes/datahub/README.md @@ -2,7 +2,7 @@ datahub ======= A Helm chart for LinkedIn DataHub -Current chart version is `0.0.1` +Current chart version is `0.1.0` ## Chart Requirements @@ -13,7 +13,7 @@ Current chart version is `0.0.1` | file://./charts/datahub-mae-consumer | datahub-mae-consumer | 0.1.0 | | file://./charts/datahub-mce-consumer | datahub-mce-consumer | 0.1.0 | -## Chart Values +#### Chart Values | Key | Type | Default | Description | |-----|------|---------|-------------| @@ -30,9 +30,7 @@ Current chart version is `0.0.1` | datahub-mce-consumer.image.repository | string | `"linkedin/datahub-mce-consumer"` | | | datahub-mce-consumer.image.tag | string | `"latest"` | | | global.datahub.appVersion | string | `"1.0"` | | -| global.datahub.gms.host | string | `"datahub-gms-deployment"` | | | global.datahub.gms.port | string | `"8080"` | | -| global.datahub.gms.secret | string | `"YouKnowNothing"` | | | global.elasticsearch.host | string | `"elasticsearch"` | | | global.elasticsearch.port | string | `"9200"` | | | global.hostAliases[0].hostnames[0] | string | `"broker"` | | @@ -42,11 +40,14 @@ Current chart version is `0.0.1` | global.hostAliases[0].ip | string | `"192.168.0.104"` | | | global.kafka.bootstrap.server | string | `"broker:29092"` | | | global.kafka.schemaregistry.url | string | `"http://schema-registry:8081"` | | -| global.neo4j.password | string | `"datahub"` | | +| 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.password | string | `"datahub"` | | | 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"` | | +| global.sql.datasource.password.secretKey | string | `"mysql-password"` | | diff --git a/contrib/kubernetes/datahub/charts/datahub-frontend/Chart.yaml b/contrib/kubernetes/datahub/charts/datahub-frontend/Chart.yaml index 566b37a48dcd4..14e4662394a14 100644 --- a/contrib/kubernetes/datahub/charts/datahub-frontend/Chart.yaml +++ b/contrib/kubernetes/datahub/charts/datahub-frontend/Chart.yaml @@ -14,7 +14,7 @@ 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.0 +version: 0.2.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/contrib/kubernetes/datahub/charts/datahub-frontend/README.md b/contrib/kubernetes/datahub/charts/datahub-frontend/README.md index fa6626a015495..77b076276fc29 100644 --- a/contrib/kubernetes/datahub/charts/datahub-frontend/README.md +++ b/contrib/kubernetes/datahub/charts/datahub-frontend/README.md @@ -2,7 +2,7 @@ datahub-frontend ================ A Helm chart for datahub-frontend -Current chart version is `0.1.0` +Current chart version is `0.2.0` ## Chart Values @@ -10,10 +10,11 @@ Current chart version is `0.1.0` |-----|------|---------|-------------| | affinity | object | `{}` | | | datahub.play.mem.buffer.size | string | `"10MB"` | | +| 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 | "" | +| extraVolumeMounts | Templatable string of additional `volumeMounts` to be passed to the `tpl` function | "" | | fullnameOverride | string | `"datahub-frontend"` | | -| global.datahub.gms.host | string | `"datahub-gms-deployment"` | | | global.datahub.gms.port | string | `"8080"` | | -| global.datahub.gms.secret | string | `"YouKnowNothing"` | | | image.pullPolicy | string | `"IfNotPresent"` | | | image.repository | string | `"linkedin/datahub-frontend"` | | | image.tag | string | `"latest"` | | diff --git a/contrib/kubernetes/datahub/charts/datahub-frontend/templates/deployment.yaml b/contrib/kubernetes/datahub/charts/datahub-frontend/templates/deployment.yaml index b8d999b01c5b7..0439d343ecbcd 100644 --- a/contrib/kubernetes/datahub/charts/datahub-frontend/templates/deployment.yaml +++ b/contrib/kubernetes/datahub/charts/datahub-frontend/templates/deployment.yaml @@ -21,6 +21,10 @@ spec: serviceAccountName: {{ include "datahub-frontend.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + volumes: + {{- if .Values.extraVolumes }} + {{ toYaml .Values.extraVolumes | indent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }} securityContext: @@ -41,18 +45,25 @@ spec: port: http env: - name: DATAHUB_GMS_HOST - value: "{{ .Values.global.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: secretKeyRef: - name: {{ include "datahub-frontend.fullname" . }}-secret + name: {{ printf "%s-gms-secret" .Release.Name }} key: datahub.gms.secret - name: DATAHUB_APP_VERSION value: "{{ .Values.global.datahub.appVersion }}" - name: DATAHUB_PLAY_MEM_BUFFER_SIZE value: "{{ .Values.datahub.play.mem.buffer.size }}" + {{- if .Values.extraEnvs }} + {{ toYaml .Values.extraEnvs | indent 10 }} + {{- end }} + volumeMounts: + {{- if .Values.extraVolumeMounts }} + {{ toYaml .Values.extraVolumeMounts | indent 10 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/contrib/kubernetes/datahub/charts/datahub-frontend/templates/secrets.yaml b/contrib/kubernetes/datahub/charts/datahub-frontend/templates/secrets.yaml deleted file mode 100644 index d7de6bdafab07..0000000000000 --- a/contrib/kubernetes/datahub/charts/datahub-frontend/templates/secrets.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "datahub-frontend.fullname" . }}-secret - labels: - {{- include "datahub-frontend.labels" . | nindent 4 }} -type: Opaque -stringData: - datahub.gms.secret: "{{ .Values.global.datahub.gms.secret }}" \ No newline at end of file diff --git a/contrib/kubernetes/datahub/charts/datahub-frontend/values.yaml b/contrib/kubernetes/datahub/charts/datahub-frontend/values.yaml index 599124a2aea94..b8da886104afb 100644 --- a/contrib/kubernetes/datahub/charts/datahub-frontend/values.yaml +++ b/contrib/kubernetes/datahub/charts/datahub-frontend/values.yaml @@ -7,11 +7,11 @@ replicaCount: 1 image: repository: linkedin/datahub-frontend tag: "latest" - pullPolicy: IfNotPresent + pullPolicy: Always imagePullSecrets: [] nameOverride: "" -fullnameOverride: "datahub-frontend" +fullnameOverride: "" serviceAccount: # Specifies whether a service account should be created @@ -50,6 +50,22 @@ ingress: # hosts: # - chart-example.local +# Extra environment variables +# This will be appended to the current 'env:' key. You can use any of the kubernetes env +# syntax here +extraEnvs: [] + # - name: MY_ENVIRONMENT_VAR + # value: the_value_goes_here + +extraVolumes: [] + # - name: extras + # emptyDir: {} + +extraVolumeMounts: [] + # - name: extras + # mountPath: /usr/share/extras + # readOnly: true + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little @@ -76,6 +92,5 @@ datahub: global: datahub: gms: - host: "datahub-gms-deployment" port: "8080" - secret: "YouKnowNothing" \ No newline at end of file + appVersion: "1.0" \ No newline at end of file diff --git a/contrib/kubernetes/datahub/charts/datahub-gms/Chart.yaml b/contrib/kubernetes/datahub/charts/datahub-gms/Chart.yaml index 35ba4a3d6213e..8cc3139c5dc83 100644 --- a/contrib/kubernetes/datahub/charts/datahub-gms/Chart.yaml +++ b/contrib/kubernetes/datahub/charts/datahub-gms/Chart.yaml @@ -14,7 +14,7 @@ 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.0 +version: 0.2.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/contrib/kubernetes/datahub/charts/datahub-gms/README.md b/contrib/kubernetes/datahub/charts/datahub-gms/README.md index 65ae5ab0a7d6f..ce8465693ca1b 100644 --- a/contrib/kubernetes/datahub/charts/datahub-gms/README.md +++ b/contrib/kubernetes/datahub/charts/datahub-gms/README.md @@ -2,32 +2,39 @@ datahub-gms =========== A Helm chart for LinkedIn DataHub's datahub-gms component -Current chart version is `0.1.0` +Current chart version is `0.2.0` ## Chart Values | Key | Type | Default | Description | |-----|------|---------|-------------| | affinity | object | `{}` | | +| 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 | "" | +| extraVolumeMounts | Templatable string of additional `volumeMounts` to be passed to the `tpl` function | "" | | fullnameOverride | string | `"datahub-gms-deployment"` | | | global.datahub.appVersion | string | `"1.0"` | | -| global.datahub.gms.host | string | `"datahub-gms-service"` | | | global.datahub.gms.port | string | `"8080"` | | -| global.datahub.gms.secret | string | `"YouKnowNothing"` | | -| global.elasticsearch.host | string | `"192.168.0.104"` | | +| global.elasticsearch.host | string | `"elasticsearch"` | | | global.elasticsearch.port | string | `"9200"` | | | global.hostAliases[0].hostnames[0] | string | `"broker"` | | +| global.hostAliases[0].hostnames[1] | string | `"mysql"` | | +| global.hostAliases[0].hostnames[2] | string | `"elasticsearch"` | | +| global.hostAliases[0].hostnames[3] | string | `"neo4j"` | | | global.hostAliases[0].ip | string | `"192.168.0.104"` | | -| global.kafka.bootstrap.server | string | `"192.168.0.104:29092"` | | -| global.kafka.schemaregistry.url | string | `"http://192.168.0.104:8081"` | | -| global.neo4j.password | string | `"datahub"` | | -| global.neo4j.uri | string | `"bolt://192.168.0.104"` | | +| global.kafka.bootstrap.server | string | `"broker:29092"` | | +| 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 | `"192.168.0.104:3306"` | | -| global.sql.datasource.password | string | `"datahub"` | | -| global.sql.datasource.url | string | `"jdbc:mysql://192.168.0.104:3306/datahub?verifyServerCertificate=false\u0026useSSL=true"` | | +| global.sql.datasource.host | 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"` | | +| global.sql.datasource.password.secretKey | string | `"mysql-password"` | | | image.pullPolicy | string | `"IfNotPresent"` | | | image.repository | string | `"linkedin/datahub-gms"` | | | image.tag | string | `"latest"` | | diff --git a/contrib/kubernetes/datahub/charts/datahub-gms/templates/configmap.yaml b/contrib/kubernetes/datahub/charts/datahub-gms/templates/configmap.yaml deleted file mode 100644 index d234940beb380..0000000000000 --- a/contrib/kubernetes/datahub/charts/datahub-gms/templates/configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "datahub-gms.fullname" . }}-configmap - labels: - {{- include "datahub-gms.labels" . | nindent 4 }} -data: - ebean.datasource.host: "{{ .Values.global.sql.datasource.host }}" - ebean.datasource.url: "{{ .Values.global.sql.datasource.url }}" - ebean.datasource.driver: "{{ .Values.global.sql.datasource.driver }}" - kafka.bootstrap.server: "{{ .Values.global.kafka.bootstrap.server }}" - kafka.schemaregistry.url: "{{ .Values.global.kafka.schemaregistry.url }}" - elasticsearch.host: "{{ .Values.global.elasticsearch.host }}" - elasticsearch.port: "{{ .Values.global.elasticsearch.port }}" - neo4j.host: "{{ .Values.global.neo4j.host }}" - neo4j.uri: "{{ .Values.global.neo4j.uri }}" \ No newline at end of file diff --git a/contrib/kubernetes/datahub/charts/datahub-gms/templates/deployment.yaml b/contrib/kubernetes/datahub/charts/datahub-gms/templates/deployment.yaml index 91e1bf6516951..22b78f2a89329 100644 --- a/contrib/kubernetes/datahub/charts/datahub-gms/templates/deployment.yaml +++ b/contrib/kubernetes/datahub/charts/datahub-gms/templates/deployment.yaml @@ -25,6 +25,10 @@ spec: serviceAccountName: {{ include "datahub-gms.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + volumes: + {{- if .Values.extraVolumes }} + {{ toYaml .Values.extraVolumes | indent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }} securityContext: @@ -37,70 +41,44 @@ spec: protocol: TCP env: - name: EBEAN_DATASOURCE_USERNAME - valueFrom: - secretKeyRef: - name: {{ include "datahub-gms.fullname" . }}-secret - key: ebean.datasource.username + value: "{{ .Values.global.sql.datasource.username }}" - name: EBEAN_DATASOURCE_PASSWORD valueFrom: secretKeyRef: - name: {{ include "datahub-gms.fullname" . }}-secret - key: ebean.datasource.password + name: "{{ .Values.global.sql.datasource.password.secretRef }}" + key: "{{ .Values.global.sql.datasource.password.secretKey }}" - name: EBEAN_DATASOURCE_HOST - valueFrom: - configMapKeyRef: - name: {{ include "datahub-gms.fullname" . }}-configmap - key: ebean.datasource.host + value: "{{ .Values.global.sql.datasource.host }}" - name: EBEAN_DATASOURCE_URL - valueFrom: - configMapKeyRef: - name: {{ include "datahub-gms.fullname" . }}-configmap - key: ebean.datasource.url + value: "{{ .Values.global.sql.datasource.url }}" - name: EBEAN_DATASOURCE_DRIVER - valueFrom: - configMapKeyRef: - name: {{ include "datahub-gms.fullname" . }}-configmap - key: ebean.datasource.driver + value: "{{ .Values.global.sql.datasource.driver }}" - name: KAFKA_BOOTSTRAP_SERVER - valueFrom: - configMapKeyRef: - name: {{ include "datahub-gms.fullname" . }}-configmap - key: kafka.bootstrap.server + value: "{{ .Values.global.kafka.bootstrap.server }}" - name: KAFKA_SCHEMAREGISTRY_URL - valueFrom: - configMapKeyRef: - name: {{ include "datahub-gms.fullname" . }}-configmap - key: kafka.schemaregistry.url + value: "{{ .Values.global.kafka.schemaregistry.url }}" - name: ELASTICSEARCH_HOST - valueFrom: - configMapKeyRef: - name: {{ include "datahub-gms.fullname" . }}-configmap - key: elasticsearch.host + value: "{{ .Values.global.elasticsearch.host }}" - name: ELASTICSEARCH_PORT - valueFrom: - configMapKeyRef: - name: {{ include "datahub-gms.fullname" . }}-configmap - key: elasticsearch.port + value: "{{ .Values.global.elasticsearch.port }}" - name: NEO4J_HOST - valueFrom: - configMapKeyRef: - name: {{ include "datahub-gms.fullname" . }}-configmap - key: neo4j.host + value: "{{ .Values.global.neo4j.host }}" - name: NEO4J_URI - valueFrom: - configMapKeyRef: - name: {{ include "datahub-gms.fullname" . }}-configmap - key: neo4j.uri + value: "{{ .Values.global.neo4j.uri }}" - name: NEO4J_USERNAME - valueFrom: - secretKeyRef: - name: {{ include "datahub-gms.fullname" . }}-secret - key: neo4j.username + value: "{{ .Values.global.neo4j.username }}" - name: NEO4J_PASSWORD valueFrom: secretKeyRef: - name: {{ include "datahub-gms.fullname" . }}-secret - key: neo4j.password + name: "{{ .Values.global.neo4j.password.secretRef }}" + key: "{{ .Values.global.neo4j.password.secretKey }}" + {{- if .Values.extraEnvs }} + {{ toYaml .Values.extraEnvs | indent 10 }} + {{- end }} + volumeMounts: + {{- if .Values.extraVolumeMounts }} + {{ toYaml .Values.extraVolumeMounts | indent 10 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/contrib/kubernetes/datahub/charts/datahub-gms/templates/secrets.yaml b/contrib/kubernetes/datahub/charts/datahub-gms/templates/secrets.yaml index 8eb2570445e50..2ee23a7e0e36b 100644 --- a/contrib/kubernetes/datahub/charts/datahub-gms/templates/secrets.yaml +++ b/contrib/kubernetes/datahub/charts/datahub-gms/templates/secrets.yaml @@ -1,13 +1,9 @@ apiVersion: v1 kind: Secret metadata: - name: {{ include "datahub-gms.fullname" . }}-secret + name: {{ printf "%s-gms-secret" .Release.Name }} labels: {{- include "datahub-gms.labels" . | nindent 4 }} type: Opaque -stringData: - datahub.gms.secret: "{{ .Values.global.datahub.gms.secret }}" - ebean.datasource.username: "{{ .Values.global.sql.datasource.username }}" - ebean.datasource.password: "{{ .Values.global.sql.datasource.password }}" - neo4j.username: "{{ .Values.global.neo4j.username }}" - neo4j.password: "{{ .Values.global.neo4j.password }}" \ No newline at end of file +data: + datahub.gms.secret: {{ randAlphaNum 10 | b64enc | quote }} \ No newline at end of file diff --git a/contrib/kubernetes/datahub/charts/datahub-gms/templates/service.yaml b/contrib/kubernetes/datahub/charts/datahub-gms/templates/service.yaml index 882f09c139d11..e9bdd251efb37 100644 --- a/contrib/kubernetes/datahub/charts/datahub-gms/templates/service.yaml +++ b/contrib/kubernetes/datahub/charts/datahub-gms/templates/service.yaml @@ -1,13 +1,13 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "datahub-gms.fullname" . }} + name: {{ printf "%s-%s" .Release.Name "datahub-gms" }} labels: {{- include "datahub-gms.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: - - port: {{ .Values.service.port }} + - port: {{ .Values.global.datahub.gms.port }} targetPort: http protocol: TCP name: http diff --git a/contrib/kubernetes/datahub/charts/datahub-gms/values.yaml b/contrib/kubernetes/datahub/charts/datahub-gms/values.yaml index 54db7ac8f0add..ed7fe09aa7698 100644 --- a/contrib/kubernetes/datahub/charts/datahub-gms/values.yaml +++ b/contrib/kubernetes/datahub/charts/datahub-gms/values.yaml @@ -6,12 +6,12 @@ replicaCount: 1 image: repository: linkedin/datahub-gms - pullPolicy: IfNotPresent + pullPolicy: Always tag: latest imagePullSecrets: [] nameOverride: "" -fullnameOverride: "datahub-gms-deployment" +fullnameOverride: "" serviceAccount: # Specifies whether a service account should be created @@ -35,7 +35,6 @@ securityContext: {} service: type: LoadBalancer #ClusterIP - port: 8080 ingress: enabled: false @@ -50,6 +49,23 @@ ingress: # hosts: # - chart-example.local +# Extra environment variables +# This will be appended to the current 'env:' key. You can use any of the kubernetes env +# syntax here +extraEnvs: [] + # - name: MY_ENVIRONMENT_VAR + # value: the_value_goes_here + +extraVolumes: [] + # - name: extras + # emptyDir: {} + +extraVolumeMounts: [] + # - name: extras + # mountPath: /usr/share/extras + # readOnly: true + + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little @@ -85,21 +101,23 @@ global: host: "neo4j:7474" uri: "bolt://neo4j" username: "neo4j" - password: "datahub" + password: + secretRef: "neo4j-secrets" + secretKey: "neo4j-password" sql: datasource: - host: "mysql" + host: "mysql:3306" url: "jdbc:mysql://mysql:3306/datahub?verifyServerCertificate=false&useSSL=true" driver: "com.mysql.jdbc.Driver" username: "datahub" - password: "datahub" + password: + secretRef: "mysql-secrets" + secretKey: "mysql-password" datahub: gms: - host: "datahub-gms-service" port: "8080" - secret: "YouKnowNothing" appVersion: "1.0" hostAliases: diff --git a/contrib/kubernetes/datahub/charts/datahub-mae-consumer/Chart.yaml b/contrib/kubernetes/datahub/charts/datahub-mae-consumer/Chart.yaml index 73548c247e679..319b8512c8c88 100644 --- a/contrib/kubernetes/datahub/charts/datahub-mae-consumer/Chart.yaml +++ b/contrib/kubernetes/datahub/charts/datahub-mae-consumer/Chart.yaml @@ -14,7 +14,7 @@ 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.0 +version: 0.2.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/contrib/kubernetes/datahub/charts/datahub-mae-consumer/README.md b/contrib/kubernetes/datahub/charts/datahub-mae-consumer/README.md index 7b78d1aa5bd5d..44126cce2266e 100644 --- a/contrib/kubernetes/datahub/charts/datahub-mae-consumer/README.md +++ b/contrib/kubernetes/datahub/charts/datahub-mae-consumer/README.md @@ -2,14 +2,26 @@ datahub-mae-consumer ==================== A Helm chart for datahub-mae-consumer -Current chart version is `0.1.0` +Current chart version is `0.2.0` ## Chart Values | Key | Type | Default | Description | |-----|------|---------|-------------| | affinity | object | `{}` | | +| 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 | "" | +| extraVolumeMounts | Templatable string of additional `volumeMounts` to be passed to the `tpl` function | "" | | fullnameOverride | string | `"datahub-mae-consumer"` | | +| global.elasticsearch.host | string | `"elasticsearch"` | | +| global.elasticsearch.port | string | `"9200"` | | +| global.kafka.bootstrap.server | string | `"broker:29092"` | | +| 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.hostAliases[0].hostnames[0] | string | `"broker"` | | | global.hostAliases[0].hostnames[1] | string | `"mysql"` | | | global.hostAliases[0].hostnames[2] | string | `"elasticsearch"` | | diff --git a/contrib/kubernetes/datahub/charts/datahub-mae-consumer/templates/deployment.yaml b/contrib/kubernetes/datahub/charts/datahub-mae-consumer/templates/deployment.yaml index cc80ae4eee6d4..78b701731b162 100644 --- a/contrib/kubernetes/datahub/charts/datahub-mae-consumer/templates/deployment.yaml +++ b/contrib/kubernetes/datahub/charts/datahub-mae-consumer/templates/deployment.yaml @@ -25,6 +25,10 @@ spec: serviceAccountName: {{ include "datahub-mae-consumer.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + volumes: + {{- if .Values.extraVolumes }} + {{ toYaml .Values.extraVolumes | indent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }} securityContext: @@ -33,45 +37,31 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} env: - name: KAFKA_BOOTSTRAP_SERVER - valueFrom: - configMapKeyRef: - name: datahub-gms-deployment-configmap - key: kafka.bootstrap.server + value: "{{ .Values.global.kafka.bootstrap.server }}" - name: KAFKA_SCHEMAREGISTRY_URL - valueFrom: - configMapKeyRef: - name: datahub-gms-deployment-configmap - key: kafka.schemaregistry.url + value: "{{ .Values.global.kafka.schemaregistry.url }}" - name: ELASTICSEARCH_HOST - valueFrom: - configMapKeyRef: - name: datahub-gms-deployment-configmap - key: elasticsearch.host + value: "{{ .Values.global.elasticsearch.host }}" - name: ELASTICSEARCH_PORT - valueFrom: - configMapKeyRef: - name: datahub-gms-deployment-configmap - key: elasticsearch.port + value: "{{ .Values.global.elasticsearch.port }}" - name: NEO4J_HOST - valueFrom: - configMapKeyRef: - name: datahub-gms-deployment-configmap - key: neo4j.host + value: "{{ .Values.global.neo4j.host }}" - name: NEO4J_URI - valueFrom: - configMapKeyRef: - name: datahub-gms-deployment-configmap - key: neo4j.uri + value: "{{ .Values.global.neo4j.uri }}" - name: NEO4J_USERNAME - valueFrom: - secretKeyRef: - name: datahub-gms-deployment-secret - key: neo4j.username + value: "{{ .Values.global.neo4j.username }}" - name: NEO4J_PASSWORD valueFrom: secretKeyRef: - name: datahub-gms-deployment-secret - key: neo4j.password + name: "{{ .Values.global.neo4j.password.secretRef }}" + key: "{{ .Values.global.neo4j.password.secretKey }}" + {{- if .Values.extraEnvs }} + {{ toYaml .Values.extraEnvs | indent 10 }} + {{- end }} + volumeMounts: + {{- if .Values.extraVolumeMounts }} + {{ toYaml .Values.extraVolumeMounts | indent 10 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/contrib/kubernetes/datahub/charts/datahub-mae-consumer/values.yaml b/contrib/kubernetes/datahub/charts/datahub-mae-consumer/values.yaml index dbc108a3c355e..e5ce7d5e8e6c0 100644 --- a/contrib/kubernetes/datahub/charts/datahub-mae-consumer/values.yaml +++ b/contrib/kubernetes/datahub/charts/datahub-mae-consumer/values.yaml @@ -6,12 +6,12 @@ replicaCount: 1 image: repository: linkedin/datahub-mae-consumer - pullPolicy: IfNotPresent + pullPolicy: Always tag: latest imagePullSecrets: [] nameOverride: "" -fullnameOverride: "datahub-mae-consumer" +fullnameOverride: "" serviceAccount: # Specifies whether a service account should be created @@ -50,6 +50,22 @@ ingress: # hosts: # - chart-example.local +# Extra environment variables +# This will be appended to the current 'env:' key. You can use any of the kubernetes env +# syntax here +extraEnvs: [] + # - name: MY_ENVIRONMENT_VAR + # value: the_value_goes_here + +extraVolumes: [] + # - name: extras + # emptyDir: {} + +extraVolumeMounts: [] + # - name: extras + # mountPath: /usr/share/extras + # readOnly: true + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little @@ -69,6 +85,24 @@ tolerations: [] affinity: {} global: + elasticsearch: + host: "elasticsearch" + port: "9200" + + kafka: + bootstrap: + server: "broker:29092" + schemaregistry: + url: "http://schema-registry:8081" + + neo4j: + host: "neo4j:7474" + uri: "bolt://neo4j" + username: "neo4j" + password: + secretRef: "neo4j-secrets" + secretKey: "neo4j-password" + hostAliases: - ip: "192.168.0.104" hostnames: diff --git a/contrib/kubernetes/datahub/charts/datahub-mce-consumer/Chart.yaml b/contrib/kubernetes/datahub/charts/datahub-mce-consumer/Chart.yaml index 4dbeee6429bf9..9907b4e25f038 100644 --- a/contrib/kubernetes/datahub/charts/datahub-mce-consumer/Chart.yaml +++ b/contrib/kubernetes/datahub/charts/datahub-mce-consumer/Chart.yaml @@ -14,7 +14,7 @@ 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.0 +version: 0.2.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/contrib/kubernetes/datahub/charts/datahub-mce-consumer/README.md b/contrib/kubernetes/datahub/charts/datahub-mce-consumer/README.md index 947b5f6fae274..fecebb51a2129 100644 --- a/contrib/kubernetes/datahub/charts/datahub-mce-consumer/README.md +++ b/contrib/kubernetes/datahub/charts/datahub-mce-consumer/README.md @@ -2,17 +2,20 @@ datahub-mce-consumer ==================== A Helm chart for datahub-mce-consumer -Current chart version is `0.1.0` +Current chart version is `0.2.0` ## Chart Values | Key | Type | Default | Description | |-----|------|---------|-------------| | affinity | object | `{}` | | +| 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 | "" | +| extraVolumeMounts | Templatable string of additional `volumeMounts` to be passed to the `tpl` function | "" | | fullnameOverride | string | `""` | | -| global.datahub.gms.host | string | `"datahub-gms-deployment"` | | +| global.kafka.bootstrap.server | string | `"broker:29092"` | | +| global.kafka.schemaregistry.url | string | `"http://schema-registry:8081"` | | | global.datahub.gms.port | string | `"8080"` | | -| global.datahub.gms.secret | string | `"YouKnowNothing"` | | | global.hostAliases[0].hostnames[0] | string | `"broker"` | | | global.hostAliases[0].hostnames[1] | string | `"mysql"` | | | global.hostAliases[0].hostnames[2] | string | `"elasticsearch"` | | diff --git a/contrib/kubernetes/datahub/charts/datahub-mce-consumer/templates/deployment.yaml b/contrib/kubernetes/datahub/charts/datahub-mce-consumer/templates/deployment.yaml index 910c17f0a8004..66e1a1f0d7b93 100644 --- a/contrib/kubernetes/datahub/charts/datahub-mce-consumer/templates/deployment.yaml +++ b/contrib/kubernetes/datahub/charts/datahub-mce-consumer/templates/deployment.yaml @@ -25,6 +25,10 @@ spec: serviceAccountName: {{ include "datahub-mce-consumer.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + volumes: + {{- if .Values.extraVolumes }} + {{ toYaml .Values.extraVolumes | indent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }} securityContext: @@ -33,19 +37,20 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} env: - name: KAFKA_BOOTSTRAP_SERVER - valueFrom: - configMapKeyRef: - name: datahub-gms-deployment-configmap - key: kafka.bootstrap.server + value: "{{ .Values.global.kafka.bootstrap.server }}" - name: KAFKA_SCHEMAREGISTRY_URL - valueFrom: - configMapKeyRef: - name: datahub-gms-deployment-configmap - key: kafka.schemaregistry.url + value: "{{ .Values.global.kafka.schemaregistry.url }}" - name: GMS_HOST - value: "{{ .Values.global.datahub.gms.host }}" + value: {{ printf "%s-%s" .Release.Name "datahub-gms" }} - name: GMS_PORT value: "{{ .Values.global.datahub.gms.port }}" + {{- if .Values.extraEnvs }} + {{ toYaml .Values.extraEnvs | indent 10 }} + {{- end }} + volumeMounts: + {{- if .Values.extraVolumeMounts }} + {{ toYaml .Values.extraVolumeMounts | indent 10 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/contrib/kubernetes/datahub/charts/datahub-mce-consumer/values.yaml b/contrib/kubernetes/datahub/charts/datahub-mce-consumer/values.yaml index bb5389f95efc9..c404b3e7c697f 100644 --- a/contrib/kubernetes/datahub/charts/datahub-mce-consumer/values.yaml +++ b/contrib/kubernetes/datahub/charts/datahub-mce-consumer/values.yaml @@ -6,7 +6,7 @@ replicaCount: 1 image: repository: linkedin/datahub-mce-consumer - pullPolicy: IfNotPresent + pullPolicy: Always tag: latest imagePullSecrets: [] @@ -50,6 +50,22 @@ ingress: # hosts: # - chart-example.local +# Extra environment variables +# This will be appended to the current 'env:' key. You can use any of the kubernetes env +# syntax here +extraEnvs: [] + # - name: MY_ENVIRONMENT_VAR + # value: the_value_goes_here + +extraVolumes: [] + # - name: extras + # emptyDir: {} + +extraVolumeMounts: [] + # - name: extras + # mountPath: /usr/share/extras + # readOnly: true + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little @@ -69,11 +85,16 @@ tolerations: [] affinity: {} global: + kafka: + bootstrap: + server: "broker:29092" + schemaregistry: + url: "http://schema-registry:8081" + datahub: gms: - host: "datahub-gms-deployment" port: "8080" - secret: "YouKnowNothing" + hostAliases: - ip: "192.168.0.104" hostnames: diff --git a/contrib/kubernetes/datahub/values.yaml b/contrib/kubernetes/datahub/values.yaml index 8e408b730ecae..42974f86942d0 100644 --- a/contrib/kubernetes/datahub/values.yaml +++ b/contrib/kubernetes/datahub/values.yaml @@ -38,23 +38,26 @@ global: url: "http://schema-registry:8081" neo4j: + host: "neo4j:7474" uri: "bolt://neo4j" username: "neo4j" - password: "datahub" + password: + secretRef: "neo4j-secrets" + secretKey: "neo4j-password" sql: datasource: - host: "mysql" + host: "mysql:3306" url: "jdbc:mysql://mysql:3306/datahub?verifyServerCertificate=false&useSSL=true" driver: "com.mysql.jdbc.Driver" username: "datahub" - password: "datahub" + password: + secretRef: "mysql-secrets" + secretKey: "mysql-password" datahub: gms: - host: "datahub-gms-deployment" port: "8080" - secret: "YouKnowNothing" appVersion: "1.0" hostAliases: diff --git a/contrib/kubernetes/yaml/datahub-configmap.yaml b/contrib/kubernetes/yaml/datahub-configmap.yaml deleted file mode 100644 index 2b4900edee694..0000000000000 --- a/contrib/kubernetes/yaml/datahub-configmap.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: datahub-configuration - namespace: default -data: - datahub.app.version: "1.0" - datahub.play.mem.buffer.size: "10MB" - datahub.gms.host: "datahub-gms-service" - datahub.gms.port: "8080" - ebean.datasource.host: "mysql:3306" #Replace with mysql hostname (or Docker hostname if rest of services are started using docker-compose) - ebean.datasource.url: "jdbc:mysql://mysql:3306/datahub?verifyServerCertificate=false&useSSL=true" #Replace with mysql hostname - ebean.datasource.driver: "com.mysql.jdbc.Driver" - kafka.bootstrap.server: "broker:29092" #Replace with kafka broker hostname (or Docker hostname if rest of services are started using docker-compose) - kafka.schemaregistry.url: "http://schema-registry:8081" #Replace with schema-registry hostname (or Docker hostname if rest of services are started using docker-compose) - elasticsearch.host: "elasticsearch" #Replace with elasticsearch hostname (or Docker hostname if rest of services are started using docker-compose) - elasticsearch.port: "9200" - neo4j.uri: "bolt://neo4j" #Replace with neo4j hostname (or Docker hostname if rest of services are started using docker-compose) diff --git a/contrib/kubernetes/yaml/datahub-frontend-deployment.yaml b/contrib/kubernetes/yaml/datahub-frontend-deployment.yaml deleted file mode 100644 index e3df252c5ce71..0000000000000 --- a/contrib/kubernetes/yaml/datahub-frontend-deployment.yaml +++ /dev/null @@ -1,60 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: datahub-frontend-deployment - labels: - app: datahub-frontend -spec: - replicas: 1 - selector: - matchLabels: - app: datahub-frontend - template: - metadata: - labels: - app: datahub-frontend - spec: - containers: - - name: datahub-frontend - image: linkedin/datahub-frontend:latest - ports: - - containerPort: 9001 - env: - - name: DATAHUB_GMS_HOST - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: datahub.gms.host - - name: DATAHUB_GMS_PORT - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: datahub.gms.port - - name: DATAHUB_SECRET - valueFrom: - secretKeyRef: - name: datahub-secret - key: datahub.gms.secret - - name: DATAHUB_APP_VERSION - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: datahub.app.version - - name: DATAHUB_PLAY_MEM_BUFFER_SIZE - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: datahub.play.mem.buffer.size ---- -apiVersion: v1 -kind: Service -metadata: - name: datahub-frontend-service - labels: - app: datahub-frontend -spec: - ports: - - port: 9001 - selector: - app: datahub-frontend - type: LoadBalancer \ No newline at end of file diff --git a/contrib/kubernetes/yaml/datahub-gms-deployment.yaml b/contrib/kubernetes/yaml/datahub-gms-deployment.yaml deleted file mode 100644 index 325eb994ea487..0000000000000 --- a/contrib/kubernetes/yaml/datahub-gms-deployment.yaml +++ /dev/null @@ -1,96 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: datahub-gms-deployment - labels: - app: datahub-gms -spec: - replicas: 1 - selector: - matchLabels: - app: datahub-gms - template: - metadata: - labels: - app: datahub-gms - spec: - containers: - - name: datahub-gms - image: linkedin/datahub-gms:latest - ports: - - containerPort: 8080 - command: ["/bin/sh", "-c" ,"java -jar jetty-runner-9.4.20.v20190813.jar gms.war"] - env: - - name: EBEAN_DATASOURCE_USERNAME - valueFrom: - secretKeyRef: - name: datahub-secret - key: ebean.datasource.username - - name: EBEAN_DATASOURCE_PASSWORD - valueFrom: - secretKeyRef: - name: datahub-secret - key: ebean.datasource.password - - name: EBEAN_DATASOURCE_HOST - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: ebean.datasource.host - - name: EBEAN_DATASOURCE_URL - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: ebean.datasource.url - - name: EBEAN_DATASOURCE_DRIVER - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: ebean.datasource.driver - - name: KAFKA_BOOTSTRAP_SERVER - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: kafka.bootstrap.server - - name: KAFKA_SCHEMAREGISTRY_URL - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: kafka.schemaregistry.url - - name: ELASTICSEARCH_HOST - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: elasticsearch.host - - name: ELASTICSEARCH_PORT - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: elasticsearch.port - - name: NEO4J_URI - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: neo4j.uri - - name: NEO4J_USERNAME - valueFrom: - secretKeyRef: - name: datahub-secret - key: neo4j.username - - name: NEO4J_PASSWORD - valueFrom: - secretKeyRef: - name: datahub-secret - key: neo4j.password ---- -apiVersion: v1 -kind: Service -metadata: - name: datahub-gms-service - labels: - app: datahub-gms -spec: - ports: - - port: 8080 - selector: - app: datahub-gms - type: LoadBalancer \ No newline at end of file diff --git a/contrib/kubernetes/yaml/datahub-mae-consumer-deployment.yaml b/contrib/kubernetes/yaml/datahub-mae-consumer-deployment.yaml deleted file mode 100644 index c07724b83f23b..0000000000000 --- a/contrib/kubernetes/yaml/datahub-mae-consumer-deployment.yaml +++ /dev/null @@ -1,56 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: datahub-mae-consumer-deployment - labels: - app: datahub-mae-consumer -spec: - replicas: 1 - selector: - matchLabels: - app: datahub-mae-consumer - template: - metadata: - labels: - app: datahub-mae-consumer - spec: - containers: - - name: datahub-mae-consumer - image: linkedin/datahub-mae-consumer:latest - command: ["/bin/sh", "-c" ,"./mae-consumer-job/bin/mae-consumer-job"] - env: - - name: KAFKA_BOOTSTRAP_SERVER - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: kafka.bootstrap.server - - name: KAFKA_SCHEMAREGISTRY_URL - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: kafka.schemaregistry.url - - name: ELASTICSEARCH_HOST - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: elasticsearch.host - - name: ELASTICSEARCH_PORT - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: elasticsearch.port - - name: NEO4J_URI - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: neo4j.uri - - name: NEO4J_USERNAME - valueFrom: - secretKeyRef: - name: datahub-secret - key: neo4j.username - - name: NEO4J_PASSWORD - valueFrom: - secretKeyRef: - name: datahub-secret - key: neo4j.password diff --git a/contrib/kubernetes/yaml/datahub-mce-consumer-deployment.yaml b/contrib/kubernetes/yaml/datahub-mce-consumer-deployment.yaml deleted file mode 100644 index 3c0af0f8e632f..0000000000000 --- a/contrib/kubernetes/yaml/datahub-mce-consumer-deployment.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: datahub-mce-consumer-deployment - labels: - app: datahub-mce-consumer -spec: - replicas: 1 - selector: - matchLabels: - app: datahub-mce-consumer - template: - metadata: - labels: - app: datahub-mce-consumer - spec: - containers: - - name: datahub-mce-consumer - image: linkedin/datahub-mce-consumer:latest - command: ["/bin/sh", "-c" ,"./mce-consumer-job/bin/mce-consumer-job"] - env: - - name: KAFKA_BOOTSTRAP_SERVER - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: kafka.bootstrap.server - - name: KAFKA_SCHEMAREGISTRY_URL - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: kafka.schemaregistry.url - - name: DATAHUB_GMS_HOST - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: datahub.gms.host - - name: DATAHUB_GMS_PORT - valueFrom: - configMapKeyRef: - name: datahub-configuration - key: datahub.gms.port \ No newline at end of file diff --git a/contrib/kubernetes/yaml/datahub-secret.yaml b/contrib/kubernetes/yaml/datahub-secret.yaml deleted file mode 100644 index 248fce9c80ac0..0000000000000 --- a/contrib/kubernetes/yaml/datahub-secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: datahub-secret -type: Opaque -stringData: - datahub.gms.secret: "YouKnowNothing" - ebean.datasource.username: "datahub" - ebean.datasource.password: "datahub" - neo4j.username: "neo4j" - neo4j.password: "datahub"