charts schemas: restructure json files

This commit is contained in:
Gaël Goinvic committed 2024-11-27 18:26:47 +01:00
1 parent 093e05ba72
commit c7fc91bf9b
28 files changed
+76 -80

No files matched your search

@@ -6,7 +6,7 @@
"type": "string"
},
"labels": {
"$ref": "file://./../../matrix-stack/sub_schemas/labels.json"
"$ref": "file://./common/labels.json"
},
"imagePullSecrets": {
"type": "array",
@@ -27,7 +27,7 @@
]
},
"password": {
"$ref": "file://./../../matrix-stack/sub_schemas/credential.json"
"$ref": "file://./common/credential.json"
}
}
}
@@ -23,37 +23,37 @@
"type": "integer"
},
"ess-library": {
"$ref": "file://./../sub_schemas/essLibrary.json"
"$ref": "file://./common/essLibrary.json"
},
"image": {
"$ref": "file://./../sub_schemas/image.json"
"$ref": "file://./common/image.json"
},
"ingress": {
"$ref": "file://./../sub_schemas/ingress.json"
"$ref": "file://./common/ingress.json"
},
"labels": {
"$ref": "file://./../sub_schemas/labels.json"
"$ref": "file://./common/labels.json"
},
"annotations": {
"$ref": "file://./../sub_schemas/workloadAnnotations.json"
"$ref": "file://./common/workloadAnnotations.json"
},
"containersSecurityContext": {
"$ref": "file://./../sub_schemas/containersSecurityContext.json"
"$ref": "file://./common/containersSecurityContext.json"
},
"nodeSelector": {
"$ref": "file://./../sub_schemas/nodeSelector.json"
"$ref": "file://./common/nodeSelector.json"
},
"podSecurityContext": {
"$ref": "file://./../sub_schemas/podSecurityContext.json"
"$ref": "file://./common/podSecurityContext.json"
},
"resources": {
"$ref": "file://./../sub_schemas/resources.json"
"$ref": "file://./common/resources.json"
},
"serviceAccount": {
"$ref": "file://./../sub_schemas/serviceAccount.json"
"$ref": "file://./common/serviceAccount.json"
},
"tolerations": {
"$ref": "file://./../sub_schemas/tolerations.json"
"$ref": "file://./common/tolerations.json"
}
}
}
@@ -11,7 +11,7 @@
"minimum": 1
},
"resources": {
"$ref": "file://./../../matrix-stack/sub_schemas/resources.json"
"$ref": "file://./common/resources.json"
}
},
"type": "object"
@@ -4,7 +4,7 @@
"type": "boolean"
},
"resources": {
"$ref": "file://./../../matrix-stack/sub_schemas/resources.json"
"$ref": "file://./common/resources.json"
}
},
"type": "object"
@@ -7,24 +7,24 @@
"type": "boolean"
},
"postgres": {
"$ref": "file://../sub_schemas/postgres-libpq.json"
"$ref": "file://./common/postgres-libpq.json"
},
"media": {
"type": "object",
"properties": {
"storage": {
"$ref": "file://../sub_schemas/persistentVolumeClaim.json"
"$ref": "file://./common/persistentVolumeClaim.json"
}
}
},
"macaroon": {
"$ref": "file://../sub_schemas/credential.json"
"$ref": "file://./common/credential.json"
},
"registrationSharedSecret": {
"$ref": "file://../sub_schemas/credential.json"
"$ref": "file://./common/credential.json"
},
"signingKey": {
"$ref": "file://../sub_schemas/credential.json"
"$ref": "file://./common/credential.json"
},
"additional": {
"type": "object",
@@ -96,106 +96,106 @@
}
},
"global": {
"$ref": "file://../sub_schemas/global.json"
"$ref": "file://./common/global.json"
},
"ess-library": {
"$ref": "file://../sub_schemas/essLibrary.json"
"$ref": "file://./common/essLibrary.json"
},
"ingress": {
"$ref": "file://./synapse/sub_schemas/ingress_with_additional_paths.json"
"$ref": "file://./synapse/ingress_with_additional_paths.json"
},
"image": {
"$ref": "file://../sub_schemas/image.json"
"$ref": "file://./common/image.json"
},
"labels": {
"$ref": "file://../sub_schemas/labels.json"
"$ref": "file://./common/labels.json"
},
"annotations": {
"$ref": "file://../sub_schemas/workloadAnnotations.json"
"$ref": "file://./common/workloadAnnotations.json"
},
"containersSecurityContext": {
"$ref": "file://../sub_schemas/containersSecurityContext.json"
"$ref": "file://./common/containersSecurityContext.json"
},
"extraEnv": {
"$ref": "file://../sub_schemas/extraEnv.json"
"$ref": "file://./common/extraEnv.json"
},
"hostAliases": {
"$ref": "file://../sub_schemas/hostAliases.json"
"$ref": "file://./common/hostAliases.json"
},
"nodeSelector": {
"$ref": "file://../sub_schemas/nodeSelector.json"
"$ref": "file://./common/nodeSelector.json"
},
"podSecurityContext": {
"$ref": "file://../sub_schemas/podSecurityContext.json"
"$ref": "file://./common/podSecurityContext.json"
},
"resources": {
"$ref": "file://../sub_schemas/resources.json"
"$ref": "file://./common/resources.json"
},
"serviceAccount": {
"$ref": "file://../sub_schemas/serviceAccount.json"
"$ref": "file://./common/serviceAccount.json"
},
"serviceMonitors": {
"$ref": "file://../sub_schemas/serviceMonitors.json"
"$ref": "file://./common/serviceMonitors.json"
},
"tolerations": {
"$ref": "file://../sub_schemas/tolerations.json"
"$ref": "file://./common/tolerations.json"
},
"workers": {
"type": "object",
"properties": {
"appservice": {
"$ref": "file://./synapse/sub_schemas/single_worker.json"
"$ref": "file://./synapse/single_worker.json"
},
"background": {
"$ref": "file://./synapse/sub_schemas/single_worker.json"
"$ref": "file://./synapse/single_worker.json"
},
"client-reader": {
"$ref": "file://./synapse/sub_schemas/scalable_worker.json"
"$ref": "file://./synapse/scalable_worker.json"
},
"encryption": {
"$ref": "file://./synapse/sub_schemas/single_worker.json"
"$ref": "file://./synapse/single_worker.json"
},
"event-creator": {
"$ref": "file://./synapse/sub_schemas/scalable_worker.json"
"$ref": "file://./synapse/scalable_worker.json"
},
"event-persister": {
"$ref": "file://./synapse/sub_schemas/scalable_worker.json"
"$ref": "file://./synapse/scalable_worker.json"
},
"federation-reader": {
"$ref": "file://./synapse/sub_schemas/scalable_worker.json"
"$ref": "file://./synapse/scalable_worker.json"
},
"federation-sender": {
"$ref": "file://./synapse/sub_schemas/scalable_worker.json"
"$ref": "file://./synapse/scalable_worker.json"
},
"initial-synchrotron": {
"$ref": "file://./synapse/sub_schemas/scalable_worker.json"
"$ref": "file://./synapse/scalable_worker.json"
},
"media-repository": {
"$ref": "file://./synapse/sub_schemas/single_worker.json"
"$ref": "file://./synapse/single_worker.json"
},
"presence-writer": {
"$ref": "file://./synapse/sub_schemas/single_worker.json"
"$ref": "file://./synapse/single_worker.json"
},
"pusher": {
"$ref": "file://./synapse/sub_schemas/scalable_worker.json"
"$ref": "file://./synapse/scalable_worker.json"
},
"receipts-account": {
"$ref": "file://./synapse/sub_schemas/single_worker.json"
"$ref": "file://./synapse/single_worker.json"
},
"sliding-sync": {
"$ref": "file://./synapse/sub_schemas/scalable_worker.json"
"$ref": "file://./synapse/scalable_worker.json"
},
"sso-login": {
"$ref": "file://./synapse/sub_schemas/single_worker.json"
"$ref": "file://./synapse/single_worker.json"
},
"synchrotron": {
"$ref": "file://./synapse/sub_schemas/scalable_worker.json"
"$ref": "file://./synapse/scalable_worker.json"
},
"typing-persister": {
"$ref": "file://./synapse/sub_schemas/single_worker.json"
"$ref": "file://./synapse/single_worker.json"
},
"user-dir": {
"$ref": "file://./synapse/sub_schemas/single_worker.json"
"$ref": "file://./synapse/single_worker.json"
}
}
},
@@ -207,34 +207,34 @@
"type": "integer"
},
"image": {
"$ref": "file://../sub_schemas/image.json"
"$ref": "file://./common/image.json"
},
"labels": {
"$ref": "file://../sub_schemas/labels.json"
"$ref": "file://./common/labels.json"
},
"annotations": {
"$ref": "file://../sub_schemas/workloadAnnotations.json"
"$ref": "file://./common/workloadAnnotations.json"
},
"containersSecurityContext": {
"$ref": "file://../sub_schemas/containersSecurityContext.json"
"$ref": "file://./common/containersSecurityContext.json"
},
"nodeSelector": {
"$ref": "file://../sub_schemas/nodeSelector.json"
"$ref": "file://./common/nodeSelector.json"
},
"podSecurityContext": {
"$ref": "file://../sub_schemas/podSecurityContext.json"
"$ref": "file://./common/podSecurityContext.json"
},
"resources": {
"$ref": "file://../sub_schemas/resources.json"
"$ref": "file://./common/resources.json"
},
"serviceAccount": {
"$ref": "file://../sub_schemas/serviceAccount.json"
"$ref": "file://./common/serviceAccount.json"
},
"serviceMonitors": {
"$ref": "file://../sub_schemas/serviceMonitors.json"
"$ref": "file://./common/serviceMonitors.json"
},
"tolerations": {
"$ref": "file://../sub_schemas/tolerations.json"
"$ref": "file://./common/tolerations.json"
}
}
},
@@ -242,31 +242,31 @@
"type": "object",
"properties": {
"image": {
"$ref": "file://../sub_schemas/image.json"
"$ref": "file://./common/image.json"
},
"labels": {
"$ref": "file://../sub_schemas/labels.json"
"$ref": "file://./common/labels.json"
},
"annotations": {
"$ref": "file://../sub_schemas/workloadAnnotations.json"
"$ref": "file://./common/workloadAnnotations.json"
},
"containersSecurityContext": {
"$ref": "file://../sub_schemas/containersSecurityContext.json"
"$ref": "file://./common/containersSecurityContext.json"
},
"nodeSelector": {
"$ref": "file://../sub_schemas/nodeSelector.json"
"$ref": "file://./common/nodeSelector.json"
},
"podSecurityContext": {
"$ref": "file://../sub_schemas/podSecurityContext.json"
"$ref": "file://./common/podSecurityContext.json"
},
"resources": {
"$ref": "file://../sub_schemas/resources.json"
"$ref": "file://./common/resources.json"
},
"serviceAccount": {
"$ref": "file://../sub_schemas/serviceAccount.json"
"$ref": "file://./common/serviceAccount.json"
},
"tolerations": {
"$ref": "file://../sub_schemas/tolerations.json"
"$ref": "file://./common/tolerations.json"
}
}
}
@@ -4,10 +4,10 @@
"type": "object",
"properties": {
"global": {
"$ref": "file://./../../matrix-stack/sub_schemas/global.json"
"$ref": "file://./common/global.json"
},
"ess": {
"$ref": "file://./../../matrix-stack/sub_schemas/ess.json"
"$ref": "file://./common/ess.json"
},
"elementWeb": {
"$ref": "file://./element-web/values.schema.json"
+2 -6
View File
@@ -13,23 +13,19 @@ from jinja2 import Environment, FileSystemLoader, select_autoescape
def find_sub_dirs(root_dir, dir_name):
sub_schemas_dirs = []
for path in Path(root_dir).rglob(dir_name):
for path in Path(root_dir).glob('*'):
if path.is_dir():
sub_schemas_dirs.append(path)
return sub_schemas_dirs
def construct_values_file(source_values_template_path: Path, destination_values_path: Path):
charts_path = Path(__file__).parent.parent / "charts"
shared_sub_schemas_path = "matrix-stack" / charts_path / "sub_schemas"
charts_path = Path(__file__).parent.parent / "charts" / "matrix-stack" / "source"
chart_sub_schemas_path = source_values_template_path.parent / "sub_schemas"
env = Environment(
loader=FileSystemLoader(
[
source_values_template_path.parent,
shared_sub_schemas_path,
chart_sub_schemas_path,
charts_path,
*find_sub_dirs(charts_path, "sub_schemas"),
]