-
Notifications
You must be signed in to change notification settings - Fork 892
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update kubeflow/model-registry manifests from v0.2.0-alpha
Signed-off-by: Ricardo M. Oliveira <[email protected]>
- Loading branch information
Showing
24 changed files
with
488 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- model-registry-configmap.yaml | ||
- model-registry-deployment.yaml | ||
- model-registry-service.yaml | ||
- model-registry-sa.yaml |
11 changes: 11 additions & 0 deletions
11
apps/model-registry/upstream/base/model-registry-configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: model-registry-configmap | ||
labels: | ||
component: model-registry-server | ||
data: | ||
MODEL_REGISTRY_REST_SERVICE_HOST: "model-registry-service" | ||
MODEL_REGISTRY_REST_SERVICE_PORT: "8080" | ||
MODEL_REGISTRY_GRPC_SERVICE_HOST: "model-registry-service" | ||
MODEL_REGISTRY_GRPC_SERVICE_PORT: "9090" |
103 changes: 103 additions & 0 deletions
103
apps/model-registry/upstream/base/model-registry-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: model-registry-deployment | ||
labels: | ||
component: model-registry-server | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
component: model-registry-server | ||
template: | ||
metadata: | ||
labels: | ||
component: model-registry-server | ||
spec: | ||
containers: | ||
- name: rest-container | ||
args: | ||
- --hostname=0.0.0.0 | ||
- --port=8080 | ||
- --mlmd-hostname=localhost | ||
- --mlmd-port=9090 | ||
command: | ||
- /model-registry | ||
- proxy | ||
image: kubeflow/model-registry:latest | ||
# empty placeholder environment for patching | ||
env: [] | ||
ports: | ||
- name: http-api | ||
containerPort: 8080 | ||
livenessProbe: | ||
initialDelaySeconds: 30 | ||
periodSeconds: 5 | ||
tcpSocket: | ||
port: http-api | ||
timeoutSeconds: 2 | ||
readinessProbe: | ||
initialDelaySeconds: 3 | ||
periodSeconds: 5 | ||
tcpSocket: | ||
port: http-api | ||
timeoutSeconds: 2 | ||
- name: grpc-container | ||
# ! Sync to the same MLMD version: | ||
# * backend/metadata_writer/requirements.in and requirements.txt | ||
# * @kubeflow/frontend/src/mlmd/generated | ||
# * .cloudbuild.yaml and .release.cloudbuild.yaml | ||
# * manifests/kustomize/base/metadata/base/model-registry-deployment.yaml | ||
# * test/tag_for_hosted.sh | ||
image: gcr.io/tfx-oss-public/ml_metadata_store_server:1.14.0 | ||
env: | ||
- name: DBCONFIG_USER | ||
valueFrom: | ||
secretKeyRef: | ||
name: mysql-secret | ||
key: username | ||
- name: DBCONFIG_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: mysql-secret | ||
key: password | ||
- name: MYSQL_DATABASE | ||
valueFrom: | ||
configMapKeyRef: | ||
name: pipeline-install-config | ||
key: mlmdDb | ||
- name: MYSQL_HOST | ||
valueFrom: | ||
configMapKeyRef: | ||
name: pipeline-install-config | ||
key: dbHost | ||
- name: MYSQL_PORT | ||
valueFrom: | ||
configMapKeyRef: | ||
name: pipeline-install-config | ||
key: dbPort | ||
command: ["/bin/metadata_store_server"] | ||
args: ["--grpc_port=9090", | ||
"--mysql_config_database=$(MYSQL_DATABASE)", | ||
"--mysql_config_host=$(MYSQL_HOST)", | ||
"--mysql_config_port=$(MYSQL_PORT)", | ||
"--mysql_config_user=$(DBCONFIG_USER)", | ||
"--mysql_config_password=$(DBCONFIG_PASSWORD)", | ||
"--enable_database_upgrade=true" | ||
] | ||
ports: | ||
- name: grpc-api | ||
containerPort: 9090 | ||
livenessProbe: | ||
tcpSocket: | ||
port: grpc-api | ||
initialDelaySeconds: 3 | ||
periodSeconds: 5 | ||
timeoutSeconds: 2 | ||
readinessProbe: | ||
tcpSocket: | ||
port: grpc-api | ||
initialDelaySeconds: 3 | ||
periodSeconds: 5 | ||
timeoutSeconds: 2 | ||
serviceAccountName: model-registry-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: model-registry-server |
17 changes: 17 additions & 0 deletions
17
apps/model-registry/upstream/base/model-registry-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
labels: | ||
app: metadata | ||
name: model-registry-service | ||
spec: | ||
selector: | ||
component: model-registry-server | ||
type: ClusterIP | ||
ports: | ||
- port: 8080 | ||
protocol: TCP | ||
name: http-api | ||
- port: 9090 | ||
protocol: TCP | ||
name: grpc-api |
9 changes: 9 additions & 0 deletions
9
apps/model-registry/upstream/options/istio/destination-rule.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: networking.istio.io/v1alpha3 | ||
kind: DestinationRule | ||
metadata: | ||
name: model-registry-service | ||
spec: | ||
host: model-registry-service.kubeflow.svc.cluster.local | ||
trafficPolicy: | ||
tls: | ||
mode: ISTIO_MUTUAL |
11 changes: 11 additions & 0 deletions
11
apps/model-registry/upstream/options/istio/istio-authorization-policy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: security.istio.io/v1beta1 | ||
kind: AuthorizationPolicy | ||
metadata: | ||
name: model-registry-service | ||
spec: | ||
action: ALLOW | ||
selector: | ||
matchLabels: | ||
component: model-registry-server | ||
rules: | ||
- {} |
8 changes: 8 additions & 0 deletions
8
apps/model-registry/upstream/options/istio/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: kubeflow | ||
|
||
resources: | ||
- istio-authorization-policy.yaml | ||
- destination-rule.yaml | ||
- virtual-service.yaml |
24 changes: 24 additions & 0 deletions
24
apps/model-registry/upstream/options/istio/virtual-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: networking.istio.io/v1alpha3 | ||
kind: VirtualService | ||
metadata: | ||
name: model-registry | ||
spec: | ||
gateways: | ||
- kubeflow-gateway | ||
hosts: | ||
- '*' | ||
tcp: | ||
- match: | ||
- port: 8080 | ||
route: | ||
- destination: | ||
host: model-registry-service.kubeflow.svc.cluster.local | ||
port: | ||
number: 8080 | ||
- match: | ||
- port: 9090 | ||
route: | ||
- destination: | ||
host: model-registry-service.kubeflow.svc.cluster.local | ||
port: | ||
number: 9090 |
38 changes: 38 additions & 0 deletions
38
apps/model-registry/upstream/overlays/db/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: kubeflow | ||
|
||
resources: | ||
- model-registry-db-pvc.yaml | ||
- model-registry-db-deployment.yaml | ||
- model-registry-db-service.yaml | ||
- ../../base | ||
|
||
patchesStrategicMerge: | ||
- patches/model-registry-deployment.yaml | ||
|
||
configMapGenerator: | ||
- envs: | ||
- params.env | ||
name: model-registry-db-parameters | ||
secretGenerator: | ||
- envs: | ||
- secrets.env | ||
name: model-registry-db-secrets | ||
generatorOptions: | ||
disableNameSuffixHash: true | ||
|
||
|
||
images: | ||
- name: mysql | ||
newName: mysql | ||
newTag: 8.0.3 | ||
|
||
vars: | ||
- fieldref: | ||
fieldPath: metadata.name | ||
name: MLMD_DB_HOST | ||
objref: | ||
apiVersion: v1 | ||
kind: Service | ||
name: model-registry-db |
52 changes: 52 additions & 0 deletions
52
apps/model-registry/upstream/overlays/db/model-registry-db-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: model-registry-db | ||
labels: | ||
component: db | ||
spec: | ||
selector: | ||
matchLabels: | ||
component: db | ||
replicas: 1 | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
name: db | ||
labels: | ||
component: db | ||
annotations: | ||
sidecar.istio.io/inject: "false" | ||
spec: | ||
containers: | ||
- name: db-container | ||
image: mysql:8.0.3 | ||
args: | ||
- --datadir | ||
- /var/lib/mysql/datadir | ||
- --default-authentication-plugin=mysql_native_password | ||
envFrom: | ||
- configMapRef: | ||
name: model-registry-db-parameters | ||
- secretRef: | ||
name: model-registry-db-secrets | ||
ports: | ||
- name: dbapi | ||
containerPort: 3306 | ||
readinessProbe: | ||
exec: | ||
command: | ||
- "/bin/bash" | ||
- "-c" | ||
- "mysql -D $$MYSQL_DATABASE -u$$MYSQL_USER_NAME -p$$MYSQL_ROOT_PASSWORD -e 'SELECT 1'" | ||
initialDelaySeconds: 5 | ||
periodSeconds: 2 | ||
timeoutSeconds: 1 | ||
volumeMounts: | ||
- name: metadata-mysql | ||
mountPath: /var/lib/mysql | ||
volumes: | ||
- name: metadata-mysql | ||
persistentVolumeClaim: | ||
claimName: metadata-mysql |
10 changes: 10 additions & 0 deletions
10
apps/model-registry/upstream/overlays/db/model-registry-db-pvc.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: metadata-mysql | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 10Gi |
14 changes: 14 additions & 0 deletions
14
apps/model-registry/upstream/overlays/db/model-registry-db-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: model-registry-db | ||
labels: | ||
component: db | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 3306 | ||
protocol: TCP | ||
name: dbapi | ||
selector: | ||
component: db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
MYSQL_DATABASE=metadb | ||
MYSQL_PORT=3306 | ||
MYSQL_ALLOW_EMPTY_PASSWORD=true |
37 changes: 37 additions & 0 deletions
37
apps/model-registry/upstream/overlays/db/patches/model-registry-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: model-registry-deployment | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: rest-container | ||
# Remove existing environment variables | ||
env: | ||
- $patch: replace | ||
envFrom: | ||
- configMapRef: | ||
name: model-registry-configmap | ||
args: | ||
- --hostname=0.0.0.0 | ||
- --port=$(MODEL_REGISTRY_REST_SERVICE_PORT) | ||
- --mlmd-hostname=localhost | ||
- --mlmd-port=$(MODEL_REGISTRY_GRPC_SERVICE_PORT) | ||
- name: grpc-container | ||
# Remove existing environment variables | ||
env: | ||
- $patch: replace | ||
envFrom: | ||
- configMapRef: | ||
name: model-registry-db-parameters | ||
- secretRef: | ||
name: model-registry-db-secrets | ||
- configMapRef: | ||
name: model-registry-configmap | ||
args: ["--grpc_port=$(MODEL_REGISTRY_GRPC_SERVICE_PORT)", | ||
"--mysql_config_host=$(MLMD_DB_HOST)", | ||
"--mysql_config_database=$(MYSQL_DATABASE)", | ||
"--mysql_config_port=$(MYSQL_PORT)", | ||
"--mysql_config_user=$(MYSQL_USER_NAME)", | ||
"--mysql_config_password=$(MYSQL_ROOT_PASSWORD)"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
MYSQL_USER_NAME=root | ||
MYSQL_ROOT_PASSWORD=test |
Oops, something went wrong.