From 36e99c994af79fafbf72e055236fce1d1cc1973a Mon Sep 17 00:00:00 2001 From: Zhenya Tikhonov Date: Thu, 25 Sep 2025 21:43:01 +0400 Subject: [PATCH 1/2] feat: document 2.9 indexes --- indexes/codefresh/agenttasks.json | 10 +- .../codefresh/feature-store-versioned.json | 10 +- indexes/codefresh/users.json | 6 +- indexes/codefresh/workflowprocesses.json | 176 +++---- indexes/read-models/accounts.json | 18 + indexes/read-models/analysisruns.json | 372 +++++++------- indexes/read-models/images-binaries.json | 42 +- indexes/read-models/product-components.json | 170 +++++++ indexes/read-models/product-releases.json | 189 ++++--- indexes/read-models/promotions.json | 20 + indexes/read-models/releases.json | 44 +- indexes/read-models/rollouts.json | 472 ++++++++---------- 12 files changed, 819 insertions(+), 710 deletions(-) create mode 100644 indexes/read-models/accounts.json create mode 100644 indexes/read-models/product-components.json create mode 100644 indexes/read-models/promotions.json diff --git a/indexes/codefresh/agenttasks.json b/indexes/codefresh/agenttasks.json index 7e5b1f26f..5f3f9e015 100644 --- a/indexes/codefresh/agenttasks.json +++ b/indexes/codefresh/agenttasks.json @@ -1,6 +1,6 @@ [ { - "keys": { + "key": { "metadata.accountId": 1, "metadata.reIdentifier": 1, "metadata.shouldExecute": 1, @@ -10,11 +10,9 @@ } }, { - "keys": { + "key": { "metadata.expireAt": 1 }, - "options": { - "expireAfterSeconds": 0 - } + "expireAfterSeconds": 0 } -] \ No newline at end of file +] diff --git a/indexes/codefresh/feature-store-versioned.json b/indexes/codefresh/feature-store-versioned.json index e5c9af57f..08af07031 100644 --- a/indexes/codefresh/feature-store-versioned.json +++ b/indexes/codefresh/feature-store-versioned.json @@ -1,16 +1,14 @@ [ { - "keys": { + "key": { "createdAt": 1 }, - "options": { - "expireAfterSeconds": 43200 - } + "expireAfterSeconds": 43200 }, { - "keys": { + "key": { "_id": -1, "LDRedisStoreVersion": 1 } } -] \ No newline at end of file +] diff --git a/indexes/codefresh/users.json b/indexes/codefresh/users.json index 07200446a..4f06f548e 100644 --- a/indexes/codefresh/users.json +++ b/indexes/codefresh/users.json @@ -1,15 +1,15 @@ [ { - "keys": { + "key": { "account": 1, "_id": 1 } }, { - "keys": { + "key": { "role": 1, "account": 1, "_id": 1 } } -] \ No newline at end of file +] diff --git a/indexes/codefresh/workflowprocesses.json b/indexes/codefresh/workflowprocesses.json index 6f54ab77f..068a42dae 100644 --- a/indexes/codefresh/workflowprocesses.json +++ b/indexes/codefresh/workflowprocesses.json @@ -1,38 +1,38 @@ [ { - "keys": { + "key": { "account": 1, "pendingLicense": 1, "created": 1 } }, { - "keys": { + "key": { "pipeline": 1, "status": 1 } }, { - "keys": { + "key": { "account": 1, "triggerType": 1 } }, { - "keys": { + "key": { "account": 1, "pipelineInfo.pipelineId": 1 } }, { - "keys": { + "key": { "account": 1, "startImmediately": 1, "status": 1 } }, { - "keys": { + "key": { "account": 1, "scmMetadata.repoName": 1, "scmMetadata.repoOwner": 1, @@ -41,12 +41,12 @@ } }, { - "keys": { + "key": { "isPublic": 1 } }, { - "keys": { + "key": { "codefreshEnv": 1, "status": 1, "shouldPerformFinishSystem": 1, @@ -54,26 +54,26 @@ } }, { - "keys": { + "key": { "account": 1, "helmInfo.boardId": 1 } }, { - "keys": { + "key": { "account": 1, "environs": 1 } }, { - "keys": { + "key": { "account": 1, "status": 1, "trigger": 1 } }, { - "keys": { + "key": { "account": 1, "pipeline": 1, "trigger": 1, @@ -81,7 +81,7 @@ } }, { - "keys": { + "key": { "scmMetadata.branchName": 1, "account": 1, "pipeline": 1, @@ -90,7 +90,7 @@ } }, { - "keys": { + "key": { "trigger": 1, "account": 1, "status": 1, @@ -98,7 +98,7 @@ } }, { - "keys": { + "key": { "account": 1, "trigger": 1, "scmMetadata.repoName": 1, @@ -106,37 +106,37 @@ } }, { - "keys": { + "key": { "service": 1, "status": 1 } }, { - "keys": { + "key": { "finished": 1 } }, { - "keys": { + "key": { "healthStatus.engine.status": 1 } }, { - "keys": { + "key": { "codefreshEnv": 1, "status": 1, "_id": 1 } }, { - "keys": { + "key": { "account": 1, "service": 1, "trigger": 1 } }, { - "keys": { + "key": { "scmMetadata.branchName": 1, "service": 1, "status": 1, @@ -144,132 +144,126 @@ } }, { - "keys": { + "key": { "status": 1, "trigger": 1 } }, { - "keys": { + "key": { "pipeline": 1, "finished": -1 } }, { - "keys": { + "key": { "progress": 1 } }, { - "keys": { + "key": { "account": 1, "environ": 1 } }, { - "keys": { + "key": { "status": 1, "created": -1 } }, { - "keys": { + "key": { "createdAt": 1 } }, { - "keys": { + "key": { "request": 1 } }, { - "keys": { + "key": { "account": 1, "_id": 1, "scmMetadata.repoName": 1 } }, { - "keys": { + "key": { "pipeline": 1, "created": -1 } }, { - "keys": { + "key": { "account": 1, "status": 1, "created": 1 } }, { - "keys": { + "key": { "status": 1, "runtimeEnvironmentMetadata.agent": 1, "created": 1 } }, { - "keys": { + "key": { "created": 1 } }, { - "keys": { + "key": { "account": 1, "status": 1, "trigger": 1, "pipeline": 1, "keepPVCsForPendingApproval": 1 }, - "options": { - "partialFilterExpression": { - "status": { - "$in": [ - "pending", - "delayed", - "elected", - "running", - "terminating", - "pending-approval" - ] - } + "partialFilterExpression": { + "status": { + "$in": [ + "pending", + "delayed", + "elected", + "running", + "terminating", + "pending-approval" + ] } } }, { - "keys": { + "key": { "account": 1, "scmMetadata.revision": 1, "_id": -1, "pipeline": 1 }, - "options": { - "partialFilterExpression": { - "scmMetadata.revision": { - "$exists": true - } + "partialFilterExpression": { + "scmMetadata.revision": { + "$exists": true } } }, { - "keys": { + "key": { "account": 1, "trigger": 1, "scmMetadata.userName": 1, "_id": -1, "pipeline": 1 }, - "options": { - "partialFilterExpression": { - "scmMetadata.userName": { - "$exists": true - } + "partialFilterExpression": { + "scmMetadata.userName": { + "$exists": true } } }, { - "keys": { + "key": { "account": 1, "trigger": 1, "annotations.key": 1, @@ -277,44 +271,38 @@ "_id": -1, "pipeline": 1 }, - "options": { - "sparse": true - } + "sparse": true }, { - "keys": { + "key": { "account": 1, "trigger": 1, "pipelineTrigger": 1, "_id": -1, "pipeline": 1 }, - "options": { - "partialFilterExpression": { - "pipelineTrigger": { - "$exists": true - } + "partialFilterExpression": { + "pipelineTrigger": { + "$exists": true } } }, { - "keys": { + "key": { "account": 1, "trigger": 1, "scmMetadata.branchName": 1, "_id": -1, "pipeline": 1 }, - "options": { - "partialFilterExpression": { - "scmMetadata.branchName": { - "$exists": true - } + "partialFilterExpression": { + "scmMetadata.branchName": { + "$exists": true } } }, { - "keys": { + "key": { "account": 1, "trigger": 1, "_id": -1, @@ -322,39 +310,35 @@ } }, { - "keys": { + "key": { "account": 1, "trigger": 1, "scmMetadata.provider": 1, "_id": -1, "pipeline": 1 }, - "options": { - "partialFilterExpression": { - "scmMetadata.provider": { - "$exists": true - } + "partialFilterExpression": { + "scmMetadata.provider": { + "$exists": true } } }, { - "keys": { + "key": { "account": 1, "trigger": 1, "scmMetadata.repoName": 1, "_id": -1, "pipeline": 1 }, - "options": { - "partialFilterExpression": { - "scmMetadata.repoName": { - "$exists": true - } + "partialFilterExpression": { + "scmMetadata.repoName": { + "$exists": true } } }, { - "keys": { + "key": { "account": 1, "trigger": 1, "scmMetadata.provider": 1, @@ -362,19 +346,17 @@ "_id": -1, "pipeline": 1 }, - "options": { - "partialFilterExpression": { - "scmMetadata.event": { - "$exists": true - }, - "scmMetadata.provider": { - "$exists": true - } + "partialFilterExpression": { + "scmMetadata.event": { + "$exists": true + }, + "scmMetadata.provider": { + "$exists": true } } }, { - "keys": { + "key": { "pipeline": 1, "_id": -1 } diff --git a/indexes/read-models/accounts.json b/indexes/read-models/accounts.json new file mode 100644 index 000000000..316467710 --- /dev/null +++ b/indexes/read-models/accounts.json @@ -0,0 +1,18 @@ +[ + { + "key": { + "gitopsUsage.cronRunId": 1 + }, + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false + } + } +] diff --git a/indexes/read-models/analysisruns.json b/indexes/read-models/analysisruns.json index 7c8071247..1c3a52793 100644 --- a/indexes/read-models/analysisruns.json +++ b/indexes/read-models/analysisruns.json @@ -1,250 +1,226 @@ [ { - "keys": { + "key": { "__passiveReferencedBy.name": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "__passiveReferencedBy.name": 1, "__passiveReferencedBy.kind": 1, "__passiveReferencedBy.namespace": 1, "__passiveReferencedBy.group": 1, "__passiveReferencedBy.version": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "__passiveReferences.name": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "__passiveReferences.name": 1, "__passiveReferences.kind": 1, "__passiveReferences.namespace": 1, "__passiveReferences.group": 1, "__passiveReferences.version": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "__inferredReferencedBy.name": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "__inferredReferencedBy.name": 1, "__inferredReferencedBy.kind": 1, "__inferredReferencedBy.namespace": 1, "__inferredReferencedBy.group": 1, "__inferredReferencedBy.version": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "__inferredReferences.name": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "__inferredReferences.name": 1, "__inferredReferences.kind": 1, "__inferredReferences.namespace": 1, "__inferredReferences.group": 1, "__inferredReferences.version": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "updatedAt": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "projects": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "metadata.name": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "metadata.labels": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "metadata.accountId": 1, "metadata.runtime": 1, "metadata.cluster": 1, @@ -256,24 +232,22 @@ "metadata.uid": 1, "metadata.revision": 1 }, - "options": { - "unique": true, - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "unique": true, + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "metadata.accountId": 1, "revision": 1, "metadata.labels.rollout-type": 1, @@ -282,7 +256,7 @@ } }, { - "keys": { + "key": { "metadata.accountId": 1, "revision": 1, "metadata.labels.rollout-type": 1, @@ -291,23 +265,21 @@ } }, { - "keys": { + "key": { "ownerReferences.uid": 1, "revision": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } } -] \ No newline at end of file +] diff --git a/indexes/read-models/images-binaries.json b/indexes/read-models/images-binaries.json index c8efda894..305dd4fe0 100644 --- a/indexes/read-models/images-binaries.json +++ b/indexes/read-models/images-binaries.json @@ -1,44 +1,44 @@ [ { - "keys": { + "key": { "accountId": 1, "imageName": 1, "repositoryName": 1 } }, { - "keys": { + "key": { "accountId": 1, "repositoryName": 1, "gitRepository": 1 } }, { - "keys": { + "key": { "accountId": 1, "repositoryName": 1, "branch": 1 } }, { - "keys": { + "key": { "runtime.name": 1 } }, { - "keys": { + "key": { "accountId": 1, "repoDigest": 1 } }, { - "keys": { + "key": { "accountId": 1, "internalImageId": 1 } }, { - "keys": { + "key": { "accountId": 1, "binaryId": 1, "lastUpdate": -1, @@ -46,23 +46,21 @@ } }, { - "keys": { + "key": { "accountId": 1, "imageName": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } } -] \ No newline at end of file +] diff --git a/indexes/read-models/product-components.json b/indexes/read-models/product-components.json new file mode 100644 index 000000000..1dc869a45 --- /dev/null +++ b/indexes/read-models/product-components.json @@ -0,0 +1,170 @@ +[ + { + "key": { + "favorites": 1 + }, + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false + } + }, + { + "key": { + "application.release.application.prs.type": 1 + }, + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false + } + }, + { + "key": { + "application.release.application.issues.type": 1 + }, + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false + } + }, + { + "key": { + "application.self.name": 1 + }, + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false + } + }, + { + "key": { + "application.self.name": 1, + "application.self.kind": 1, + "application.self.namespace": 1, + "application.self.group": 1, + "application.self.version": 1 + }, + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false + } + }, + { + "key": { + "application.self.name": 1, + "accountId": 1, + "type": 1, + "application.runtime": 1, + "application.self.group": 1, + "application.self.version": 1, + "application.self.kind": 1, + "application.self.cluster": 1, + "application.self.namespace": 1 + }, + "unique": true, + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false + } + }, + { + "key": { + "accountId": 1, + "application.deployedTo.name": 1, + "application.deployedTo.server": 1, + "application.deployedTo.namespace": 1, + "application.runtime": 1 + }, + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false + } + }, + { + "key": { + "accountId": 1, + "application.status.health": 1 + }, + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false + } + }, + { + "key": { + "accountId": 1, + "application.release.appVersions.appVersion": 1 + } + }, + { + "key": { + "accountId": 1, + "application.runtime": 1, + "application.deployedTo.namespace": 1, + "application.deployedTo.name": 1 + } + }, + { + "key": { + "accountId": 1, + "application.runtime": 1, + "application.deployedTo.namespace": 1, + "application.deployedTo.server": 1 + } + } +] diff --git a/indexes/read-models/product-releases.json b/indexes/read-models/product-releases.json index 0588ba775..22f5db330 100644 --- a/indexes/read-models/product-releases.json +++ b/indexes/read-models/product-releases.json @@ -1,105 +1,96 @@ [ - { - "keys": { - "status": 1 - }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } - } + { + "key": { + "accountId": 1, + "productName": 1 }, - { - "keys": { - "accountId": 1, - "updatedAt": -1 - }, - "options": { - "collation": { - "locale": "en", - "caseLevel": false, - "caseFirst": "off", - "strength": 2, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false + } + }, + { + "key": { + "accountId": 1, + "productName": 1, + "status": 1, + "triggerEnvironment": 1, + "triggerCommit.sha": 1 + }, + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false + } + }, + { + "key": { + "accountId": 1, + "productName": 1, + "triggerCommit.sha": 1 }, - { - "keys": { - "accountId": 1, - "productName": 1, - "triggerCommit.sha": 1 - }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false + } + }, + { + "key": { + "accountId": 1, + "updatedAt": -1 }, - { - "keys": { - "accountId": 1, - "productName": 1, - "status": 1, - "triggerEnvironment": 1, - "triggerCommit.sha": 1 - }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } - } + "collation": { + "locale": "en", + "caseLevel": false, + "caseFirst": "off", + "strength": 2, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false + } + }, + { + "key": { + "status": 1 }, - { - "keys": { - "accountId": 1, - "productName": 1 - }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false } -] \ No newline at end of file + }, + { + "key": { + "createdAt": 1 + }, + "expireAfterSeconds": 23328000 + } +] diff --git a/indexes/read-models/promotions.json b/indexes/read-models/promotions.json new file mode 100644 index 000000000..8206611d6 --- /dev/null +++ b/indexes/read-models/promotions.json @@ -0,0 +1,20 @@ +[ + { + "key": { + "accountId": 1, + "productName": 1, + "triggerCommit.sha": 1 + }, + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false + } + } +] diff --git a/indexes/read-models/releases.json b/indexes/read-models/releases.json index 731a06bb0..e83564629 100644 --- a/indexes/read-models/releases.json +++ b/indexes/read-models/releases.json @@ -1,46 +1,46 @@ [ { - "keys": { + "key": { "applicationMetadata.name": 1 } }, { - "keys": { + "key": { "applicationMetadata.labels": 1 } }, { - "keys": { + "key": { "application.prs.type": 1 } }, { - "keys": { + "key": { "application.prs.key": 1 } }, { - "keys": { + "key": { "application.prs.accountId": 1 } }, { - "keys": { + "key": { "application.issues.type": 1 } }, { - "keys": { + "key": { "application.issues.key": 1 } }, { - "keys": { + "key": { "application.issues.accountId": 1 } }, { - "keys": { + "key": { "applicationMetadata.accountId": 1, "applicationMetadata.runtime": 1, "applicationMetadata.name": 1, @@ -49,7 +49,7 @@ } }, { - "keys": { + "key": { "applicationMetadata.accountId": 1, "applicationMetadata.runtime": 1, "applicationMetadata.name": 1, @@ -58,7 +58,7 @@ } }, { - "keys": { + "key": { "applicationMetadata.accountId": 1, "applicationMetadata.runtime": 1, "applicationMetadata.name": 1, @@ -67,7 +67,7 @@ } }, { - "keys": { + "key": { "applicationMetadata.accountId": 1, "applicationMetadata.runtime": 1, "applicationMetadata.name": 1, @@ -77,12 +77,10 @@ "applicationMetadata.kind": 1, "historyId": -1 }, - "options": { - "unique": true - } + "unique": true }, { - "keys": { + "key": { "applicationMetadata.accountId": 1, "applicationMetadata.runtime": 1, "applicationMetadata.name": 1, @@ -95,14 +93,14 @@ } }, { - "keys": { + "key": { "fromState.services.revision": 1, "fromState.services.name": 1, "applicationMetadata.accountId": 1 } }, { - "keys": { + "key": { "syncOperationRevision": 1, "applicationMetadata.name": 1, "applicationMetadata.accountId": 1, @@ -110,31 +108,31 @@ } }, { - "keys": { + "key": { "applicationMetadata.name": 1, "applicationMetadata.accountId": 1, "historyId": -1 } }, { - "keys": { + "key": { "applicationMetadata.name": 1, "applicationMetadata.accountId": 1, "application.status.healthStatus": 1 } }, { - "keys": { + "key": { "applicationMetadata.name": 1, "applicationMetadata.accountId": 1, "current": 1 } }, { - "keys": { + "key": { "application.status.revision": 1, "applicationMetadata.name": 1, "applicationMetadata.accountId": 1 } } -] \ No newline at end of file +] diff --git a/indexes/read-models/rollouts.json b/indexes/read-models/rollouts.json index 0bb53806c..b59d2704e 100644 --- a/indexes/read-models/rollouts.json +++ b/indexes/read-models/rollouts.json @@ -1,288 +1,260 @@ [ { - "keys": { + "key": { "__passiveReferencedBy.name": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "__passiveReferencedBy.name": 1, "__passiveReferencedBy.kind": 1, "__passiveReferencedBy.namespace": 1, "__passiveReferencedBy.group": 1, "__passiveReferencedBy.version": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "__passiveReferences.name": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "__passiveReferences.name": 1, "__passiveReferences.kind": 1, "__passiveReferences.namespace": 1, "__passiveReferences.group": 1, "__passiveReferences.version": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "__inferredReferencedBy.name": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "__inferredReferencedBy.name": 1, "__inferredReferencedBy.kind": 1, "__inferredReferencedBy.namespace": 1, "__inferredReferencedBy.group": 1, "__inferredReferencedBy.version": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "__inferredReferences.name": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "__inferredReferences.name": 1, "__inferredReferences.kind": 1, "__inferredReferences.namespace": 1, "__inferredReferences.group": 1, "__inferredReferences.version": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "updatedAt": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "projects": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "metadata.name": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "metadata.labels": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "source.syncStartedAt": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "source.gitSource": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "metadata.accountId": 1, "metadata.runtime": 1, "metadata.cluster": 1, @@ -295,80 +267,72 @@ "metadata.uid": 1, "metadata.labels.app\\u002ekubernetes\\u002eio/instance": 1 }, - "options": { - "unique": true, - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "unique": true, + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "source.gitSourceUID": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "source.gitSourceNamespace": 1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } }, { - "keys": { + "key": { "metadata.appName": 1, "metadata.accountId": 1, "metadata.runtime": 1, "_id": -1 }, - "options": { - "collation": { - "locale": "en_US", - "caseLevel": false, - "caseFirst": "off", - "strength": 1, - "numericOrdering": false, - "alternate": "non-ignorable", - "maxVariable": "punct", - "normalization": false, - "backwards": false, - "version": "57.1" - } + "collation": { + "locale": "en_US", + "caseLevel": false, + "caseFirst": "off", + "strength": 1, + "numericOrdering": false, + "alternate": "non-ignorable", + "maxVariable": "punct", + "normalization": false, + "backwards": false, + "version": "57.1" } } -] \ No newline at end of file +] From 9161de5c8faec0f128fcc3a7f615e39ffdab98ba Mon Sep 17 00:00:00 2001 From: Zhenya Tikhonov Date: Thu, 25 Sep 2025 21:44:14 +0400 Subject: [PATCH 2/2] docs: sync docs with prod --- README.md | 76 ++++++++++++++++++++++++++++++++++++------------ README.md.gotmpl | 76 ++++++++++++++++++++++++++++++++++++------------ 2 files changed, 114 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 12c905f36..6e53c3836 100644 --- a/README.md +++ b/README.md @@ -204,14 +204,21 @@ helm show values codefresh/codefresh ### Persistent services -The following table displays the list of **persistent** services created as part of the on-premises installation: +Codefresh relies on several persistent services to store its data: -| Database | Purpose | Required version | -| :--- | :---- | :--- | -| MongoDB | Stores all account data (account settings, users, projects, pipelines, builds etc.) | 7.x | -| Postgresql | Stores data about events for the account (pipeline updates, deletes, etc.). The audit log uses the data from this database. | 16.x or 17.x | -| Redis | Used for caching, and as a key-value store for cron trigger manager. | 7.0.x | -| RabbitMQ | Used for message queueing. | 3.13 \| 4.0.x | +- **MongoDB**: Stores all account data (account settings, users, projects, pipelines, builds etc.) +- **PostgreSQL**: Stores data about events for the account (pipeline updates, deletes, etc.). The audit log uses the data from this database. +- **Redis**: Used for caching, and as a key-value store for cron trigger manager. +- **RabbitMQ**: Used for message queueing. + +The following table reflects the recommended and supported versions of these databases for different Codefresh releases: + +| Codefresh version | MongoDB | PostgreSQL | Redis | RabbitMQ | +| :--- | :--- | :--- | :--- | :--- | +| 2.9.x | \>=4.2 \<=7.x
Recommended: 7.x (`featureCompatibilityVersion: 7.0`)| \>= 16.x \<= 17.x
Recommended: 17.x | \>= 7.0.x \<= 7.4.x
Recommended: 7.4.x | 3.13.x \| 4.0.x \| 4.1.x
Recommended: 4.1.x | +| 2.8.x | \>=4.2 \<=7.x
Recommended: 7.x (`featureCompatibilityVersion: 6.0`)| \>= 13.x \<= 17.x
Recommended: 16.x \| 17.x | \>= 7.0.x \<= 7.4.x
Recommended: 7.4.x | 3.13.x \| 4.0.x \| 4.1.x
Recommended: 4.0.x | +| 2.7.x | \>=4.2 \<=6.x
Recommended: 6.x (`featureCompatibilityVersion: 6.0`)| 13.x | 7.0.x | 3.13.x | +| 2.6.x | \>=4.2 \<=6.x
Recommended: 6.x (`featureCompatibilityVersion: 5.0`)| 13.x | 7.0.x | 3.13.x | > Running on netfs (nfs, cifs) is not recommended. @@ -1484,7 +1491,8 @@ Use [obtain-oidc-id-token](https://github.com/codefresh-io/steps/blob/822afc0a9a Sometimes, in new releases of Codefresh On-Prem, index requirements change. When this happens, it's mentioned in the [Upgrading section](#upgrading) for the specific release. -> ℹ️ If you're upgrading from version `X` to version `Y`, and index requirements were updated in any of the intermediate versions, you only need to align your indexes with the index requirements of version `Y`. To do that, follow [Index alignment](#index-alignment) instructions. +> [!TIP] +> If you're upgrading from version `X` to version `Y`, and index requirements were updated in any of the intermediate versions, you only need to align your indexes with the index requirements of version `Y`. To do that, follow [Index alignment](#index-alignment) instructions. ### Index alignment @@ -1493,10 +1501,9 @@ The required index definitions for each release can be found at the following re - `2.6` - `2.7` - `2.8` +- `2.9` -The indexes are stored in JSON files with keys and options specified. - -The directory structure is: +The indexes specifications are stored in JSON files. The directory structure is: ```console indexes @@ -1507,11 +1514,12 @@ indexes **Overview of the index alignment process:** 1. Identify the differences between the indexes in your MongoDB instance and the required index definitions. -2. Create any missing indexes one by one. (It's important not to create them in bulk.) +2. Create any missing indexes. 3. Perform the upgrade of Codefresh On-Prem installation. 4. Then remove any unnecessary indexes. -> ⚠️ **Note! Any changes to indexes should be performed during a defined maintenance window or during periods of lowest traffic to MongoDB.** +> [!IMPORTANT] +> Any changes to indexes should be performed during a defined maintenance window or during periods of lowest traffic to MongoDB.** > > Building indexes during time periods where the target collection is under heavy write load can result in reduced write performance and longer index builds. ([*Source: MongoDB official documentation*](https://www.mongodb.com/docs/manual/core/index-creation/#index-build-impact-on-database-performance)) > @@ -1533,19 +1541,32 @@ mongosh "" db.getSiblingDB('').getCollection('').getIndexes() ``` -- Compare your indexes with the required indexes for the target release, and adjust them by creating any missing indexes or removing any unnecessary ones +- Compare your indexes with the required indexes for the target release, and adjust them by creating any missing indexes or removing any unnecessary ones. **Index creation** -> ⚠ **Note! Always create indexes sequentially, one by one. Don't create them in bulk.** +- To create an indexes, we recommend using the `createIndexes` command ([ref](https://www.mongodb.com/docs/manual/reference/command/createIndexes/)): -- To create an index, use the `createIndex()` method: +> [!IMPORTANT] +> We recommend to create indexes in batches of 3 indexes at a time. +> However, it's highly recommended before creating indexes in production DB to test performance impact on a staging instance with prod-like amount of data. +> +> Previous command should be completed before starting the next batch. ```js -db.getSiblingDB('').getCollection('').createIndex(, ) +db.getSiblingDB('').runCommand( + { + createIndexes: '', + indexes: [ + { ... }, // Index definition from the doc above + { ... }, // Index definition from the doc above + { ... } // Index definition from the doc above + ], + } +) ``` -After executing the `createIndex()` command, you should see a result indicating that the index was created successfully. +After executing the command, you should see a result indicating that the indexes were created successfully. **Index removal** @@ -1559,7 +1580,8 @@ db.getSiblingDB('').getCollection('').dropIndex(' ⚠️ **Important!** In Atlas, for production environments, it is recommended to use rolling index builds by enabling the "Build index via rolling process" checkbox. ([*MongoDB official documentation*](https://www.mongodb.com/docs/v6.0/tutorial/build-indexes-on-replica-sets/)) +> [!IMPORTANT] +> In Atlas, for production environments, it may be recommended to use rolling index builds by enabling the "Build index via rolling process" checkbox. ([*MongoDB official documentation*](https://www.mongodb.com/docs/v7.0/tutorial/build-indexes-on-replica-sets/)) ## Upgrading @@ -2356,10 +2378,26 @@ For built-in RabbitMQ `bitnami/rabbitmq` subchart, pre-upgrade hook was added to ### To 2-9-0 +> [!WARNING] +> **BREAKING CHANGES** +> +> Default DinD image has been upgraded to 28.x, which removes support for pushing and pulling with legacy image manifest v2 schema 1 ([ref](https://docs.docker.com/engine/deprecated/#pushing-and-pulling-with-image-manifest-v2-schema-1)). +> +> Before upgrading Codefresh, please follow the instruction in [this doc](https://codefresh.io/docs/docs/kb/articles/upgrade-deprecated-docker-images/) to identify deprecated images, upgrade them, and then proceed with upgrading the platform. + #### Affected values - `.Values.runner` is removed +#### Changes in MongoDB schema + +Changes in indexes: follow [Maintaining MongoDB indexes](#maintaining-mongodb-indexes) guide to meet index requirements *before* the upgrade process. + +Changes in collections: following collections can be safely dropped *after* the upgrade to 2.9.x if they exist. These collections are no longer used and should be removed to maintain optimal database performance and prevent the accumulation of obsolete data. + +- `read-models.application-tree` +- `read-models.-history` — every collection with `~-history` suffix, such as `read-models.applications-history`, `read-models.services-history`, etc. + ## Troubleshooting ### Error: Failed to validate connection to Docker daemon; caused by Error: certificate has expired diff --git a/README.md.gotmpl b/README.md.gotmpl index 013502286..8b010a486 100644 --- a/README.md.gotmpl +++ b/README.md.gotmpl @@ -205,14 +205,21 @@ helm show values codefresh/codefresh ### Persistent services -The following table displays the list of **persistent** services created as part of the on-premises installation: +Codefresh relies on several persistent services to store its data: -| Database | Purpose | Required version | -| :--- | :---- | :--- | -| MongoDB | Stores all account data (account settings, users, projects, pipelines, builds etc.) | 7.x | -| Postgresql | Stores data about events for the account (pipeline updates, deletes, etc.). The audit log uses the data from this database. | 16.x or 17.x | -| Redis | Used for caching, and as a key-value store for cron trigger manager. | 7.0.x | -| RabbitMQ | Used for message queueing. | 3.13 \| 4.0.x | +- **MongoDB**: Stores all account data (account settings, users, projects, pipelines, builds etc.) +- **PostgreSQL**: Stores data about events for the account (pipeline updates, deletes, etc.). The audit log uses the data from this database. +- **Redis**: Used for caching, and as a key-value store for cron trigger manager. +- **RabbitMQ**: Used for message queueing. + +The following table reflects the recommended and supported versions of these databases for different Codefresh releases: + +| Codefresh version | MongoDB | PostgreSQL | Redis | RabbitMQ | +| :--- | :--- | :--- | :--- | :--- | +| 2.9.x | \>=4.2 \<=7.x
Recommended: 7.x (`featureCompatibilityVersion: 7.0`)| \>= 16.x \<= 17.x
Recommended: 17.x | \>= 7.0.x \<= 7.4.x
Recommended: 7.4.x | 3.13.x \| 4.0.x \| 4.1.x
Recommended: 4.1.x | +| 2.8.x | \>=4.2 \<=7.x
Recommended: 7.x (`featureCompatibilityVersion: 6.0`)| \>= 13.x \<= 17.x
Recommended: 16.x \| 17.x | \>= 7.0.x \<= 7.4.x
Recommended: 7.4.x | 3.13.x \| 4.0.x \| 4.1.x
Recommended: 4.0.x | +| 2.7.x | \>=4.2 \<=6.x
Recommended: 6.x (`featureCompatibilityVersion: 6.0`)| 13.x | 7.0.x | 3.13.x | +| 2.6.x | \>=4.2 \<=6.x
Recommended: 6.x (`featureCompatibilityVersion: 5.0`)| 13.x | 7.0.x | 3.13.x | > Running on netfs (nfs, cifs) is not recommended. @@ -1492,7 +1499,8 @@ Use [obtain-oidc-id-token](https://github.com/codefresh-io/steps/blob/822afc0a9a Sometimes, in new releases of Codefresh On-Prem, index requirements change. When this happens, it's mentioned in the [Upgrading section](#upgrading) for the specific release. -> ℹ️ If you're upgrading from version `X` to version `Y`, and index requirements were updated in any of the intermediate versions, you only need to align your indexes with the index requirements of version `Y`. To do that, follow [Index alignment](#index-alignment) instructions. +> [!TIP] +> If you're upgrading from version `X` to version `Y`, and index requirements were updated in any of the intermediate versions, you only need to align your indexes with the index requirements of version `Y`. To do that, follow [Index alignment](#index-alignment) instructions. ### Index alignment @@ -1501,10 +1509,9 @@ The required index definitions for each release can be found at the following re - `2.6` - `2.7` - `2.8` +- `2.9` -The indexes are stored in JSON files with keys and options specified. - -The directory structure is: +The indexes specifications are stored in JSON files. The directory structure is: ```console indexes @@ -1515,11 +1522,12 @@ indexes **Overview of the index alignment process:** 1. Identify the differences between the indexes in your MongoDB instance and the required index definitions. -2. Create any missing indexes one by one. (It's important not to create them in bulk.) +2. Create any missing indexes. 3. Perform the upgrade of Codefresh On-Prem installation. 4. Then remove any unnecessary indexes. -> ⚠️ **Note! Any changes to indexes should be performed during a defined maintenance window or during periods of lowest traffic to MongoDB.** +> [!IMPORTANT] +> Any changes to indexes should be performed during a defined maintenance window or during periods of lowest traffic to MongoDB.** > > Building indexes during time periods where the target collection is under heavy write load can result in reduced write performance and longer index builds. ([*Source: MongoDB official documentation*](https://www.mongodb.com/docs/manual/core/index-creation/#index-build-impact-on-database-performance)) > @@ -1542,19 +1550,32 @@ mongosh "" db.getSiblingDB('').getCollection('').getIndexes() ``` -- Compare your indexes with the required indexes for the target release, and adjust them by creating any missing indexes or removing any unnecessary ones +- Compare your indexes with the required indexes for the target release, and adjust them by creating any missing indexes or removing any unnecessary ones. **Index creation** -> ⚠ **Note! Always create indexes sequentially, one by one. Don't create them in bulk.** +- To create an indexes, we recommend using the `createIndexes` command ([ref](https://www.mongodb.com/docs/manual/reference/command/createIndexes/)): -- To create an index, use the `createIndex()` method: +> [!IMPORTANT] +> We recommend to create indexes in batches of 3 indexes at a time. +> However, it's highly recommended before creating indexes in production DB to test performance impact on a staging instance with prod-like amount of data. +> +> Previous command should be completed before starting the next batch. ```js -db.getSiblingDB('').getCollection('').createIndex(, ) +db.getSiblingDB('').runCommand( + { + createIndexes: '', + indexes: [ + { ... }, // Index definition from the doc above + { ... }, // Index definition from the doc above + { ... } // Index definition from the doc above + ], + } +) ``` -After executing the `createIndex()` command, you should see a result indicating that the index was created successfully. +After executing the command, you should see a result indicating that the indexes were created successfully. **Index removal** @@ -1568,7 +1589,8 @@ db.getSiblingDB('').getCollection('').dropIndex(' ⚠️ **Important!** In Atlas, for production environments, it is recommended to use rolling index builds by enabling the "Build index via rolling process" checkbox. ([*MongoDB official documentation*](https://www.mongodb.com/docs/v6.0/tutorial/build-indexes-on-replica-sets/)) +> [!IMPORTANT] +> In Atlas, for production environments, it may be recommended to use rolling index builds by enabling the "Build index via rolling process" checkbox. ([*MongoDB official documentation*](https://www.mongodb.com/docs/v7.0/tutorial/build-indexes-on-replica-sets/)) ## Upgrading @@ -2366,10 +2388,26 @@ For built-in RabbitMQ `bitnami/rabbitmq` subchart, pre-upgrade hook was added to ### To 2-9-0 +> [!WARNING] +> **BREAKING CHANGES** +> +> Default DinD image has been upgraded to 28.x, which removes support for pushing and pulling with legacy image manifest v2 schema 1 ([ref](https://docs.docker.com/engine/deprecated/#pushing-and-pulling-with-image-manifest-v2-schema-1)). +> +> Before upgrading Codefresh, please follow the instruction in [this doc](https://codefresh.io/docs/docs/kb/articles/upgrade-deprecated-docker-images/) to identify deprecated images, upgrade them, and then proceed with upgrading the platform. + #### Affected values - `.Values.runner` is removed +#### Changes in MongoDB schema + +Changes in indexes: follow [Maintaining MongoDB indexes](#maintaining-mongodb-indexes) guide to meet index requirements *before* the upgrade process. + +Changes in collections: following collections can be safely dropped *after* the upgrade to 2.9.x if they exist. These collections are no longer used and should be removed to maintain optimal database performance and prevent the accumulation of obsolete data. + +- `read-models.application-tree` +- `read-models.-history` — every collection with `~-history` suffix, such as `read-models.applications-history`, `read-models.services-history`, etc. + ## Troubleshooting