Skip to content

Commit

Permalink
Manifests: Rename metadata gRPC server's resources to metadata-grpc-*
Browse files Browse the repository at this point in the history
The metadata service deployed is a gRPC server.

Proper KF installation deploys both an HTTP server, naming the required
resources as 'metadata-deployment' and 'metadata-service', as well as a
gRPC server, naming the corresponding resources
'metadata-grpc-deployment' and 'metadata-grpc-service'.

KFP standalone installation manifests deploy solely the gRPC server, but
use naming identical to the KF's HTTP server one.
Applying them on top of an existing KF cluster breaks Metadata service.

In this PR we change the naming making it not diverge from a proper KF
installation. We also make MetadataWriter aware of that change.

Closes kubeflow#2889.

Signed-off-by: Ilias Katsakioris <[email protected]>
  • Loading branch information
elikatsis committed Feb 13, 2020
1 parent 1a8225f commit 8196e02
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 9 deletions.
6 changes: 4 additions & 2 deletions backend/metadata_writer/src/metadata_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@


def connect_to_mlmd() -> metadata_store.MetadataStore:
metadata_service_host = os.environ.get('METADATA_SERVICE_SERVICE_HOST', 'metadata-service')
metadata_service_port = int(os.environ.get('METADATA_SERVICE_SERVICE_PORT', 8080))
metadata_service_host = os.environ.get(
'METADATA_GRPC_SERVICE_SERVICE_HOST', 'metadata-grpc-service')
metadata_service_port = int(os.environ.get(
'METADATA_GRPC_SERVICE_SERVICE_PORT', 8080))

mlmd_connection_config = metadata_store_pb2.MetadataStoreClientConfig(
host=metadata_service_host,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app: metadata
app.kubernetes.io/name: {{ .Release.Name }}
name: metadata-service
name: metadata-grpc-service
spec:
ports:
- name: md-backendapi
Expand All @@ -20,7 +20,7 @@ metadata:
labels:
component: metadata-server
app.kubernetes.io/name: {{ .Release.Name }}
name: metadata-deployment
name: metadata-grpc-deployment
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -165,7 +165,7 @@ metadata:
labels:
component: metadata-server
data:
METADATA_GRPC_SERVICE_HOST: "metadata-service"
METADATA_GRPC_SERVICE_HOST: "metadata-grpc-service"
METADATA_GRPC_SERVICE_PORT: "8080"
---
apiVersion: apps/v1
Expand Down
18 changes: 18 additions & 0 deletions manifests/kustomize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,24 @@ kubectl kustomize base/crds | kubectl delete -f -
```

## Upgrade
**Note:** Do NOT follow these instructions if you are upgrading KFP in a proper
Kubeflow installation.

If you have already deployed a standalone KFP installation and you want to
upgrade it, make sure the following resources do not exist:
`metadata-deployment`, `metadata-service`.
```
kubectl -n <KFP_NAMESPACE> get deployments | grep metadata-deployment
kubectl -n <KFP_NAMESPACE> get service | grep metadata-service
```

If they exist, you can delete them by running the following commands:
```
kubectl -n <KFP_NAMESPACE> delete deployment metadata-deployment
kubectl -n <KFP_NAMESPACE> delete service metadata-service
```

## Troubleshooting

### Permission error installing Kubeflow Pipelines to a cluster
Expand Down
2 changes: 1 addition & 1 deletion manifests/kustomize/base/metadata/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resources:
- metadata-configmap.yaml
- metadata-mysql-secret.yaml
- metadata-deployment.yaml
- metadata-service.yaml
- metadata-grpc-service.yaml
- metadata-envoy-deployment.yaml
- metadata-envoy-service.yaml
- metadata-writer-deployment.yaml
Expand Down
2 changes: 1 addition & 1 deletion manifests/kustomize/base/metadata/metadata-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ metadata:
labels:
component: metadata-server
data:
METADATA_GRPC_SERVICE_HOST: "metadata-service"
METADATA_GRPC_SERVICE_HOST: "metadata-grpc-service"
METADATA_GRPC_SERVICE_PORT: "8080"
2 changes: 1 addition & 1 deletion manifests/kustomize/base/metadata/metadata-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: metadata-deployment
name: metadata-grpc-deployment
labels:
component: metadata-server
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
metadata:
labels:
app: metadata
name: metadata-service
name: metadata-grpc-service
spec:
selector:
component: metadata-server
Expand Down

0 comments on commit 8196e02

Please sign in to comment.