-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(manifests): Move metadata to third-party and add overlay for se…
…parate db (#5345) * manifests: Add overlay for separate db to metadata Signed-off-by: Yannis Zarkadas <[email protected]> * manifests: Refactor kustomizations to use metadata from third-party folder Signed-off-by: Yannis Zarkadas <[email protected]> * manifests: Add platform-agnostic-multi-user-legacy env Signed-off-by: Yannis Zarkadas <[email protected]>
- Loading branch information
1 parent
42630cb
commit d9c0196
Showing
19 changed files
with
168 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
39 changes: 39 additions & 0 deletions
39
manifests/kustomize/base/metadata/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,39 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: kubeflow | ||
|
||
bases: | ||
- ../../base | ||
resources: | ||
- metadata-db-pvc.yaml | ||
- metadata-db-deployment.yaml | ||
- metadata-db-service.yaml | ||
|
||
patchesStrategicMerge: | ||
- patches/metadata-grpc-deployment.yaml | ||
|
||
configMapGenerator: | ||
- name: metadata-db-parameters | ||
envs: | ||
- params.env | ||
secretGenerator: | ||
- name: metadata-db-secrets | ||
envs: | ||
- secrets.env | ||
generatorOptions: | ||
disableNameSuffixHash: true | ||
|
||
|
||
images: | ||
- name: mysql | ||
newName: mysql | ||
newTag: 8.0.3 | ||
|
||
vars: | ||
- name: MLMD_DB_HOST | ||
objref: | ||
kind: Service | ||
name: metadata-db | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: metadata.name |
52 changes: 52 additions & 0 deletions
52
manifests/kustomize/base/metadata/overlays/db/metadata-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: metadata-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 | ||
envFrom: | ||
- configMapRef: | ||
name: metadata-db-parameters | ||
- secretRef: | ||
name: metadata-db-secrets | ||
ports: | ||
- name: dbapi | ||
containerPort: 3306 | ||
readinessProbe: | ||
exec: | ||
command: | ||
- "/bin/bash" | ||
- "-c" | ||
- "mysql -D $$MYSQL_DATABASE -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
manifests/kustomize/base/metadata/overlays/db/metadata-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
manifests/kustomize/base/metadata/overlays/db/metadata-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: metadata-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 |
25 changes: 25 additions & 0 deletions
25
manifests/kustomize/base/metadata/overlays/db/patches/metadata-grpc-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,25 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: metadata-grpc-deployment | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: container | ||
# Remove existing environment variables | ||
env: | ||
- $patch: replace | ||
envFrom: | ||
- configMapRef: | ||
name: metadata-db-parameters | ||
- secretRef: | ||
name: metadata-db-secrets | ||
- configMapRef: | ||
name: metadata-grpc-configmap | ||
args: ["--grpc_port=$(METADATA_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 |
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
19 changes: 19 additions & 0 deletions
19
manifests/kustomize/env/platform-agnostic-multi-user-legacy/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,19 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
bases: | ||
- ../../base/installs/multi-user | ||
- ../../base/metadata/overlays/db | ||
- ../../third-party/argo/installs/cluster | ||
- ../../third-party/mysql | ||
- ../../third-party/minio | ||
|
||
# Identifier for application manager to apply ownerReference. | ||
# The ownerReference ensures the resources get garbage collected | ||
# when application is deleted. | ||
commonLabels: | ||
application-crd-id: kubeflow-pipelines | ||
|
||
# !!! If you want to customize the namespace, | ||
# please also update base/cache-deployer/cluster-scoped/cache-deployer-clusterrolebinding.yaml | ||
namespace: kubeflow |
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