diff --git a/Cargo.lock b/Cargo.lock index 8f3be47..2cf6f5c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -965,7 +965,7 @@ dependencies = [ [[package]] name = "dmtri" version = "0.1.0" -source = "git+https://github.com/demeter-run/specs.git#25e4853c635e1fab25305543e59a280fd8742ab6" +source = "git+https://github.com/demeter-run/specs.git#5c513a5faf70119bf2f437a28c0a9bbf3c20f8a9" dependencies = [ "bytes", "pbjson", diff --git a/bootstrap/rpc/crds/blockfrostport.json b/bootstrap/rpc/crds/blockfrostport.json index 6a81a88..ab29d9b 100644 --- a/bootstrap/rpc/crds/blockfrostport.json +++ b/bootstrap/rpc/crds/blockfrostport.json @@ -1,118 +1,157 @@ { - "apiVersion": "apiextensions.k8s.io/v1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "blockfrostports.demeter.run" - }, - "spec": { - "group": "demeter.run", - "names": { - "categories": [ - "demeter-port" - ], - "kind": "BlockfrostPort", - "plural": "blockfrostports", - "shortNames": [ - "bfpts" - ], - "singular": "blockfrostport" + "options": [ + { + "description": "mainnet", + "spec": { + "network": "mainnet", + "throughputTier": "0" + } }, - "scope": "Namespaced", - "versions": [ - { - "additionalPrinterColumns": [ - { - "jsonPath": ".spec.network", - "name": "Network", - "type": "string" - }, - { - "jsonPath": ".spec.throughputTier", - "name": "Throughput Tier", - "type": "string" - }, - { - "jsonPath": ".status.endpointUrl", - "name": "Endpoint URL", - "type": "string" - }, - { - "jsonPath": ".status.authenticatedEndpointUrl", - "name": "Authenticated Endpoint URL", - "type": "string" - }, - { - "jsonPath": ".status.authToken", - "name": "Auth Token", - "type": "string" - } + { + "description": "preprod", + "spec": { + "network": "preprod", + "throughputTier": "0" + } + }, + { + "description": "preview", + "spec": { + "network": "preview", + "throughputTier": "0" + } + }, + { + "description": "vector-testnet", + "spec": { + "network": "vector-testnet", + "throughputTier": "0" + } + }, + { + "description": "prime-testnet", + "spec": { + "network": "prime-testnet", + "throughputTier": "0" + } + } + ], + "crd": { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "CustomResourceDefinition", + "metadata": { + "name": "blockfrostports.demeter.run" + }, + "spec": { + "group": "demeter.run", + "names": { + "categories": [ + "demeter-port" ], - "name": "v1alpha1", - "schema": { - "openAPIV3Schema": { - "description": "Auto-generated derived type for BlockfrostPortSpec via `CustomResource`", - "properties": { - "spec": { - "properties": { - "authToken": { - "nullable": true, - "type": "string" - }, - "blockfrostVersion": { - "nullable": true, - "type": "string" - }, - "network": { - "type": "string" - }, - "operatorVersion": { - "type": "string" + "kind": "BlockfrostPort", + "plural": "blockfrostports", + "shortNames": [ + "bfpts" + ], + "singular": "blockfrostport" + }, + "scope": "Namespaced", + "versions": [ + { + "additionalPrinterColumns": [ + { + "jsonPath": ".spec.network", + "name": "Network", + "type": "string" + }, + { + "jsonPath": ".spec.throughputTier", + "name": "Throughput Tier", + "type": "string" + }, + { + "jsonPath": ".status.endpointUrl", + "name": "Endpoint URL", + "type": "string" + }, + { + "jsonPath": ".status.authenticatedEndpointUrl", + "name": "Authenticated Endpoint URL", + "type": "string" + }, + { + "jsonPath": ".status.authToken", + "name": "Auth Token", + "type": "string" + } + ], + "name": "v1alpha1", + "schema": { + "openAPIV3Schema": { + "description": "Auto-generated derived type for BlockfrostPortSpec via `CustomResource`", + "properties": { + "spec": { + "properties": { + "authToken": { + "nullable": true, + "type": "string" + }, + "blockfrostVersion": { + "nullable": true, + "type": "string" + }, + "network": { + "type": "string" + }, + "operatorVersion": { + "type": "string" + }, + "throughputTier": { + "type": "string" + } }, - "throughputTier": { - "type": "string" - } + "required": [ + "network", + "operatorVersion", + "throughputTier" + ], + "type": "object" }, - "required": [ - "network", - "operatorVersion", - "throughputTier" - ], - "type": "object" - }, - "status": { - "nullable": true, - "properties": { - "authToken": { - "type": "string" - }, - "authenticatedEndpointUrl": { - "nullable": true, - "type": "string" + "status": { + "nullable": true, + "properties": { + "authToken": { + "type": "string" + }, + "authenticatedEndpointUrl": { + "nullable": true, + "type": "string" + }, + "endpointUrl": { + "type": "string" + } }, - "endpointUrl": { - "type": "string" - } - }, - "required": [ - "authToken", - "endpointUrl" - ], - "type": "object" - } - }, - "required": [ - "spec" - ], - "title": "BlockfrostPort", - "type": "object" + "required": [ + "authToken", + "endpointUrl" + ], + "type": "object" + } + }, + "required": [ + "spec" + ], + "title": "BlockfrostPort", + "type": "object" + } + }, + "served": true, + "storage": true, + "subresources": { + "status": {} } - }, - "served": true, - "storage": true, - "subresources": { - "status": {} } - } - ] + ] + } } -} \ No newline at end of file +} diff --git a/bootstrap/rpc/crds/cardanonodeport.json b/bootstrap/rpc/crds/cardanonodeport.json index 1674252..a69b42f 100644 --- a/bootstrap/rpc/crds/cardanonodeport.json +++ b/bootstrap/rpc/crds/cardanonodeport.json @@ -1,110 +1,154 @@ { - "apiVersion": "apiextensions.k8s.io/v1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "cardanonodeports.demeter.run" - }, - "spec": { - "group": "demeter.run", - "names": { - "categories": [ - "demeter-port" - ], - "kind": "CardanoNodePort", - "plural": "cardanonodeports", - "shortNames": [ - "cnpts" - ], - "singular": "cardanonodeport" + "options": [ + { + "description": "mainnet - stable (9.1.1)", + "spec": { + "network": "mainnet", + "version": "stable", + "throughputTier": "0" + } }, - "scope": "Namespaced", - "versions": [ - { - "additionalPrinterColumns": [ - { - "jsonPath": ".spec.network", - "name": "Network", - "type": "string" - }, - { - "jsonPath": ".spec.version", - "name": "Version", - "type": "string" - }, - { - "jsonPath": ".spec.throughputTier", - "name": "Throughput Tier", - "type": "string" - }, - { - "jsonPath": ".status.authenticatedEndpointUrl", - "name": "Authenticated Endpoint URL", - "type": "string" - }, - { - "jsonPath": ".status.authToken", - "name": "Auth Token", - "type": "string" - } + { + "description": "preprod - stable (9.1.1)", + "spec": { + "network": "preprod", + "version": "stable", + "throughputTier": "0" + } + }, + { + "description": "preview - stable (9.1.1)", + "spec": { + "network": "preview", + "version": "stable", + "throughputTier": "0" + } + }, + { + "description": "vector-testnet - stable (8.7.3)", + "spec": { + "network": "vector-testnet", + "version": "stable", + "throughputTier": "0" + } + }, + { + "description": "prime-testnet - stable (8.7.3)", + "spec": { + "network": "prime-testnet", + "version": "stable", + "throughputTier": "0" + } + } + ], + "crd": { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "CustomResourceDefinition", + "metadata": { + "name": "cardanonodeports.demeter.run" + }, + "spec": { + "group": "demeter.run", + "names": { + "categories": [ + "demeter-port" ], - "name": "v1alpha1", - "schema": { - "openAPIV3Schema": { - "description": "Auto-generated derived type for CardanoNodePortSpec via `CustomResource`", - "properties": { - "spec": { - "properties": { - "authToken": { - "nullable": true, - "type": "string" - }, - "network": { - "type": "string" - }, - "throughputTier": { - "type": "string" + "kind": "CardanoNodePort", + "plural": "cardanonodeports", + "shortNames": [ + "cnpts" + ], + "singular": "cardanonodeport" + }, + "scope": "Namespaced", + "versions": [ + { + "additionalPrinterColumns": [ + { + "jsonPath": ".spec.network", + "name": "Network", + "type": "string" + }, + { + "jsonPath": ".spec.version", + "name": "Version", + "type": "string" + }, + { + "jsonPath": ".spec.throughputTier", + "name": "Throughput Tier", + "type": "string" + }, + { + "jsonPath": ".status.authenticatedEndpointUrl", + "name": "Authenticated Endpoint URL", + "type": "string" + }, + { + "jsonPath": ".status.authToken", + "name": "Auth Token", + "type": "string" + } + ], + "name": "v1alpha1", + "schema": { + "openAPIV3Schema": { + "description": "Auto-generated derived type for CardanoNodePortSpec via `CustomResource`", + "properties": { + "spec": { + "properties": { + "authToken": { + "nullable": true, + "type": "string" + }, + "network": { + "type": "string" + }, + "throughputTier": { + "type": "string" + }, + "version": { + "type": "string" + } }, - "version": { - "type": "string" - } + "required": [ + "network", + "throughputTier", + "version" + ], + "type": "object" }, - "required": [ - "network", - "throughputTier", - "version" - ], - "type": "object" - }, - "status": { - "nullable": true, - "properties": { - "authToken": { - "type": "string" + "status": { + "nullable": true, + "properties": { + "authToken": { + "type": "string" + }, + "authenticatedEndpointUrl": { + "type": "string" + } }, - "authenticatedEndpointUrl": { - "type": "string" - } - }, - "required": [ - "authToken", - "authenticatedEndpointUrl" - ], - "type": "object" - } - }, - "required": [ - "spec" - ], - "title": "CardanoNodePort", - "type": "object" + "required": [ + "authToken", + "authenticatedEndpointUrl" + ], + "type": "object" + } + }, + "required": [ + "spec" + ], + "title": "CardanoNodePort", + "type": "object" + } + }, + "served": true, + "storage": true, + "subresources": { + "status": {} } - }, - "served": true, - "storage": true, - "subresources": { - "status": {} } - } - ] + ] + } } -} \ No newline at end of file +} diff --git a/bootstrap/rpc/crds/dbsyncport.json b/bootstrap/rpc/crds/dbsyncport.json index 27dd0b1..3dd0586 100644 --- a/bootstrap/rpc/crds/dbsyncport.json +++ b/bootstrap/rpc/crds/dbsyncport.json @@ -1,105 +1,144 @@ { - "apiVersion": "apiextensions.k8s.io/v1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "dbsyncports.demeter.run" - }, - "spec": { - "group": "demeter.run", - "names": { - "categories": [ - "demeter-port" - ], - "kind": "DbSyncPort", - "plural": "dbsyncports", - "shortNames": [ - "dbsp" - ], - "singular": "dbsyncport" + "options": [ + { + "description": "mainnet", + "spec": { + "network": "mainnet", + "throughputTier": "0" + } }, - "scope": "Namespaced", - "versions": [ - { - "additionalPrinterColumns": [ - { - "jsonPath": ".spec.network", - "name": "Network", - "type": "string" - }, - { - "jsonPath": ".spec.throughputTier", - "name": "Throughput Tier", - "type": "string" - }, - { - "jsonPath": ".status.username", - "name": "Username", - "type": "string" - }, - { - "jsonPath": ".status.password", - "name": "Password", - "type": "string" - } + { + "description": "preprod", + "spec": { + "network": "preprod", + "throughputTier": "0" + } + }, + { + "description": "preview", + "spec": { + "network": "preview", + "throughputTier": "0" + } + }, + { + "description": "vector-testnet", + "spec": { + "network": "vector-testnet", + "throughputTier": "0" + } + }, + { + "description": "prime-testnet", + "spec": { + "network": "prime-testnet", + "throughputTier": "0" + } + } + ], + "crd": { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "CustomResourceDefinition", + "metadata": { + "name": "dbsyncports.demeter.run" + }, + "spec": { + "group": "demeter.run", + "names": { + "categories": [ + "demeter-port" ], - "name": "v1alpha1", - "schema": { - "openAPIV3Schema": { - "description": "Auto-generated derived type for DbSyncPortSpec via `CustomResource`", - "properties": { - "spec": { - "properties": { - "network": { - "type": "string" - }, - "password": { - "nullable": true, - "type": "string" - }, - "throughputTier": { - "nullable": true, - "type": "string" + "kind": "DbSyncPort", + "plural": "dbsyncports", + "shortNames": [ + "dbsp" + ], + "singular": "dbsyncport" + }, + "scope": "Namespaced", + "versions": [ + { + "additionalPrinterColumns": [ + { + "jsonPath": ".spec.network", + "name": "Network", + "type": "string" + }, + { + "jsonPath": ".spec.throughputTier", + "name": "Throughput Tier", + "type": "string" + }, + { + "jsonPath": ".status.username", + "name": "Username", + "type": "string" + }, + { + "jsonPath": ".status.password", + "name": "Password", + "type": "string" + } + ], + "name": "v1alpha1", + "schema": { + "openAPIV3Schema": { + "description": "Auto-generated derived type for DbSyncPortSpec via `CustomResource`", + "properties": { + "spec": { + "properties": { + "network": { + "type": "string" + }, + "password": { + "nullable": true, + "type": "string" + }, + "throughputTier": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + } }, - "username": { - "nullable": true, - "type": "string" - } + "required": [ + "network" + ], + "type": "object" }, - "required": [ - "network" - ], - "type": "object" - }, - "status": { - "nullable": true, - "properties": { - "password": { - "type": "string" + "status": { + "nullable": true, + "properties": { + "password": { + "type": "string" + }, + "username": { + "type": "string" + } }, - "username": { - "type": "string" - } - }, - "required": [ - "password", - "username" - ], - "type": "object" - } - }, - "required": [ - "spec" - ], - "title": "DbSyncPort", - "type": "object" + "required": [ + "password", + "username" + ], + "type": "object" + } + }, + "required": [ + "spec" + ], + "title": "DbSyncPort", + "type": "object" + } + }, + "served": true, + "storage": true, + "subresources": { + "status": {} } - }, - "served": true, - "storage": true, - "subresources": { - "status": {} } - } - ] + ] + } } -} \ No newline at end of file +} diff --git a/bootstrap/rpc/crds/frontends.json b/bootstrap/rpc/crds/frontends.json index bc18550..69ae473 100644 --- a/bootstrap/rpc/crds/frontends.json +++ b/bootstrap/rpc/crds/frontends.json @@ -1,137 +1,140 @@ { - "apiVersion": "apiextensions.k8s.io/v1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "frontends.demeter.run" - }, - "spec": { - "group": "demeter.run", - "names": { - "kind": "Frontend", - "plural": "frontends", - "shortNames": [ - "fnd" - ], - "singular": "frontend" + "options": [], + "crd": { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "CustomResourceDefinition", + "metadata": { + "name": "frontends.demeter.run" }, - "scope": "Namespaced", - "versions": [ - { - "name": "v1alpha1", - "schema": { - "openAPIV3Schema": { - "type": "object", - "properties": { - "spec": { - "type": "object", - "properties": { - "givenName": { - "type": "string" - }, - "image": { - "type": "string" - }, - "replicas": { - "type": "number" - }, - "enabled": { - "type": "boolean" - }, - "args": { - "type": "string" - }, - "tenancy": { - "type": "string", - "pattern": "^(\\b(cluster|project|proxy)\\b)$" - }, - "envVars": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" + "spec": { + "group": "demeter.run", + "names": { + "kind": "Frontend", + "plural": "frontends", + "shortNames": [ + "fnd" + ], + "singular": "frontend" + }, + "scope": "Namespaced", + "versions": [ + { + "name": "v1alpha1", + "schema": { + "openAPIV3Schema": { + "type": "object", + "properties": { + "spec": { + "type": "object", + "properties": { + "givenName": { + "type": "string" + }, + "image": { + "type": "string" + }, + "replicas": { + "type": "number" + }, + "enabled": { + "type": "boolean" + }, + "args": { + "type": "string" + }, + "tenancy": { + "type": "string", + "pattern": "^(\\b(cluster|project|proxy)\\b)$" + }, + "envVars": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } } } + }, + "annotations": { + "type": "object", + "x-kubernetes-preserve-unknown-fields": true + }, + "computeClass": { + "type": "string" } - }, - "annotations": { - "type": "object", - "x-kubernetes-preserve-unknown-fields": true - }, - "computeClass": { - "type": "string" } - } - }, - "status": { - "type": "object", - "properties": { - "runningStatus": { - "type": "string" - }, - "availableReplicas": { - "type": "number" - }, - "observedGeneration": { - "type": "number" - }, - "availableEnvVars": { - "type": "array", - "items": { + }, + "status": { + "type": "object", + "properties": { + "runningStatus": { "type": "string" + }, + "availableReplicas": { + "type": "number" + }, + "observedGeneration": { + "type": "number" + }, + "availableEnvVars": { + "type": "array", + "items": { + "type": "string" + } + }, + "startTime": { + "type": "number" + }, + "storageDCUPerMin": { + "type": "number" + }, + "computeDCUPerMin": { + "type": "number" } - }, - "startTime": { - "type": "number" - }, - "storageDCUPerMin": { - "type": "number" - }, - "computeDCUPerMin": { - "type": "number" } } } } - } - }, - "additionalPrinterColumns": [ - { - "name": "Enabled", - "type": "boolean", - "jsonPath": ".spec.enabled" - }, - { - "name": "Replicas", - "type": "number", - "jsonPath": ".spec.replicas" - }, - { - "name": "Compute Class", - "type": "string", - "jsonPath": ".spec.computeClass" }, - { - "name": "Compute DCU/min", - "type": "number", - "jsonPath": ".status.computeDCUPerMin" - }, - { - "name": "Storage DCU/min", - "type": "number", - "jsonPath": ".status.storageDCUPerMin" + "additionalPrinterColumns": [ + { + "name": "Enabled", + "type": "boolean", + "jsonPath": ".spec.enabled" + }, + { + "name": "Replicas", + "type": "number", + "jsonPath": ".spec.replicas" + }, + { + "name": "Compute Class", + "type": "string", + "jsonPath": ".spec.computeClass" + }, + { + "name": "Compute DCU/min", + "type": "number", + "jsonPath": ".status.computeDCUPerMin" + }, + { + "name": "Storage DCU/min", + "type": "number", + "jsonPath": ".status.storageDCUPerMin" + } + ], + "served": true, + "storage": true, + "subresources": { + "status": {} } - ], - "served": true, - "storage": true, - "subresources": { - "status": {} } - } - ] + ] + } } } diff --git a/bootstrap/rpc/crds/kupoport.json b/bootstrap/rpc/crds/kupoport.json index b664295..99a9626 100644 --- a/bootstrap/rpc/crds/kupoport.json +++ b/bootstrap/rpc/crds/kupoport.json @@ -1,127 +1,155 @@ { - "apiVersion": "apiextensions.k8s.io/v1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "kupoports.demeter.run" - }, - "spec": { - "group": "demeter.run", - "names": { - "categories": [ - "demeter-port" - ], - "kind": "KupoPort", - "plural": "kupoports", - "shortNames": [ - "kpts" - ], - "singular": "kupoport" + "options": [ + { + "description": "mainnet", + "spec": { + "network": "mainnet", + "throughputTier": "0", + "pruneUtxo": false + } }, - "scope": "Namespaced", - "versions": [ - { - "additionalPrinterColumns": [ - { - "jsonPath": ".spec.network", - "name": "Network", - "type": "string" - }, - { - "jsonPath": ".spec.pruneUtxo", - "name": "Pruned", - "type": "boolean" - }, - { - "jsonPath": ".spec.throughputTier", - "name": "Throughput Tier", - "type": "string" - }, - { - "jsonPath": ".status.endpointUrl", - "name": "Endpoint URL", - "type": "string" - }, - { - "jsonPath": ".status.authenticatedEndpointUrl", - "name": "Authenticated Endpoint URL", - "type": "string" - }, - { - "jsonPath": ".status.authToken", - "name": "Auth Token", - "type": "string" - } + { + "description": "preprod", + "spec": { + "network": "preprod", + "throughputTier": "0", + "pruneUtxo": false + } + }, + { + "description": "preview", + "spec": { + "network": "preview", + "throughputTier": "0", + "pruneUtxo": false + } + } + ], + "crd": { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "CustomResourceDefinition", + "metadata": { + "name": "kupoports.demeter.run" + }, + "spec": { + "group": "demeter.run", + "names": { + "categories": [ + "demeter-port" ], - "name": "v1alpha1", - "schema": { - "openAPIV3Schema": { - "description": "Auto-generated derived type for KupoPortSpec via `CustomResource`", - "properties": { - "spec": { - "properties": { - "authToken": { - "nullable": true, - "type": "string" - }, - "kupoVersion": { - "nullable": true, - "type": "string" - }, - "network": { - "type": "string" - }, - "operatorVersion": { - "type": "string" - }, - "pruneUtxo": { - "type": "boolean" + "kind": "KupoPort", + "plural": "kupoports", + "shortNames": [ + "kpts" + ], + "singular": "kupoport" + }, + "scope": "Namespaced", + "versions": [ + { + "additionalPrinterColumns": [ + { + "jsonPath": ".spec.network", + "name": "Network", + "type": "string" + }, + { + "jsonPath": ".spec.pruneUtxo", + "name": "Pruned", + "type": "boolean" + }, + { + "jsonPath": ".spec.throughputTier", + "name": "Throughput Tier", + "type": "string" + }, + { + "jsonPath": ".status.endpointUrl", + "name": "Endpoint URL", + "type": "string" + }, + { + "jsonPath": ".status.authenticatedEndpointUrl", + "name": "Authenticated Endpoint URL", + "type": "string" + }, + { + "jsonPath": ".status.authToken", + "name": "Auth Token", + "type": "string" + } + ], + "name": "v1alpha1", + "schema": { + "openAPIV3Schema": { + "description": "Auto-generated derived type for KupoPortSpec via `CustomResource`", + "properties": { + "spec": { + "properties": { + "authToken": { + "nullable": true, + "type": "string" + }, + "kupoVersion": { + "nullable": true, + "type": "string" + }, + "network": { + "type": "string" + }, + "operatorVersion": { + "type": "string" + }, + "pruneUtxo": { + "type": "boolean" + }, + "throughputTier": { + "type": "string" + } }, - "throughputTier": { - "type": "string" - } + "required": [ + "network", + "operatorVersion", + "pruneUtxo", + "throughputTier" + ], + "type": "object" }, - "required": [ - "network", - "operatorVersion", - "pruneUtxo", - "throughputTier" - ], - "type": "object" - }, - "status": { - "nullable": true, - "properties": { - "authToken": { - "type": "string" - }, - "authenticatedEndpointUrl": { - "nullable": true, - "type": "string" + "status": { + "nullable": true, + "properties": { + "authToken": { + "type": "string" + }, + "authenticatedEndpointUrl": { + "nullable": true, + "type": "string" + }, + "endpointUrl": { + "type": "string" + } }, - "endpointUrl": { - "type": "string" - } - }, - "required": [ - "authToken", - "endpointUrl" - ], - "type": "object" - } - }, - "required": [ - "spec" - ], - "title": "KupoPort", - "type": "object" + "required": [ + "authToken", + "endpointUrl" + ], + "type": "object" + } + }, + "required": [ + "spec" + ], + "title": "KupoPort", + "type": "object" + } + }, + "served": true, + "storage": true, + "subresources": { + "status": {} } - }, - "served": true, - "storage": true, - "subresources": { - "status": {} } - } - ] + ] + } } -} \ No newline at end of file +} diff --git a/bootstrap/rpc/crds/marloweport.json b/bootstrap/rpc/crds/marloweport.json index 2b5baf6..7290d31 100644 --- a/bootstrap/rpc/crds/marloweport.json +++ b/bootstrap/rpc/crds/marloweport.json @@ -1,123 +1,151 @@ { - "apiVersion": "apiextensions.k8s.io/v1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "marloweports.demeter.run" - }, - "spec": { - "group": "demeter.run", - "names": { - "categories": [ - "demeter-port" - ], - "kind": "MarlowePort", - "plural": "marloweports", - "shortNames": [ - "mpts" - ], - "singular": "marloweport" + "options": [ + { + "description": "mainnet - patch6 (0.0.7)", + "spec": { + "network": "mainnet", + "throughputTier": "0", + "marloweVersion": "patch6" + } }, - "scope": "Namespaced", - "versions": [ - { - "additionalPrinterColumns": [ - { - "jsonPath": ".spec.network", - "name": "Network", - "type": "string" - }, - { - "jsonPath": ".spec.throughputTier", - "name": "Throughput Tier", - "type": "string" - }, - { - "jsonPath": ".status.endpointUrl", - "name": "Endpoint URL", - "type": "string" - }, - { - "jsonPath": ".status.authenticatedEndpointUrl", - "name": "Authenticated Endpoint URL", - "type": "string" - }, - { - "jsonPath": ".status.authToken", - "name": "Auth Token", - "type": "string" - }, - { - "jsonPath": ".spec.marloweVersion", - "name": "Marlowe Version", - "type": "string" - } + { + "description": "preprod - patch6 (0.0.7)", + "spec": { + "network": "preprod", + "throughputTier": "0", + "marloweVersion": "patch6" + } + }, + { + "description": "preview - patch6 (0.0.7)", + "spec": { + "network": "preview", + "throughputTier": "0", + "marloweVersion": "patch6" + } + } + ], + "crd": { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "CustomResourceDefinition", + "metadata": { + "name": "marloweports.demeter.run" + }, + "spec": { + "group": "demeter.run", + "names": { + "categories": [ + "demeter-port" ], - "name": "v1alpha1", - "schema": { - "openAPIV3Schema": { - "description": "Auto-generated derived type for MarlowePortSpec via `CustomResource`", - "properties": { - "spec": { - "properties": { - "authToken": { - "nullable": true, - "type": "string" - }, - "marloweVersion": { - "nullable": true, - "type": "string" - }, - "network": { - "type": "string" - }, - "operatorVersion": { - "type": "string" + "kind": "MarlowePort", + "plural": "marloweports", + "shortNames": [ + "mpts" + ], + "singular": "marloweport" + }, + "scope": "Namespaced", + "versions": [ + { + "additionalPrinterColumns": [ + { + "jsonPath": ".spec.network", + "name": "Network", + "type": "string" + }, + { + "jsonPath": ".spec.throughputTier", + "name": "Throughput Tier", + "type": "string" + }, + { + "jsonPath": ".status.endpointUrl", + "name": "Endpoint URL", + "type": "string" + }, + { + "jsonPath": ".status.authenticatedEndpointUrl", + "name": "Authenticated Endpoint URL", + "type": "string" + }, + { + "jsonPath": ".status.authToken", + "name": "Auth Token", + "type": "string" + }, + { + "jsonPath": ".spec.marloweVersion", + "name": "Marlowe Version", + "type": "string" + } + ], + "name": "v1alpha1", + "schema": { + "openAPIV3Schema": { + "description": "Auto-generated derived type for MarlowePortSpec via `CustomResource`", + "properties": { + "spec": { + "properties": { + "authToken": { + "nullable": true, + "type": "string" + }, + "marloweVersion": { + "nullable": true, + "type": "string" + }, + "network": { + "type": "string" + }, + "operatorVersion": { + "type": "string" + }, + "throughputTier": { + "type": "string" + } }, - "throughputTier": { - "type": "string" - } + "required": [ + "network", + "operatorVersion", + "throughputTier" + ], + "type": "object" }, - "required": [ - "network", - "operatorVersion", - "throughputTier" - ], - "type": "object" - }, - "status": { - "nullable": true, - "properties": { - "authToken": { - "type": "string" + "status": { + "nullable": true, + "properties": { + "authToken": { + "type": "string" + }, + "authenticatedEndpointUrl": { + "nullable": true, + "type": "string" + }, + "endpointUrl": { + "type": "string" + } }, - "authenticatedEndpointUrl": { - "nullable": true, - "type": "string" - }, - "endpointUrl": { - "type": "string" - } - }, - "required": [ - "authToken", - "endpointUrl" - ], - "type": "object" - } - }, - "required": [ - "spec" - ], - "title": "MarlowePort", - "type": "object" + "required": [ + "authToken", + "endpointUrl" + ], + "type": "object" + } + }, + "required": [ + "spec" + ], + "title": "MarlowePort", + "type": "object" + } + }, + "served": true, + "storage": true, + "subresources": { + "status": {} } - }, - "served": true, - "storage": true, - "subresources": { - "status": {} } - } - ] + ] + } } -} \ No newline at end of file +} diff --git a/bootstrap/rpc/crds/mumakport.json b/bootstrap/rpc/crds/mumakport.json index ffa2137..628848d 100644 --- a/bootstrap/rpc/crds/mumakport.json +++ b/bootstrap/rpc/crds/mumakport.json @@ -1,105 +1,130 @@ { - "apiVersion": "apiextensions.k8s.io/v1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "mumakports.demeter.run" - }, - "spec": { - "group": "demeter.run", - "names": { - "categories": [ - "demeter-port" - ], - "kind": "MumakPort", - "plural": "mumakports", - "shortNames": [ - "mumak" - ], - "singular": "mumakport" + "options": [ + { + "description": "mainnet", + "spec": { + "network": "mainnet", + "throughputTier": "0" + } }, - "scope": "Namespaced", - "versions": [ - { - "additionalPrinterColumns": [ - { - "jsonPath": ".spec.network", - "name": "Network", - "type": "string" - }, - { - "jsonPath": ".spec.throughputTier", - "name": "Throughput Tier", - "type": "string" - }, - { - "jsonPath": ".status.username", - "name": "Username", - "type": "string" - }, - { - "jsonPath": ".status.password", - "name": "Password", - "type": "string" - } + { + "description": "preprod", + "spec": { + "network": "preprod", + "throughputTier": "0" + } + }, + { + "description": "preview", + "spec": { + "network": "preview", + "throughputTier": "0" + } + } + ], + "crd": { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "CustomResourceDefinition", + "metadata": { + "name": "mumakports.demeter.run" + }, + "spec": { + "group": "demeter.run", + "names": { + "categories": [ + "demeter-port" ], - "name": "v1alpha1", - "schema": { - "openAPIV3Schema": { - "description": "Auto-generated derived type for MumakPortSpec via `CustomResource`", - "properties": { - "spec": { - "properties": { - "network": { - "type": "string" - }, - "password": { - "nullable": true, - "type": "string" - }, - "throughputTier": { - "nullable": true, - "type": "string" + "kind": "MumakPort", + "plural": "mumakports", + "shortNames": [ + "mumak" + ], + "singular": "mumakport" + }, + "scope": "Namespaced", + "versions": [ + { + "additionalPrinterColumns": [ + { + "jsonPath": ".spec.network", + "name": "Network", + "type": "string" + }, + { + "jsonPath": ".spec.throughputTier", + "name": "Throughput Tier", + "type": "string" + }, + { + "jsonPath": ".status.username", + "name": "Username", + "type": "string" + }, + { + "jsonPath": ".status.password", + "name": "Password", + "type": "string" + } + ], + "name": "v1alpha1", + "schema": { + "openAPIV3Schema": { + "description": "Auto-generated derived type for MumakPortSpec via `CustomResource`", + "properties": { + "spec": { + "properties": { + "network": { + "type": "string" + }, + "password": { + "nullable": true, + "type": "string" + }, + "throughputTier": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + } }, - "username": { - "nullable": true, - "type": "string" - } + "required": [ + "network" + ], + "type": "object" }, - "required": [ - "network" - ], - "type": "object" - }, - "status": { - "nullable": true, - "properties": { - "password": { - "type": "string" + "status": { + "nullable": true, + "properties": { + "password": { + "type": "string" + }, + "username": { + "type": "string" + } }, - "username": { - "type": "string" - } - }, - "required": [ - "password", - "username" - ], - "type": "object" - } - }, - "required": [ - "spec" - ], - "title": "MumakPort", - "type": "object" + "required": [ + "password", + "username" + ], + "type": "object" + } + }, + "required": [ + "spec" + ], + "title": "MumakPort", + "type": "object" + } + }, + "served": true, + "storage": true, + "subresources": { + "status": {} } - }, - "served": true, - "storage": true, - "subresources": { - "status": {} } - } - ] + ] + } } -} \ No newline at end of file +} diff --git a/bootstrap/rpc/crds/ogmiosport.json b/bootstrap/rpc/crds/ogmiosport.json index 93efdac..aa09a01 100644 --- a/bootstrap/rpc/crds/ogmiosport.json +++ b/bootstrap/rpc/crds/ogmiosport.json @@ -1,121 +1,160 @@ { - "apiVersion": "apiextensions.k8s.io/v1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "ogmiosports.demeter.run" - }, - "spec": { - "group": "demeter.run", - "names": { - "categories": [ - "demeter-port" - ], - "kind": "OgmiosPort", - "plural": "ogmiosports", - "shortNames": [ - "opt" - ], - "singular": "ogmiosport" + "options": [ + { + "description": "mainnet", + "spec": { + "network": "mainnet", + "throughputTier": "0" + } }, - "scope": "Namespaced", - "versions": [ - { - "additionalPrinterColumns": [ - { - "jsonPath": ".spec.network", - "name": "Network", - "type": "string" - }, - { - "jsonPath": ".spec.version", - "name": "Version", - "type": "number" - }, - { - "jsonPath": ".status.endpointUrl", - "name": "Endpoint URL", - "type": "string" - }, - { - "jsonPath": ".status.authenticatedEndpointUrl", - "name": "Authenticated Endpoint URL", - "type": "string" - }, - { - "jsonPath": ".status.authToken", - "name": "Auth Token", - "type": "string" - }, - { - "jsonPath": ".spec.throughputTier", - "name": "Throughput Tier", - "type": "string" - } + { + "description": "preprod", + "spec": { + "network": "preprod", + "throughputTier": "0" + } + }, + { + "description": "preview", + "spec": { + "network": "preview", + "throughputTier": "0" + } + }, + { + "description": "vector-testnet", + "spec": { + "network": "vector-testnet", + "throughputTier": "0" + } + }, + { + "description": "prime-testnet", + "spec": { + "network": "prime-testnet", + "throughputTier": "0" + } + } + ], + "crd": { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "CustomResourceDefinition", + "metadata": { + "name": "ogmiosports.demeter.run" + }, + "spec": { + "group": "demeter.run", + "names": { + "categories": [ + "demeter-port" ], - "name": "v1alpha1", - "schema": { - "openAPIV3Schema": { - "description": "Auto-generated derived type for OgmiosPortSpec via `CustomResource`", - "properties": { - "spec": { - "properties": { - "authToken": { - "nullable": true, - "type": "string" - }, - "network": { - "type": "string" - }, - "throughputTier": { - "type": "string" + "kind": "OgmiosPort", + "plural": "ogmiosports", + "shortNames": [ + "opt" + ], + "singular": "ogmiosport" + }, + "scope": "Namespaced", + "versions": [ + { + "additionalPrinterColumns": [ + { + "jsonPath": ".spec.network", + "name": "Network", + "type": "string" + }, + { + "jsonPath": ".spec.version", + "name": "Version", + "type": "number" + }, + { + "jsonPath": ".status.endpointUrl", + "name": "Endpoint URL", + "type": "string" + }, + { + "jsonPath": ".status.authenticatedEndpointUrl", + "name": "Authenticated Endpoint URL", + "type": "string" + }, + { + "jsonPath": ".status.authToken", + "name": "Auth Token", + "type": "string" + }, + { + "jsonPath": ".spec.throughputTier", + "name": "Throughput Tier", + "type": "string" + } + ], + "name": "v1alpha1", + "schema": { + "openAPIV3Schema": { + "description": "Auto-generated derived type for OgmiosPortSpec via `CustomResource`", + "properties": { + "spec": { + "properties": { + "authToken": { + "nullable": true, + "type": "string" + }, + "network": { + "type": "string" + }, + "throughputTier": { + "type": "string" + }, + "version": { + "format": "uint8", + "minimum": 0.0, + "type": "integer" + } }, - "version": { - "format": "uint8", - "minimum": 0.0, - "type": "integer" - } + "required": [ + "network", + "throughputTier", + "version" + ], + "type": "object" }, - "required": [ - "network", - "throughputTier", - "version" - ], - "type": "object" - }, - "status": { - "nullable": true, - "properties": { - "authToken": { - "type": "string" - }, - "authenticatedEndpointUrl": { - "type": "string" + "status": { + "nullable": true, + "properties": { + "authToken": { + "type": "string" + }, + "authenticatedEndpointUrl": { + "type": "string" + }, + "endpointUrl": { + "type": "string" + } }, - "endpointUrl": { - "type": "string" - } - }, - "required": [ - "authToken", - "authenticatedEndpointUrl", - "endpointUrl" - ], - "type": "object" - } - }, - "required": [ - "spec" - ], - "title": "OgmiosPort", - "type": "object" + "required": [ + "authToken", + "authenticatedEndpointUrl", + "endpointUrl" + ], + "type": "object" + } + }, + "required": [ + "spec" + ], + "title": "OgmiosPort", + "type": "object" + } + }, + "served": true, + "storage": true, + "subresources": { + "status": {} } - }, - "served": true, - "storage": true, - "subresources": { - "status": {} } - } - ] + ] + } } -} \ No newline at end of file +} diff --git a/bootstrap/rpc/crds/scrollsport.json b/bootstrap/rpc/crds/scrollsport.json index 08d5439..da01c31 100644 --- a/bootstrap/rpc/crds/scrollsport.json +++ b/bootstrap/rpc/crds/scrollsport.json @@ -1,114 +1,139 @@ { - "apiVersion": "apiextensions.k8s.io/v1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "scrollsports.demeter.run" - }, - "spec": { - "group": "demeter.run", - "names": { - "categories": [ - "demeter-port" - ], - "kind": "ScrollsPort", - "plural": "scrollsports", - "shortNames": [ - "spts" - ], - "singular": "scrollsport" + "options": [ + { + "description": "mainnet", + "spec": { + "network": "mainnet", + "throughputTier": "0" + } }, - "scope": "Namespaced", - "versions": [ - { - "additionalPrinterColumns": [ - { - "jsonPath": ".spec.network", - "name": "Network", - "type": "string" - }, - { - "jsonPath": ".spec.throughputTier", - "name": "Throughput Tier", - "type": "string" - }, - { - "jsonPath": ".status.endpointUrl", - "name": "Endpoint URL", - "type": "string" - }, - { - "jsonPath": ".status.authenticatedEndpointUrl", - "name": "Authenticated Endpoint URL", - "type": "string" - }, - { - "jsonPath": ".status.authToken", - "name": "Auth Token", - "type": "string" - } + { + "description": "preprod", + "spec": { + "network": "preprod", + "throughputTier": "0" + } + }, + { + "description": "preview", + "spec": { + "network": "preview", + "throughputTier": "0" + } + } + ], + "crd": { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "CustomResourceDefinition", + "metadata": { + "name": "scrollsports.demeter.run" + }, + "spec": { + "group": "demeter.run", + "names": { + "categories": [ + "demeter-port" ], - "name": "v1alpha1", - "schema": { - "openAPIV3Schema": { - "description": "Auto-generated derived type for ScrollsPortSpec via `CustomResource`", - "properties": { - "spec": { - "properties": { - "network": { - "type": "string" - }, - "operatorVersion": { - "type": "string" - }, - "throughputTier": { - "type": "string" + "kind": "ScrollsPort", + "plural": "scrollsports", + "shortNames": [ + "spts" + ], + "singular": "scrollsport" + }, + "scope": "Namespaced", + "versions": [ + { + "additionalPrinterColumns": [ + { + "jsonPath": ".spec.network", + "name": "Network", + "type": "string" + }, + { + "jsonPath": ".spec.throughputTier", + "name": "Throughput Tier", + "type": "string" + }, + { + "jsonPath": ".status.endpointUrl", + "name": "Endpoint URL", + "type": "string" + }, + { + "jsonPath": ".status.authenticatedEndpointUrl", + "name": "Authenticated Endpoint URL", + "type": "string" + }, + { + "jsonPath": ".status.authToken", + "name": "Auth Token", + "type": "string" + } + ], + "name": "v1alpha1", + "schema": { + "openAPIV3Schema": { + "description": "Auto-generated derived type for ScrollsPortSpec via `CustomResource`", + "properties": { + "spec": { + "properties": { + "network": { + "type": "string" + }, + "operatorVersion": { + "type": "string" + }, + "throughputTier": { + "type": "string" + }, + "version": { + "type": "string" + } }, - "version": { - "type": "string" - } + "required": [ + "network", + "operatorVersion", + "throughputTier", + "version" + ], + "type": "object" }, - "required": [ - "network", - "operatorVersion", - "throughputTier", - "version" - ], - "type": "object" - }, - "status": { - "nullable": true, - "properties": { - "authToken": { - "type": "string" + "status": { + "nullable": true, + "properties": { + "authToken": { + "type": "string" + }, + "authenticatedEndpointUrl": { + "nullable": true, + "type": "string" + }, + "endpointUrl": { + "type": "string" + } }, - "authenticatedEndpointUrl": { - "nullable": true, - "type": "string" - }, - "endpointUrl": { - "type": "string" - } - }, - "required": [ - "authToken", - "endpointUrl" - ], - "type": "object" - } - }, - "required": [ - "spec" - ], - "title": "ScrollsPort", - "type": "object" + "required": [ + "authToken", + "endpointUrl" + ], + "type": "object" + } + }, + "required": [ + "spec" + ], + "title": "ScrollsPort", + "type": "object" + } + }, + "served": true, + "storage": true, + "subresources": { + "status": {} } - }, - "served": true, - "storage": true, - "subresources": { - "status": {} } - } - ] + ] + } } -} \ No newline at end of file +} diff --git a/bootstrap/rpc/crds/submitapiport.json b/bootstrap/rpc/crds/submitapiport.json index 2410bce..d7dde74 100644 --- a/bootstrap/rpc/crds/submitapiport.json +++ b/bootstrap/rpc/crds/submitapiport.json @@ -1,118 +1,157 @@ { - "apiVersion": "apiextensions.k8s.io/v1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "submitapiports.demeter.run" - }, - "spec": { - "group": "demeter.run", - "names": { - "categories": [ - "demeter-port" - ], - "kind": "SubmitApiPort", - "plural": "submitapiports", - "shortNames": [ - "sapts" - ], - "singular": "submitapiport" + "options": [ + { + "description": "mainnet", + "spec": { + "network": "mainnet", + "throughputTier": "0" + } }, - "scope": "Namespaced", - "versions": [ - { - "additionalPrinterColumns": [ - { - "jsonPath": ".spec.network", - "name": "Network", - "type": "string" - }, - { - "jsonPath": ".spec.throughputTier", - "name": "Throughput Tier", - "type": "string" - }, - { - "jsonPath": ".status.endpointUrl", - "name": "Endpoint URL", - "type": "string" - }, - { - "jsonPath": ".status.authenticatedEndpointUrl", - "name": "Authenticated Endpoint URL", - "type": "string" - }, - { - "jsonPath": ".status.authToken", - "name": "Auth Token", - "type": "string" - } + { + "description": "preprod", + "spec": { + "network": "preprod", + "throughputTier": "0" + } + }, + { + "description": "preview", + "spec": { + "network": "preview", + "throughputTier": "0" + } + }, + { + "description": "vector-testnet", + "spec": { + "network": "vector-testnet", + "throughputTier": "0" + } + }, + { + "description": "prime-testnet", + "spec": { + "network": "prime-testnet", + "throughputTier": "0" + } + } + ], + "crd": { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "CustomResourceDefinition", + "metadata": { + "name": "submitapiports.demeter.run" + }, + "spec": { + "group": "demeter.run", + "names": { + "categories": [ + "demeter-port" ], - "name": "v1alpha1", - "schema": { - "openAPIV3Schema": { - "description": "Auto-generated derived type for SubmitApiPortSpec via `CustomResource`", - "properties": { - "spec": { - "properties": { - "authToken": { - "nullable": true, - "type": "string" - }, - "network": { - "type": "string" - }, - "operatorVersion": { - "type": "string" - }, - "submitapiVersion": { - "nullable": true, - "type": "string" + "kind": "SubmitApiPort", + "plural": "submitapiports", + "shortNames": [ + "sapts" + ], + "singular": "submitapiport" + }, + "scope": "Namespaced", + "versions": [ + { + "additionalPrinterColumns": [ + { + "jsonPath": ".spec.network", + "name": "Network", + "type": "string" + }, + { + "jsonPath": ".spec.throughputTier", + "name": "Throughput Tier", + "type": "string" + }, + { + "jsonPath": ".status.endpointUrl", + "name": "Endpoint URL", + "type": "string" + }, + { + "jsonPath": ".status.authenticatedEndpointUrl", + "name": "Authenticated Endpoint URL", + "type": "string" + }, + { + "jsonPath": ".status.authToken", + "name": "Auth Token", + "type": "string" + } + ], + "name": "v1alpha1", + "schema": { + "openAPIV3Schema": { + "description": "Auto-generated derived type for SubmitApiPortSpec via `CustomResource`", + "properties": { + "spec": { + "properties": { + "authToken": { + "nullable": true, + "type": "string" + }, + "network": { + "type": "string" + }, + "operatorVersion": { + "type": "string" + }, + "submitapiVersion": { + "nullable": true, + "type": "string" + }, + "throughputTier": { + "type": "string" + } }, - "throughputTier": { - "type": "string" - } + "required": [ + "network", + "operatorVersion", + "throughputTier" + ], + "type": "object" }, - "required": [ - "network", - "operatorVersion", - "throughputTier" - ], - "type": "object" - }, - "status": { - "nullable": true, - "properties": { - "authToken": { - "type": "string" - }, - "authenticatedEndpointUrl": { - "nullable": true, - "type": "string" + "status": { + "nullable": true, + "properties": { + "authToken": { + "type": "string" + }, + "authenticatedEndpointUrl": { + "nullable": true, + "type": "string" + }, + "endpointUrl": { + "type": "string" + } }, - "endpointUrl": { - "type": "string" - } - }, - "required": [ - "authToken", - "endpointUrl" - ], - "type": "object" - } - }, - "required": [ - "spec" - ], - "title": "SubmitApiPort", - "type": "object" + "required": [ + "authToken", + "endpointUrl" + ], + "type": "object" + } + }, + "required": [ + "spec" + ], + "title": "SubmitApiPort", + "type": "object" + } + }, + "served": true, + "storage": true, + "subresources": { + "status": {} } - }, - "served": true, - "storage": true, - "subresources": { - "status": {} } - } - ] + ] + } } -} \ No newline at end of file +} diff --git a/bootstrap/rpc/crds/utxorpcport.json b/bootstrap/rpc/crds/utxorpcport.json index 791f47b..41f2c1a 100644 --- a/bootstrap/rpc/crds/utxorpcport.json +++ b/bootstrap/rpc/crds/utxorpcport.json @@ -1,114 +1,139 @@ { - "apiVersion": "apiextensions.k8s.io/v1", - "kind": "CustomResourceDefinition", - "metadata": { - "name": "utxorpcports.demeter.run" - }, - "spec": { - "group": "demeter.run", - "names": { - "categories": [ - "demeter-port" - ], - "kind": "UtxoRpcPort", - "plural": "utxorpcports", - "shortNames": [ - "utxoport" - ], - "singular": "utxorpcport" + "options": [ + { + "description": "mainnet", + "spec": { + "network": "mainnet", + "throughputTier": "0" + } }, - "scope": "Namespaced", - "versions": [ - { - "additionalPrinterColumns": [ - { - "jsonPath": ".spec.network", - "name": "Network", - "type": "string" - }, - { - "jsonPath": ".spec.throughputTier", - "name": "Throughput Tier", - "type": "string" - }, - { - "jsonPath": ".spec.utxorpcVersion", - "name": "UtxoRPC Version", - "type": "string" - }, - { - "jsonPath": ".status.grpcEndpointUrl", - "name": "Endpoint", - "type": "string" - }, - { - "jsonPath": ".status.authToken", - "name": "Auth Token", - "type": "string" - } + { + "description": "preprod", + "spec": { + "network": "preprod", + "throughputTier": "0" + } + }, + { + "description": "preview", + "spec": { + "network": "preview", + "throughputTier": "0" + } + } + ], + "crd": { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "CustomResourceDefinition", + "metadata": { + "name": "utxorpcports.demeter.run" + }, + "spec": { + "group": "demeter.run", + "names": { + "categories": [ + "demeter-port" ], - "name": "v1alpha1", - "schema": { - "openAPIV3Schema": { - "description": "Auto-generated derived type for UtxoRpcPortSpec via `CustomResource`", - "properties": { - "spec": { - "properties": { - "authToken": { - "nullable": true, - "type": "string" - }, - "network": { - "type": "string" - }, - "operatorVersion": { - "type": "string" - }, - "throughputTier": { - "nullable": true, - "type": "string" + "kind": "UtxoRpcPort", + "plural": "utxorpcports", + "shortNames": [ + "utxoport" + ], + "singular": "utxorpcport" + }, + "scope": "Namespaced", + "versions": [ + { + "additionalPrinterColumns": [ + { + "jsonPath": ".spec.network", + "name": "Network", + "type": "string" + }, + { + "jsonPath": ".spec.throughputTier", + "name": "Throughput Tier", + "type": "string" + }, + { + "jsonPath": ".spec.utxorpcVersion", + "name": "UtxoRPC Version", + "type": "string" + }, + { + "jsonPath": ".status.grpcEndpointUrl", + "name": "Endpoint", + "type": "string" + }, + { + "jsonPath": ".status.authToken", + "name": "Auth Token", + "type": "string" + } + ], + "name": "v1alpha1", + "schema": { + "openAPIV3Schema": { + "description": "Auto-generated derived type for UtxoRpcPortSpec via `CustomResource`", + "properties": { + "spec": { + "properties": { + "authToken": { + "nullable": true, + "type": "string" + }, + "network": { + "type": "string" + }, + "operatorVersion": { + "type": "string" + }, + "throughputTier": { + "nullable": true, + "type": "string" + }, + "utxorpcVersion": { + "nullable": true, + "type": "string" + } }, - "utxorpcVersion": { - "nullable": true, - "type": "string" - } + "required": [ + "network", + "operatorVersion" + ], + "type": "object" }, - "required": [ - "network", - "operatorVersion" - ], - "type": "object" - }, - "status": { - "nullable": true, - "properties": { - "authToken": { - "type": "string" + "status": { + "nullable": true, + "properties": { + "authToken": { + "type": "string" + }, + "grpcEndpointUrl": { + "type": "string" + } }, - "grpcEndpointUrl": { - "type": "string" - } - }, - "required": [ - "authToken", - "grpcEndpointUrl" - ], - "type": "object" - } - }, - "required": [ - "spec" - ], - "title": "UtxoRpcPort", - "type": "object" + "required": [ + "authToken", + "grpcEndpointUrl" + ], + "type": "object" + } + }, + "required": [ + "spec" + ], + "title": "UtxoRpcPort", + "type": "object" + } + }, + "served": true, + "storage": true, + "subresources": { + "status": {} } - }, - "served": true, - "storage": true, - "subresources": { - "status": {} } - } - ] + ] + } } } diff --git a/src/domain/metadata/command.rs b/src/domain/metadata/command.rs index 58b0ec9..6f466cb 100644 --- a/src/domain/metadata/command.rs +++ b/src/domain/metadata/command.rs @@ -1,12 +1,9 @@ use std::sync::Arc; -use k8s_openapi::apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition; +use super::{MetadataDriven, ResourceMetadata, Result}; -use super::{MetadataDriven, Result}; - -pub async fn fetch(metadata: Arc) -> Result> { - let crds = metadata.find().await?; - Ok(crds) +pub async fn fetch(metadata: Arc) -> Result> { + metadata.find().await } #[cfg(test)] @@ -20,7 +17,7 @@ mod tests { let mut metadata = MockMetadataDriven::new(); metadata .expect_find() - .return_once(|| Ok(vec![CustomResourceDefinition::default()])); + .return_once(|| Ok(vec![ResourceMetadata::default()])); let result = fetch(Arc::new(metadata)).await; assert!(result.is_ok()); diff --git a/src/domain/metadata/mod.rs b/src/domain/metadata/mod.rs index e88a865..67d7e42 100644 --- a/src/domain/metadata/mod.rs +++ b/src/domain/metadata/mod.rs @@ -1,6 +1,7 @@ use std::str::FromStr; use k8s_openapi::apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition; +use serde::{Deserialize, Serialize}; use super::{error::Error, Result}; @@ -9,8 +10,8 @@ pub mod command; #[cfg_attr(test, mockall::automock)] #[async_trait::async_trait] pub trait MetadataDriven: Send + Sync { - async fn find(&self) -> Result>; - async fn find_by_kind(&self, kind: &str) -> Result>; + async fn find(&self) -> Result>; + async fn find_by_kind(&self, kind: &str) -> Result>; fn render_hbs(&self, name: &str, spec: &str) -> Result; } @@ -32,16 +33,27 @@ impl FromStr for KnownField { } } +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ResourceMetadata { + pub options: serde_json::Value, + pub crd: CustomResourceDefinition, +} + #[cfg(test)] pub mod tests { - use k8s_openapi::apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition; + use super::*; const CARDANO_NODE_PORT_CRD: &str = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), "/test/crd/cardanonodeport.json" )); - pub fn mock_crd() -> CustomResourceDefinition { - serde_json::from_str(CARDANO_NODE_PORT_CRD).unwrap() + impl Default for ResourceMetadata { + fn default() -> Self { + Self { + crd: serde_json::from_str(CARDANO_NODE_PORT_CRD).unwrap(), + options: serde_json::Value::default(), + } + } } } diff --git a/src/domain/resource/command.rs b/src/domain/resource/command.rs index 7145286..4c18b3a 100644 --- a/src/domain/resource/command.rs +++ b/src/domain/resource/command.rs @@ -83,7 +83,7 @@ pub async fn create( return Err(Error::Unexpected("invalid random name, try again".into())); } - let Some(crd) = metadata.find_by_kind(&cmd.kind).await? else { + let Some(metadata) = metadata.find_by_kind(&cmd.kind).await? else { return Err(Error::CommandMalformed("kind not supported".into())); }; @@ -92,7 +92,7 @@ pub async fn create( }; let mut spec = cmd.spec.clone(); - if let Some(status_schema) = get_schema_from_crd(&crd, "status") { + if let Some(status_schema) = get_schema_from_crd(&metadata.crd, "status") { for (key, _) in status_schema { if let Ok(status_field) = key.parse::() { let value = match status_field { @@ -315,8 +315,7 @@ mod tests { use uuid::Uuid; use crate::domain::event::MockEventDrivenBridge; - use crate::domain::metadata::tests::mock_crd; - use crate::domain::metadata::MockMetadataDriven; + use crate::domain::metadata::{MockMetadataDriven, ResourceMetadata}; use crate::domain::project::cache::MockProjectDrivenCache; use crate::domain::project::{Project, ProjectUser}; use crate::domain::resource::cache::MockResourceDrivenCache; @@ -482,7 +481,7 @@ mod tests { let mut metadata = MockMetadataDriven::new(); metadata .expect_find_by_kind() - .return_once(|_| Ok(Some(mock_crd()))); + .return_once(|_| Ok(Some(ResourceMetadata::default()))); let mut event = MockEventDrivenBridge::new(); event.expect_dispatch().return_once(|_| Ok(())); @@ -546,7 +545,7 @@ mod tests { let mut metadata = MockMetadataDriven::new(); metadata .expect_find_by_kind() - .return_once(|_| Ok(Some(mock_crd()))); + .return_once(|_| Ok(Some(ResourceMetadata::default()))); let event = MockEventDrivenBridge::new(); diff --git a/src/driven/metadata/mod.rs b/src/driven/metadata/mod.rs index e2c7c40..dd48feb 100644 --- a/src/driven/metadata/mod.rs +++ b/src/driven/metadata/mod.rs @@ -1,20 +1,22 @@ use std::{fs, path::Path}; use anyhow::Result as AnyhowResult; -use k8s_openapi::apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition; -use crate::domain::{metadata::MetadataDriven, Result}; +use crate::domain::{ + metadata::{MetadataDriven, ResourceMetadata}, + Result, +}; -pub struct Metadata<'a> { - crds: Vec, +pub struct FileMetadata<'a> { + metadata: Vec, hbs: handlebars::Handlebars<'a>, } -impl<'a> Metadata<'a> { +impl<'a> FileMetadata<'a> { pub fn new(path: &Path) -> AnyhowResult { let dir = fs::read_dir(path)?; - let mut crds: Vec = Vec::new(); + let mut metadata: Vec = Vec::new(); let mut hbs = handlebars::Handlebars::new(); for path in dir { @@ -24,8 +26,7 @@ impl<'a> Metadata<'a> { match entry.path().extension().and_then(|e| e.to_str()) { Some("json") => { - let crd: CustomResourceDefinition = serde_json::from_slice(&file)?; - crds.push(crd); + metadata.push(serde_json::from_slice(&file)?); } Some("hbs") => { let name = entry @@ -44,21 +45,21 @@ impl<'a> Metadata<'a> { } } - Ok(Self { crds, hbs }) + Ok(Self { metadata, hbs }) } } #[async_trait::async_trait] -impl<'a> MetadataDriven for Metadata<'a> { - async fn find(&self) -> Result> { - Ok(self.crds.clone()) +impl<'a> MetadataDriven for FileMetadata<'a> { + async fn find(&self) -> Result> { + Ok(self.metadata.clone()) } - async fn find_by_kind(&self, kind: &str) -> Result> { + async fn find_by_kind(&self, kind: &str) -> Result> { Ok(self - .crds + .metadata .clone() .into_iter() - .find(|crd| crd.spec.names.kind == kind)) + .find(|m| m.crd.spec.names.kind == kind)) } fn render_hbs(&self, name: &str, spec: &str) -> Result { diff --git a/src/drivers/grpc/metadata.rs b/src/drivers/grpc/metadata.rs index 596c7f1..639ab88 100644 --- a/src/drivers/grpc/metadata.rs +++ b/src/drivers/grpc/metadata.rs @@ -3,7 +3,10 @@ use std::sync::Arc; use dmtri::demeter::ops::v1alpha as proto; use tonic::async_trait; -use crate::domain::metadata::{self, MetadataDriven}; +use crate::domain::{ + error::Error, + metadata::{self, MetadataDriven}, +}; pub struct MetadataServiceImpl { pub metadata: Arc, @@ -20,13 +23,18 @@ impl proto::metadata_service_server::MetadataService for MetadataServiceImpl { &self, _request: tonic::Request, ) -> Result, tonic::Status> { - let crds = metadata::command::fetch(self.metadata.clone()).await?; + let metadata = metadata::command::fetch(self.metadata.clone()).await?; - let records: Vec = crds + let records: Vec = metadata .iter() - .map(serde_json::to_string) + .map(|m| { + Ok(proto::Metadata { + options: serde_json::to_string(&m.options)?, + crd: serde_json::to_string(&m.crd)?, + }) + }) .collect::>() - .map_err(|err| tonic::Status::internal(err.to_string()))?; + .map_err(|err: Error| tonic::Status::internal(err.to_string()))?; let message = proto::FetchMetadataResponse { records }; diff --git a/src/drivers/grpc/mod.rs b/src/drivers/grpc/mod.rs index 27155db..525bed9 100644 --- a/src/drivers/grpc/mod.rs +++ b/src/drivers/grpc/mod.rs @@ -24,7 +24,7 @@ use crate::driven::cache::resource::SqliteResourceDrivenCache; use crate::driven::cache::usage::SqliteUsageDrivenCache; use crate::driven::cache::SqliteCache; use crate::driven::kafka::KafkaProducer; -use crate::driven::metadata::Metadata; +use crate::driven::metadata::FileMetadata; use crate::driven::ses::SESDrivenImpl; use crate::driven::stripe::StripeDrivenImpl; @@ -42,7 +42,7 @@ pub async fn server(config: GrpcConfig) -> Result<()> { let event_bridge = Arc::new(KafkaProducer::new(&config.topic, &config.kafka)?); - let metadata = Arc::new(Metadata::new(&config.crds_path)?); + let metadata = Arc::new(FileMetadata::new(&config.crds_path)?); let auth0 = Arc::new( Auth0DrivenImpl::try_new( diff --git a/test/fabric.manifest.yaml b/test/fabric.manifest.yaml index 5802bc4..326543a 100644 --- a/test/fabric.manifest.yaml +++ b/test/fabric.manifest.yaml @@ -136,7 +136,7 @@ metadata: namespace: demeter-rpc data: cardanonodeport.json: | - {"apiVersion":"apiextensions.k8s.io/v1","kind":"CustomResourceDefinition","metadata":{"name":"cardanonodeports.demeter.run"},"spec":{"group":"demeter.run","names":{"categories":["demeter-port"],"kind":"CardanoNodePort","plural":"cardanonodeports","shortNames":["cnpts"],"singular":"cardanonodeport"},"scope":"Namespaced","versions":[{"additionalPrinterColumns":[{"jsonPath":".spec.network","name":"Network","type":"string"},{"jsonPath":".spec.version","name":"Version","type":"string"},{"jsonPath":".spec.throughputTier","name":"Throughput Tier","type":"string"},{"jsonPath":".status.authenticatedEndpointUrl","name":"Authenticated Endpoint URL","type":"string"},{"jsonPath":".status.authToken","name":"Auth Token","type":"string"}],"name":"v1alpha1","schema":{"openAPIV3Schema":{"description":"Auto-generated derived type for CardanoNodePortSpec via `CustomResource`","properties":{"spec":{"properties":{"authToken":{"nullable":true,"type":"string"},"network":{"type":"string"},"throughputTier":{"type":"string"},"version":{"type":"string"}},"required":["network","throughputTier","version"],"type":"object"},"status":{"nullable":true,"properties":{"authToken":{"type":"string"},"authenticatedEndpointUrl":{"type":"string"}},"required":["authToken","authenticatedEndpointUrl"],"type":"object"}},"required":["spec"],"title":"CardanoNodePort","type":"object"}},"served":true,"storage":true,"subresources":{"status":{}}}]}} + {"options":[{"description":"mainnet - stable (9.1.1)","spec":{"network":"mainnet","throughputTier":"0","version":"9.1.1"}},{"description":"preprod - stable (9.1.1)","spec":{"network":"preprod","throughputTier":"0","version":"9.1.1"}},{"description":"preview - stable (9.1.1)","spec":{"network":"preview","throughputTier":"0","version":"9.1.1"}},{"description":"vector-testnet - stable (8.7.3)","spec":{"network":"vector-testnet","throughputTier":"0","version":"8.7.3"}},{"description":"prime-testnet - stable (8.7.3)","spec":{"network":"prime-testnet","throughputTier":"0","version":"8.7.3"}}],"crd":{"apiVersion":"apiextensions.k8s.io/v1","kind":"CustomResourceDefinition","metadata":{"name":"cardanonodeports.demeter.run"},"spec":{"group":"demeter.run","names":{"categories":["demeter-port"],"kind":"CardanoNodePort","plural":"cardanonodeports","shortNames":["cnpts"],"singular":"cardanonodeport"},"scope":"Namespaced","versions":[{"additionalPrinterColumns":[{"jsonPath":".spec.network","name":"Network","type":"string"},{"jsonPath":".spec.version","name":"Version","type":"string"},{"jsonPath":".spec.throughputTier","name":"Throughput Tier","type":"string"},{"jsonPath":".status.authenticatedEndpointUrl","name":"Authenticated Endpoint URL","type":"string"},{"jsonPath":".status.authToken","name":"Auth Token","type":"string"}],"name":"v1alpha1","schema":{"openAPIV3Schema":{"description":"Auto-generated derived type for CardanoNodePortSpec via `CustomResource`","properties":{"spec":{"properties":{"authToken":{"nullable":true,"type":"string"},"network":{"type":"string"},"throughputTier":{"type":"string"},"version":{"type":"string"}},"required":["network","throughputTier","version"],"type":"object"},"status":{"nullable":true,"properties":{"authToken":{"type":"string"},"authenticatedEndpointUrl":{"type":"string"}},"required":["authToken","authenticatedEndpointUrl"],"type":"object"}},"required":["spec"],"title":"CardanoNodePort","type":"object"}},"served":true,"storage":true,"subresources":{"status":{}}}]}}} --- apiVersion: apps/v1 kind: Deployment