forked from kubeflow/model-registry
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit removes the need to clone model-registry-operator by crea…
…ting the config files in model-registry
- Loading branch information
1 parent
316bb85
commit 765a07d
Showing
4 changed files
with
155 additions
and
55 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
openshift-ci/resources/model-registry-operator/modelregistry_v1alpha1_modelregistry.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: modelregistry.opendatahub.io/v1alpha1 | ||
kind: ModelRegistry | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: modelregistry | ||
app.kubernetes.io/instance: modelregistry-sample | ||
app.kubernetes.io/part-of: model-registry-operator | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/created-by: model-registry-operator | ||
name: modelregistry-sample | ||
spec: | ||
# TODO(user): Add fields here | ||
grpc: | ||
port: 9090 | ||
rest: | ||
port: 8080 | ||
serviceRoute: enabled | ||
mysql: | ||
host: model-registry-db | ||
database: model_registry | ||
username: mlmduser | ||
passwordSecret: | ||
name: model-registry-db | ||
key: database-password |
126 changes: 126 additions & 0 deletions
126
openshift-ci/resources/model-registry-operator/mysql-db.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,126 @@ | ||
apiVersion: v1 | ||
items: | ||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
template.openshift.io/expose-uri: mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\mysql\)].port} | ||
name: model-registry-db | ||
spec: | ||
ports: | ||
- name: mysql | ||
nodePort: 0 | ||
port: 3306 | ||
protocol: TCP | ||
targetPort: 3306 | ||
selector: | ||
name: model-registry-db | ||
sessionAffinity: None | ||
type: ClusterIP | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: model-registry-db | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 5Gi | ||
- apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
template.alpha.openshift.io/wait-for-ready: "true" | ||
name: model-registry-db | ||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 0 | ||
selector: | ||
matchLabels: | ||
name: model-registry-db | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
annotations: | ||
sidecar.istio.io/inject: "false" | ||
labels: | ||
name: model-registry-db | ||
spec: | ||
containers: | ||
- env: | ||
- name: MYSQL_USER | ||
valueFrom: | ||
secretKeyRef: | ||
key: database-user | ||
name: model-registry-db | ||
- name: MYSQL_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: database-password | ||
name: model-registry-db | ||
- name: MYSQL_ROOT_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: database-password | ||
name: model-registry-db | ||
- name: MYSQL_DATABASE | ||
valueFrom: | ||
secretKeyRef: | ||
key: database-name | ||
name: model-registry-db | ||
args: | ||
- --datadir | ||
- /var/lib/mysql/datadir | ||
- --default-authentication-plugin=mysql_native_password | ||
image: mysql:8.3.0 | ||
imagePullPolicy: IfNotPresent | ||
livenessProbe: | ||
exec: | ||
command: | ||
- /bin/bash | ||
- -c | ||
- mysqladmin -u${MYSQL_USER} -p${MYSQL_ROOT_PASSWORD} ping | ||
initialDelaySeconds: 15 | ||
periodSeconds: 10 | ||
timeoutSeconds: 5 | ||
name: mysql | ||
ports: | ||
- containerPort: 3306 | ||
protocol: TCP | ||
readinessProbe: | ||
exec: | ||
command: | ||
- /bin/bash | ||
- -c | ||
- mysql -D ${MYSQL_DATABASE} -u${MYSQL_USER} -p${MYSQL_ROOT_PASSWORD} -e 'SELECT 1' | ||
initialDelaySeconds: 10 | ||
timeoutSeconds: 5 | ||
securityContext: | ||
capabilities: {} | ||
privileged: false | ||
terminationMessagePath: /dev/termination-log | ||
volumeMounts: | ||
- mountPath: /var/lib/mysql | ||
name: model-registry-db-data | ||
dnsPolicy: ClusterFirst | ||
restartPolicy: Always | ||
volumes: | ||
- name: model-registry-db-data | ||
persistentVolumeClaim: | ||
claimName: model-registry-db | ||
- apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
annotations: | ||
template.openshift.io/expose-database_name: '{.data[''database-name'']}' | ||
template.openshift.io/expose-password: '{.data[''database-password'']}' | ||
template.openshift.io/expose-username: '{.data[''database-user'']}' | ||
name: model-registry-db | ||
stringData: | ||
database-name: "model_registry" | ||
database-password: "TheBlurstOfTimes" | ||
database-user: "mlmduser" | ||
kind: List | ||
metadata: {} |
This file was deleted.
Oops, something went wrong.
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