Skip to content

Commit

Permalink
Metadata: Adding metadata-grpc config map
Browse files Browse the repository at this point in the history
This change adds the necessary config-map related to gRPC MLMD server.

To make the names more clear, this change also modifies the existing
'metadata-configmap' which provides mysql configurations to
'metadata-mysql-configmap'
  • Loading branch information
dushyanthsc committed Dec 12, 2019
1 parent 0548e63 commit a2e4246
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ spec:
- name: MYSQL_DATABASE
valueFrom:
configMapKeyRef:
name: metadata-configmap
name: metadata-mysql-configmap
key: mysql_database
- name: MYSQL_HOST
valueFrom:
configMapKeyRef:
name: metadata-configmap
name: metadata-mysql-configmap
key: mysql_host
- name: MYSQL_PORT
valueFrom:
configMapKeyRef:
name: metadata-configmap
name: metadata-mysql-configmap
key: mysql_port
command: ["/bin/metadata_store_server"]
args: ["--grpc_port=8080",
Expand Down Expand Up @@ -140,3 +140,30 @@ data:
mysql_port: "3306"
username: "root"
password: ""
---
apiVersion: v1
kind: ConfigMap
metadata:
name: metadata-mysql-configmap
labels:
component: metadata-server
data:
{{ if .Values.managedstorage.databaseNamePrefix }}
mysql_database: '{{ .Values.managedstorage.databaseNamePrefix }}_metadata'
{{ else }}
mysql_database: '{{ .Release.Name | replace "-" "_" | replace "." "_"}}_metadata'
{{ end }}
mysql_host: "mysql"
mysql_port: "3306"
username: "root"
password: ""
---
apiVersion: v1
kind: ConfigMap
metadata:
name: metadata-grpc-configmap
labels:
component: metadata-server
data:
METADATA_GRPC_SERVICE_HOST: "metadata-service"
METADATA_GRPC_SERVICE_PORT: "8080"
22 changes: 22 additions & 0 deletions manifests/kustomize/base/metadata/metadata-configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# metadata-config is retained for backward compatibility reasons.
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -8,3 +9,24 @@ data:
mysql_database: "metadb"
mysql_host: "mysql"
mysql_port: "3306"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: metadata-mysql-configmap
labels:
component: metadata-server
data:
mysql_database: "metadb"
mysql_host: "mysql"
mysql_port: "3306"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: metadata-grpc-configmap
labels:
component: metadata-server
data:
METADATA_GRPC_SERVICE_HOST: "metadata-service"
METADATA_GRPC_SERVICE_PORT: "8080"
6 changes: 3 additions & 3 deletions manifests/kustomize/base/metadata/metadata-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ spec:
- name: MYSQL_DATABASE
valueFrom:
configMapKeyRef:
name: metadata-configmap
name: metadata-mysql-configmap
key: mysql_database
- name: MYSQL_HOST
valueFrom:
configMapKeyRef:
name: metadata-configmap
name: metadata-mysql-configmap
key: mysql_host
- name: MYSQL_PORT
valueFrom:
configMapKeyRef:
name: metadata-configmap
name: metadata-mysql-configmap
key: mysql_port
command: ["/bin/metadata_store_server"]
args: ["--grpc_port=8080",
Expand Down

0 comments on commit a2e4246

Please sign in to comment.