From c6f26c7b261f4dc759f81bb651379e04252534a8 Mon Sep 17 00:00:00 2001 From: Vasil Sudakou Date: Wed, 4 Jun 2025 14:00:25 +0400 Subject: [PATCH 1/6] fix: restructure index files --- .../files/indexes/2.6 => indexes/codefresh}/agenttasks.json | 0 .../indexes/2.6 => indexes/codefresh}/workflowprocesses.json | 0 .../files/indexes/2.6 => indexes/read-models}/analysisruns.json | 0 .../indexes/2.6 => indexes/read-models}/images-binaries.json | 0 .../files/indexes/2.6 => indexes/read-models}/releases.json | 0 .../files/indexes/2.6 => indexes/read-models}/rollouts.json | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename {codefresh/files/indexes/2.6 => indexes/codefresh}/agenttasks.json (100%) rename {codefresh/files/indexes/2.6 => indexes/codefresh}/workflowprocesses.json (100%) rename {codefresh/files/indexes/2.6 => indexes/read-models}/analysisruns.json (100%) rename {codefresh/files/indexes/2.6 => indexes/read-models}/images-binaries.json (100%) rename {codefresh/files/indexes/2.6 => indexes/read-models}/releases.json (100%) rename {codefresh/files/indexes/2.6 => indexes/read-models}/rollouts.json (100%) diff --git a/codefresh/files/indexes/2.6/agenttasks.json b/indexes/codefresh/agenttasks.json similarity index 100% rename from codefresh/files/indexes/2.6/agenttasks.json rename to indexes/codefresh/agenttasks.json diff --git a/codefresh/files/indexes/2.6/workflowprocesses.json b/indexes/codefresh/workflowprocesses.json similarity index 100% rename from codefresh/files/indexes/2.6/workflowprocesses.json rename to indexes/codefresh/workflowprocesses.json diff --git a/codefresh/files/indexes/2.6/analysisruns.json b/indexes/read-models/analysisruns.json similarity index 100% rename from codefresh/files/indexes/2.6/analysisruns.json rename to indexes/read-models/analysisruns.json diff --git a/codefresh/files/indexes/2.6/images-binaries.json b/indexes/read-models/images-binaries.json similarity index 100% rename from codefresh/files/indexes/2.6/images-binaries.json rename to indexes/read-models/images-binaries.json diff --git a/codefresh/files/indexes/2.6/releases.json b/indexes/read-models/releases.json similarity index 100% rename from codefresh/files/indexes/2.6/releases.json rename to indexes/read-models/releases.json diff --git a/codefresh/files/indexes/2.6/rollouts.json b/indexes/read-models/rollouts.json similarity index 100% rename from codefresh/files/indexes/2.6/rollouts.json rename to indexes/read-models/rollouts.json From 0c9d698276e93478bbf2255cc9935f179ef10371 Mon Sep 17 00:00:00 2001 From: Vasil Sudakou Date: Wed, 4 Jun 2025 14:02:26 +0400 Subject: [PATCH 2/6] fix: change index format --- indexes/codefresh/agenttasks.json | 37 +- indexes/codefresh/workflowprocesses.json | 619 ++++++++++------------ indexes/read-models/analysisruns.json | 531 ++++++++++--------- indexes/read-models/images-binaries.json | 131 +++-- indexes/read-models/releases.json | 277 +++++----- indexes/read-models/rollouts.json | 633 +++++++++++------------ 6 files changed, 1049 insertions(+), 1179 deletions(-) diff --git a/indexes/codefresh/agenttasks.json b/indexes/codefresh/agenttasks.json index 8c761fcd0..7e5b1f26f 100644 --- a/indexes/codefresh/agenttasks.json +++ b/indexes/codefresh/agenttasks.json @@ -1,29 +1,20 @@ [ { - "v" : 2.0, - "key" : { - "_id" : 1.0 - }, - "name" : "_id_" - }, - { - "v" : 2.0, - "key" : { - "metadata.accountId" : 1, - "metadata.reIdentifier" : 1, - "metadata.shouldExecute" : 1, - "metadata.startAt" : 1, - "metadata.status" : 1, - "metadata.expireAt" : 1 - }, - "name" : "metadata.accountId_1_metadata.reIdentifier_1_metadata.shouldExecute_1_metadata.startAt_1_metadata.status_1_metadata.expireAt_1" + "keys": { + "metadata.accountId": 1, + "metadata.reIdentifier": 1, + "metadata.shouldExecute": 1, + "metadata.startAt": 1, + "metadata.status": 1, + "metadata.expireAt": 1 + } }, { - "v" : 2.0, - "key" : { - "metadata.expireAt" : 1 + "keys": { + "metadata.expireAt": 1 }, - "name" : "metadata.expireAt_1", - "expireAfterSeconds" : 0.0 + "options": { + "expireAfterSeconds": 0 + } } -] +] \ No newline at end of file diff --git a/indexes/codefresh/workflowprocesses.json b/indexes/codefresh/workflowprocesses.json index e2e6e65a3..0477e6108 100644 --- a/indexes/codefresh/workflowprocesses.json +++ b/indexes/codefresh/workflowprocesses.json @@ -1,460 +1,385 @@ [ { - "v" : 1.0, - "key" : { - "account" : 1.0, - "pendingLicense" : 1.0, - "created" : 1.0 - }, - "name" : "account_1_pendingLicense_1_created_1" + "keys": { + "account": 1, + "pendingLicense": 1, + "created": 1 + } }, { - "v" : 1.0, - "key" : { - "pipeline" : 1.0, - "status" : 1.0 - }, - "name" : "pipeline_1_status_1" + "keys": { + "pipeline": 1, + "status": 1 + } }, { - "v" : 2.0, - "key" : { - "account" : 1.0, - "triggerType" : 1.0 - }, - "name" : "account_1_triggerType_1" + "keys": { + "account": 1, + "triggerType": 1 + } }, { - "v" : 2.0, - "key" : { - "account" : 1.0, - "pipelineInfo.pipelineId" : 1.0 - }, - "name" : "account_1_pipelineInfo.pipelineId_1" + "keys": { + "account": 1, + "pipelineInfo.pipelineId": 1 + } }, { - "v" : 1.0, - "key" : { - "account" : 1.0, - "startImmediately" : 1.0, - "status" : 1.0 - }, - "name" : "account_1_startImmediately_1_status_1" + "keys": { + "account": 1, + "startImmediately": 1, + "status": 1 + } }, { - "v" : 1.0, - "key" : { - "account" : 1.0, - "scmMetadata.repoName" : 1.0, - "scmMetadata.repoOwner" : 1.0, - "trigger" : 1.0, - "service" : 1.0 - }, - "name" : "account_1_scmMetadata.repoName_1_scmMetadata.repoOwner_1_trigger_1_service_1" + "keys": { + "account": 1, + "scmMetadata.repoName": 1, + "scmMetadata.repoOwner": 1, + "trigger": 1, + "service": 1 + } }, { - "v" : 1.0, - "key" : { - "isPublic" : 1.0 - }, - "name" : "isPublic_1" + "keys": { + "isPublic": 1 + } }, { - "v" : 2.0, - "key" : { - "codefreshEnv" : 1, - "status" : 1, - "shouldPerformFinishSystem" : 1, - "_id" : 1 - }, - "name" : "codefreshEnv_1_status_1_shouldPerformFinishSystem_1__id_1" + "keys": { + "codefreshEnv": 1, + "status": 1, + "shouldPerformFinishSystem": 1, + "_id": 1 + } }, { - "v" : 2.0, - "key" : { - "account" : 1, - "helmInfo.boardId" : 1 - }, - "name" : "account_1_helmInfo.boardId_1" + "keys": { + "account": 1, + "helmInfo.boardId": 1 + } }, { - "v" : 2.0, - "key" : { - "account" : 1.0, - "environs" : 1.0 - }, - "name" : "account_1_environs_1" + "keys": { + "account": 1, + "environs": 1 + } }, { - "v" : 1.0, - "key" : { - "account" : 1.0, - "status" : 1.0, - "trigger" : 1.0 - }, - "name" : "account_1_status_1_trigger_1" + "keys": { + "account": 1, + "status": 1, + "trigger": 1 + } }, { - "v" : 2.0, - "key" : { - "account" : 1, - "pipeline" : 1, - "trigger" : 1, - "_id" : -1 - }, - "name" : "account_1_pipeline_1_trigger_1__id_-1" + "keys": { + "account": 1, + "pipeline": 1, + "trigger": 1, + "_id": -1 + } }, { - "v" : 1.0, - "key" : { - "scmMetadata.branchName" : 1.0, - "account" : 1.0, - "pipeline" : 1.0, - "created" : -1.0, - "finished" : 1.0 - }, - "name" : "scmMetadata.branchName_1_account_1_pipeline_1_created_-1_finished_1" + "keys": { + "scmMetadata.branchName": 1, + "account": 1, + "pipeline": 1, + "created": -1, + "finished": 1 + } }, { - "v" : 2.0, - "key" : { - "trigger" : 1.0, - "account" : 1.0, - "status" : 1.0, - "_id" : -1.0 - }, - "name" : "trigger_1_account_1_status_1__id_-1" + "keys": { + "trigger": 1, + "account": 1, + "status": 1, + "_id": -1 + } }, { - "v" : 1.0, - "key" : { - "account" : 1.0, - "trigger" : 1.0, - "scmMetadata.repoName" : 1.0, - "service" : 1.0 - }, - "name" : "account_1_trigger_1_scmMetadata.repoName_1_service_1" + "keys": { + "account": 1, + "trigger": 1, + "scmMetadata.repoName": 1, + "service": 1 + } }, { - "v" : 1.0, - "key" : { - "service" : 1.0, - "status" : 1.0 - }, - "name" : "service_1_status_1" + "keys": { + "service": 1, + "status": 1 + } }, { - "v" : 1.0, - "key" : { - "finished" : 1.0 - }, - "name" : "finished_1" + "keys": { + "finished": 1 + } }, { - "v" : 2.0, - "key" : { - "healthStatus.engine.status" : 1.0 - }, - "name" : "healthStatus.engine.status_1" + "keys": { + "healthStatus.engine.status": 1 + } }, { - "v" : 2.0, - "key" : { - "codefreshEnv" : 1, - "status" : 1, - "_id" : 1 - }, - "name" : "codefreshEnv_1_status_1__id_1" + "keys": { + "codefreshEnv": 1, + "status": 1, + "_id": 1 + } }, { - "v" : 1.0, - "key" : { - "account" : 1.0, - "service" : 1.0, - "trigger" : 1.0 - }, - "name" : "account_1_service_1_trigger_1" + "keys": { + "account": 1, + "service": 1, + "trigger": 1 + } }, { - "v" : 1.0, - "key" : { - "scmMetadata.branchName" : 1.0, - "service" : 1.0, - "status" : 1.0, - "created" : -1.0 - }, - "name" : "scmMetadata.branchName_1_service_1_status_1_created_-1" + "keys": { + "scmMetadata.branchName": 1, + "service": 1, + "status": 1, + "created": -1 + } }, { - "v" : 1.0, - "key" : { - "status" : 1.0, - "trigger" : 1.0 - }, - "name" : "status_1_trigger_1" + "keys": { + "status": 1, + "trigger": 1 + } }, { - "v" : 2.0, - "key" : { - "pipeline" : 1.0, - "finished" : -1.0 - }, - "name" : "pipeline_1_finished_-1" + "keys": { + "pipeline": 1, + "finished": -1 + } }, { - "v" : 1.0, - "key" : { - "progress" : 1.0 - }, - "name" : "progress_1" + "keys": { + "progress": 1 + } }, { - "v" : 2.0, - "key" : { - "account" : 1.0, - "environ" : 1.0 - }, - "name" : "account_1_environ_1" + "keys": { + "account": 1, + "environ": 1 + } }, { - "v" : 2.0, - "key" : { - "status" : 1, - "created" : -1 - }, - "name" : "status_1_created_-1" + "keys": { + "status": 1, + "created": -1 + } }, { - "v" : 2.0, - "key" : { - "createdAt" : 1.0 - }, - "name" : "createdAt_1" + "keys": { + "createdAt": 1 + } }, { - "v" : 1.0, - "key" : { - "request" : 1.0 - }, - "name" : "request_1" + "keys": { + "request": 1 + } }, { - "v" : 2.0, - "key" : { - "account" : 1, - "_id" : 1, - "scmMetadata.repoName" : 1 - }, - "name" : "account_1__id_1_scmMetadata.repoName_1" + "keys": { + "account": 1, + "_id": 1, + "scmMetadata.repoName": 1 + } }, { - "v" : 2.0, - "key" : { - "pipeline" : 1, - "created" : -1 - }, - "name" : "pipeline_1_created_-1" + "keys": { + "pipeline": 1, + "created": -1 + } }, { - "v" : 2.0, - "key" : { - "account" : 1, - "status" : 1, - "created" : 1 - }, - "name" : "account_1_status_1_created_1" + "keys": { + "account": 1, + "status": 1, + "created": 1 + } }, { - "v" : 2.0, - "key" : { - "status" : 1, - "runtimeEnvironmentMetadata.agent" : 1, - "created" : 1 - }, - "name" : "status_1_runtimeEnvironmentMetadata.agent_1_created_1" + "keys": { + "status": 1, + "runtimeEnvironmentMetadata.agent": 1, + "created": 1 + } }, { - "v" : 2.0, - "key" : { - "created" : 1 + "keys": { + "created": 1 }, - "name" : "created_1", - "expireAfterSeconds" : 31536000.0 + "options": { + "expireAfterSeconds": 31536000 + } }, { - "v" : 2.0, - "key" : { - "account" : 1, - "status" : 1, - "trigger" : 1, - "pipeline" : 1, - "keepPVCsForPendingApproval" : 1 - }, - "name" : "account_1_status_1_trigger_1_pipeline_1_keepPVCsForPendingApproval_1", - "partialFilterExpression" : { - "status" : { - "$in" : [ - "pending", - "delayed", - "elected", - "running", - "terminating", - "pending-approval" - ] + "keys": { + "account": 1, + "status": 1, + "trigger": 1, + "pipeline": 1, + "keepPVCsForPendingApproval": 1 + }, + "options": { + "partialFilterExpression": { + "status": { + "$in": [ + "pending", + "delayed", + "elected", + "running", + "terminating", + "pending-approval" + ] + } } } }, { - "v" : 2.0, - "key" : { - "_id" : 1.0 + "keys": { + "account": 1, + "scmMetadata.revision": 1, + "_id": -1, + "pipeline": 1 }, - "name" : "_id_" - }, - { - "v" : 2.0, - "key" : { - "account" : 1, - "scmMetadata.revision" : 1, - "_id" : -1, - "pipeline" : 1 - }, - "name" : "account_1_scmMetadata.revision_1__id_-1_pipeline_1", - "partialFilterExpression" : { - "scmMetadata.revision" : { - "$exists" : true + "options": { + "partialFilterExpression": { + "scmMetadata.revision": { + "$exists": true + } } } }, { - "v" : 2.0, - "key" : { - "account" : 1, - "trigger" : 1, - "scmMetadata.userName" : 1, - "_id" : -1, - "pipeline" : 1 + "keys": { + "account": 1, + "trigger": 1, + "scmMetadata.userName": 1, + "_id": -1, + "pipeline": 1 }, - "name" : "account_1_trigger_1_scmMetadata.userName_1__id_-1_pipeline_1", - "partialFilterExpression" : { - "scmMetadata.userName" : { - "$exists" : true + "options": { + "partialFilterExpression": { + "scmMetadata.userName": { + "$exists": true + } } } }, { - "v" : 2.0, - "key" : { - "account" : 1, - "trigger" : 1, - "annotations.key" : 1, - "annotations.value" : 1, - "_id" : -1, - "pipeline" : 1 + "keys": { + "account": 1, + "trigger": 1, + "annotations.key": 1, + "annotations.value": 1, + "_id": -1, + "pipeline": 1 }, - "name" : "account_1_trigger_1_annotations.key_1_annotations.value_1__id_-1_pipeline_1", - "sparse" : true + "options": { + "sparse": true + } }, { - "v" : 2.0, - "key" : { - "account" : 1, - "trigger" : 1, - "pipelineTrigger" : 1, - "_id" : -1, - "pipeline" : 1 + "keys": { + "account": 1, + "trigger": 1, + "pipelineTrigger": 1, + "_id": -1, + "pipeline": 1 }, - "name" : "account_1_trigger_1_pipelineTrigger_1__id_-1_pipeline_1", - "partialFilterExpression" : { - "pipelineTrigger" : { - "$exists" : true + "options": { + "partialFilterExpression": { + "pipelineTrigger": { + "$exists": true + } } } }, { - "v" : 2.0, - "key" : { - "account" : 1, - "trigger" : 1, - "scmMetadata.branchName" : 1, - "_id" : -1, - "pipeline" : 1 + "keys": { + "account": 1, + "trigger": 1, + "scmMetadata.branchName": 1, + "_id": -1, + "pipeline": 1 }, - "name" : "account_1_trigger_1_scmMetadata.branchName_1__id_-1_pipeline_1", - "partialFilterExpression" : { - "scmMetadata.branchName" : { - "$exists" : true + "options": { + "partialFilterExpression": { + "scmMetadata.branchName": { + "$exists": true + } } } }, { - "v" : 2.0, - "key" : { - "account" : 1, - "trigger" : 1, - "_id" : -1, - "pipeline" : 1 - }, - "name" : "account_1_trigger_1__id_-1_pipeline_1" + "keys": { + "account": 1, + "trigger": 1, + "_id": -1, + "pipeline": 1 + } }, { - "v" : 2.0, - "key" : { - "account" : 1, - "trigger" : 1, - "scmMetadata.provider" : 1, - "_id" : -1, - "pipeline" : 1 + "keys": { + "account": 1, + "trigger": 1, + "scmMetadata.provider": 1, + "_id": -1, + "pipeline": 1 }, - "name" : "account_1_trigger_1_scmMetadata.provider_1__id_-1_pipeline_1", - "partialFilterExpression" : { - "scmMetadata.provider" : { - "$exists" : true + "options": { + "partialFilterExpression": { + "scmMetadata.provider": { + "$exists": true + } } } }, { - "v" : 2.0, - "key" : { - "account" : 1, - "trigger" : 1, - "scmMetadata.repoName" : 1, - "_id" : -1, - "pipeline" : 1 + "keys": { + "account": 1, + "trigger": 1, + "scmMetadata.repoName": 1, + "_id": -1, + "pipeline": 1 }, - "name" : "account_1_trigger_1_scmMetadata.repoName_1__id_-1_pipeline_1", - "partialFilterExpression" : { - "scmMetadata.repoName" : { - "$exists" : true + "options": { + "partialFilterExpression": { + "scmMetadata.repoName": { + "$exists": true + } } } }, { - "v" : 2.0, - "key" : { - "account" : 1, - "trigger" : 1, - "scmMetadata.provider" : 1, - "scmMetadata.event" : 1, - "_id" : -1, - "pipeline" : 1 - }, - "name" : "account_1_trigger_1_scmMetadata.provider_1_scmMetadata.event_1__id_-1_pipeline_1", - "partialFilterExpression" : { - "scmMetadata.event" : { - "$exists" : true - }, - "scmMetadata.provider" : { - "$exists" : true + "keys": { + "account": 1, + "trigger": 1, + "scmMetadata.provider": 1, + "scmMetadata.event": 1, + "_id": -1, + "pipeline": 1 + }, + "options": { + "partialFilterExpression": { + "scmMetadata.event": { + "$exists": true + }, + "scmMetadata.provider": { + "$exists": true + } } } }, { - "v" : 2.0, - "key" : { - "pipeline" : 1, - "_id" : -1 - }, - "name" : "pipeline_1__id_-1" + "keys": { + "pipeline": 1, + "_id": -1 + } } -] +] \ No newline at end of file diff --git a/indexes/read-models/analysisruns.json b/indexes/read-models/analysisruns.json index 2a5c93752..c20d7050f 100644 --- a/indexes/read-models/analysisruns.json +++ b/indexes/read-models/analysisruns.json @@ -1,332 +1,321 @@ [ { - "v" : 2.0, - "key" : { - "_id" : 1.0 + "keys": { + "__passiveReferencedBy.name": 1 }, - "name" : "_id_" - }, - { - "v" : 2.0, - "key" : { - "__passiveReferencedBy.name" : 1.0 - }, - "name" : "__passiveReferencedBy.name_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "__passiveReferencedBy.name" : 1.0, - "__passiveReferencedBy.kind" : 1.0, - "__passiveReferencedBy.namespace" : 1.0, - "__passiveReferencedBy.group" : 1.0, - "__passiveReferencedBy.version" : 1.0 + "keys": { + "__passiveReferencedBy.name": 1, + "__passiveReferencedBy.kind": 1, + "__passiveReferencedBy.namespace": 1, + "__passiveReferencedBy.group": 1, + "__passiveReferencedBy.version": 1 }, - "name" : "__passiveReferencedBy.name_1___passiveReferencedBy.kind_1___passiveReferencedBy.namespace_1___passiveReferencedBy.group_1___passiveReferencedBy.version_1", - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.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" + } } }, { - "v" : 2.0, - "key" : { - "__passiveReferences.name" : 1.0 + "keys": { + "__passiveReferences.name": 1 }, - "name" : "__passiveReferences.name_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "__passiveReferences.name" : 1.0, - "__passiveReferences.kind" : 1.0, - "__passiveReferences.namespace" : 1.0, - "__passiveReferences.group" : 1.0, - "__passiveReferences.version" : 1.0 + "keys": { + "__passiveReferences.name": 1, + "__passiveReferences.kind": 1, + "__passiveReferences.namespace": 1, + "__passiveReferences.group": 1, + "__passiveReferences.version": 1 }, - "name" : "__passiveReferences.name_1___passiveReferences.kind_1___passiveReferences.namespace_1___passiveReferences.group_1___passiveReferences.version_1", - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.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" + } } }, { - "v" : 2.0, - "key" : { - "__inferredReferencedBy.name" : 1.0 + "keys": { + "__inferredReferencedBy.name": 1 }, - "name" : "__inferredReferencedBy.name_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "__inferredReferencedBy.name" : 1.0, - "__inferredReferencedBy.kind" : 1.0, - "__inferredReferencedBy.namespace" : 1.0, - "__inferredReferencedBy.group" : 1.0, - "__inferredReferencedBy.version" : 1.0 + "keys": { + "__inferredReferencedBy.name": 1, + "__inferredReferencedBy.kind": 1, + "__inferredReferencedBy.namespace": 1, + "__inferredReferencedBy.group": 1, + "__inferredReferencedBy.version": 1 }, - "name" : "__inferredReferencedBy.name_1___inferredReferencedBy.kind_1___inferredReferencedBy.namespace_1___inferredReferencedBy.group_1___inferredReferencedBy.version_1", - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.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" + } } }, { - "v" : 2.0, - "key" : { - "__inferredReferences.name" : 1.0 + "keys": { + "__inferredReferences.name": 1 }, - "name" : "__inferredReferences.name_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "__inferredReferences.name" : 1.0, - "__inferredReferences.kind" : 1.0, - "__inferredReferences.namespace" : 1.0, - "__inferredReferences.group" : 1.0, - "__inferredReferences.version" : 1.0 + "keys": { + "__inferredReferences.name": 1, + "__inferredReferences.kind": 1, + "__inferredReferences.namespace": 1, + "__inferredReferences.group": 1, + "__inferredReferences.version": 1 }, - "name" : "__inferredReferences.name_1___inferredReferences.kind_1___inferredReferences.namespace_1___inferredReferences.group_1___inferredReferences.version_1", - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.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" + } } }, { - "v" : 2.0, - "key" : { - "updatedAt" : 1.0 + "keys": { + "updatedAt": 1 }, - "name" : "updatedAt_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "projects" : 1.0 + "keys": { + "projects": 1 }, - "name" : "projects_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "metadata.name" : 1.0 + "keys": { + "metadata.name": 1 }, - "name" : "metadata.name_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "metadata.labels" : 1.0 + "keys": { + "metadata.labels": 1 }, - "name" : "metadata.labels_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "metadata.accountId" : 1.0, - "metadata.runtime" : 1.0, - "metadata.cluster" : 1.0, - "metadata.namespace" : 1.0, - "metadata.group" : 1.0, - "metadata.version" : 1.0, - "metadata.kind" : 1.0, - "metadata.name" : 1.0, - "metadata.uid" : 1.0, - "metadata.revision" : 1.0 + "keys": { + "metadata.accountId": 1, + "metadata.runtime": 1, + "metadata.cluster": 1, + "metadata.namespace": 1, + "metadata.group": 1, + "metadata.version": 1, + "metadata.kind": 1, + "metadata.name": 1, + "metadata.uid": 1, + "metadata.revision": 1 }, - "name" : "metadata.accountId_1_metadata.runtime_1_metadata.cluster_1_metadata.namespace_1_metadata.group_1_metadata.version_1_metadata.kind_1_metadata.name_1_metadata.uid_1_metadata.revision_1", - "unique" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.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" + } } }, { - "v" : 2.0, - "key" : { - "metadata.accountId" : 1, - "revision" : 1, - "metadata.labels.rollout-type" : 1, - "metadata.runtime" : 1, - "metadata.labels.step-index" : 1 - }, - "name" : "metadata.accountId_1_revision_1_metadata.labels.rollout-type_1_metadata.runtime_1_metadata.labels.step-index_1" + "keys": { + "metadata.accountId": 1, + "revision": 1, + "metadata.labels.rollout-type": 1, + "metadata.runtime": 1, + "metadata.labels.step-index": 1 + } }, { - "v" : 2.0, - "key" : { - "metadata.accountId" : 1, - "revision" : 1, - "metadata.labels.rollout-type" : 1, - "metadata.runtime" : 1, - "metadata.creationTimestamp" : -1 - }, - "name" : "metadata.accountId_1_revision_1_metadata.labels.rollout-type_1_metadata.runtime_1_metadata.creationTimestamp_-1" + "keys": { + "metadata.accountId": 1, + "revision": 1, + "metadata.labels.rollout-type": 1, + "metadata.runtime": 1, + "metadata.creationTimestamp": -1 + } }, { - "v" : 2.0, - "key" : { - "ownerReferences.uid" : 1, - "revision" : 1 + "keys": { + "ownerReferences.uid": 1, + "revision": 1 }, - "name" : "ownerReferences.uid_1_revision_1", - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.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" + } } } -] +] \ No newline at end of file diff --git a/indexes/read-models/images-binaries.json b/indexes/read-models/images-binaries.json index 338df48e6..2cad65377 100644 --- a/indexes/read-models/images-binaries.json +++ b/indexes/read-models/images-binaries.json @@ -1,95 +1,86 @@ [ { - "v" : 2.0, - "key" : { - "_id" : 1.0 + "keys": { + "accountId": 1, + "imageName": 1, + "repositoryName": 1 }, - "name" : "_id_" - }, - { - "v" : 2.0, - "key" : { - "accountId" : 1.0, - "imageName" : 1.0, - "repositoryName" : 1.0 - }, - "name" : "accountId_1_imageName_1_repositoryName_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "accountId" : 1.0, - "repositoryName" : 1.0, - "gitRepository" : 1.0 + "keys": { + "accountId": 1, + "repositoryName": 1, + "gitRepository": 1 }, - "name" : "accountId_1_repositoryName_1_gitRepository_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "accountId" : 1.0, - "repositoryName" : 1.0, - "branch" : 1.0 + "keys": { + "accountId": 1, + "repositoryName": 1, + "branch": 1 }, - "name" : "accountId_1_repositoryName_1_branch_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "runtime.name" : 1.0 + "keys": { + "runtime.name": 1 }, - "name" : "runtime.name_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "accountId" : 1.0, - "repoDigest" : 1.0 + "keys": { + "accountId": 1, + "repoDigest": 1 }, - "name" : "accountId_1_repoDigest_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "accountId" : 1.0, - "internalImageId" : 1.0 + "keys": { + "accountId": 1, + "internalImageId": 1 }, - "name" : "accountId_1_internalImageId_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "accountId" : 1, - "binaryId" : 1, - "lastUpdate" : -1, - "_id" : -1 - }, - "name" : "accountId_1_binaryId_1_lastUpdate_-1__id_-1" + "keys": { + "accountId": 1, + "binaryId": 1, + "lastUpdate": -1, + "_id": -1 + } }, { - "v" : 2.0, - "key" : { - "accountId" : 1, - "imageName" : 1 + "keys": { + "accountId": 1, + "imageName": 1 }, - "name" : "accountId_1_imageName_1", - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.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" + } } } -] +] \ No newline at end of file diff --git a/indexes/read-models/releases.json b/indexes/read-models/releases.json index e48f117e5..e0faf171a 100644 --- a/indexes/read-models/releases.json +++ b/indexes/read-models/releases.json @@ -1,196 +1,177 @@ [ { - "v" : 2.0, - "key" : { - "_id" : 1.0 + "keys": { + "applicationMetadata.name": 1 }, - "name" : "_id_" + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "applicationMetadata.name" : 1.0 + "keys": { + "applicationMetadata.labels": 1 }, - "name" : "applicationMetadata.name_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "applicationMetadata.labels" : 1.0 + "keys": { + "application.prs.type": 1 }, - "name" : "applicationMetadata.labels_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "application.prs.type" : 1.0 + "keys": { + "application.prs.key": 1 }, - "name" : "application.prs.type_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "application.prs.key" : 1.0 + "keys": { + "application.prs.accountId": 1 }, - "name" : "application.prs.key_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "application.prs.accountId" : 1.0 + "keys": { + "application.issues.type": 1 }, - "name" : "application.prs.accountId_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "application.issues.type" : 1.0 + "keys": { + "application.issues.key": 1 }, - "name" : "application.issues.type_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "application.issues.key" : 1.0 + "keys": { + "application.issues.accountId": 1 }, - "name" : "application.issues.key_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "application.issues.accountId" : 1.0 + "keys": { + "applicationMetadata.accountId": 1, + "applicationMetadata.runtime": 1, + "applicationMetadata.name": 1, + "applicationMetadata.namespace": 1, + "application.issues.key": 1 }, - "name" : "application.issues.accountId_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "applicationMetadata.accountId" : 1.0, - "applicationMetadata.runtime" : 1.0, - "applicationMetadata.name" : 1.0, - "applicationMetadata.namespace" : 1.0, - "application.issues.key" : 1.0 + "keys": { + "applicationMetadata.accountId": 1, + "applicationMetadata.runtime": 1, + "applicationMetadata.name": 1, + "applicationMetadata.namespace": 1, + "application.prs.key": 1 }, - "name" : "applicationMetadata.accountId_1_applicationMetadata.runtime_1_applicationMetadata.name_1_applicationMetadata.namespace_1_application.issues.key_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "applicationMetadata.accountId" : 1.0, - "applicationMetadata.runtime" : 1.0, - "applicationMetadata.name" : 1.0, - "applicationMetadata.namespace" : 1.0, - "application.prs.key" : 1.0 + "keys": { + "applicationMetadata.accountId": 1, + "applicationMetadata.runtime": 1, + "applicationMetadata.name": 1, + "applicationMetadata.namespace": 1, + "application.committers.userName": 1 }, - "name" : "applicationMetadata.accountId_1_applicationMetadata.runtime_1_applicationMetadata.name_1_applicationMetadata.namespace_1_application.prs.key_1", - "background" : true + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "applicationMetadata.accountId" : 1.0, - "applicationMetadata.runtime" : 1.0, - "applicationMetadata.name" : 1.0, - "applicationMetadata.namespace" : 1.0, - "application.committers.userName" : 1.0 + "keys": { + "applicationMetadata.accountId": 1, + "applicationMetadata.runtime": 1, + "applicationMetadata.name": 1, + "applicationMetadata.namespace": 1, + "applicationMetadata.group": 1, + "applicationMetadata.version": 1, + "applicationMetadata.kind": 1, + "historyId": -1 }, - "name" : "applicationMetadata.accountId_1_applicationMetadata.runtime_1_applicationMetadata.name_1_applicationMetadata.namespace_1_application.committers.userName_1", - "background" : true - }, - { - "v" : 2.0, - "key" : { - "applicationMetadata.accountId" : 1.0, - "applicationMetadata.runtime" : 1.0, - "applicationMetadata.name" : 1.0, - "applicationMetadata.namespace" : 1.0, - "applicationMetadata.group" : 1.0, - "applicationMetadata.version" : 1.0, - "applicationMetadata.kind" : 1.0, - "historyId" : -1.0 - }, - "name" : "applicationMetadata.accountId_1_applicationMetadata.runtime_1_applicationMetadata.name_1_applicationMetadata.namespace_1_applicationMetadata.group_1_applicationMetadata.version_1_applicationMetadata.kind_1_historyId_-1", - "background" : true, - "unique" : true - }, - { - "v" : 2.0, - "key" : { - "applicationMetadata.accountId" : 1.0, - "applicationMetadata.runtime" : 1.0, - "applicationMetadata.name" : 1.0, - "applicationMetadata.namespace" : 1.0, - "applicationMetadata.group" : 1.0, - "applicationMetadata.version" : 1.0, - "reportedToJira" : 1.0, - "historyId" : 1.0, - "application.status.syncStartedAt" : 1.0 - }, - "name" : "applicationMetadata.accountId_1_applicationMetadata.runtime_1_applicationMetadata.name_1_applicationMetadata.namespace_1_applicationMetadata.group_1_applicationMetadata.version_1_reportedToJira_1_historyId_1_application.status.syncStartedAt_1", - "background" : true + "options": { + "background": true, + "unique": true + } }, { - "v" : 2.0, - "key" : { - "fromState.services.revision" : 1, - "fromState.services.name" : 1, - "applicationMetadata.accountId" : 1 + "keys": { + "applicationMetadata.accountId": 1, + "applicationMetadata.runtime": 1, + "applicationMetadata.name": 1, + "applicationMetadata.namespace": 1, + "applicationMetadata.group": 1, + "applicationMetadata.version": 1, + "reportedToJira": 1, + "historyId": 1, + "application.status.syncStartedAt": 1 }, - "name" : "fromState.services.revision_1_fromState.services.name_1_applicationMetadata.accountId_1" + "options": { + "background": true + } }, { - "v" : 2.0, - "key" : { - "syncOperationRevision" : 1, - "applicationMetadata.name" : 1, - "applicationMetadata.accountId" : 1, - "historyId" : -1 - }, - "name" : "syncOperationRevision_1_applicationMetadata.name_1_applicationMetadata.accountId_1_historyId_-1" + "keys": { + "fromState.services.revision": 1, + "fromState.services.name": 1, + "applicationMetadata.accountId": 1 + } }, { - "v" : 2.0, - "key" : { - "applicationMetadata.name" : 1, - "applicationMetadata.accountId" : 1, - "historyId" : -1 - }, - "name" : "applicationMetadata.name_1_applicationMetadata.accountId_1_historyId_-1" + "keys": { + "syncOperationRevision": 1, + "applicationMetadata.name": 1, + "applicationMetadata.accountId": 1, + "historyId": -1 + } }, { - "v" : 2.0, - "key" : { - "applicationMetadata.name" : 1, - "applicationMetadata.accountId" : 1, - "application.status.healthStatus" : 1 - }, - "name" : "applicationMetadata.name_1_applicationMetadata.accountId_1_application.status.healthStatus_1" + "keys": { + "applicationMetadata.name": 1, + "applicationMetadata.accountId": 1, + "historyId": -1 + } }, { - "v" : 2.0, - "key" : { - "applicationMetadata.name" : 1, - "applicationMetadata.accountId" : 1, - "current" : 1 - }, - "name" : "applicationMetadata.name_1_applicationMetadata.accountId_1_current_1" - }, - { - "v" : 2.0, - "key" : { - "application.status.revision" : 1, - "applicationMetadata.name" : 1, - "applicationMetadata.accountId" : 1 - }, - "name" : "application.status.revision_1_applicationMetadata.name_1_applicationMetadata.accountId_1" + "keys": { + "applicationMetadata.name": 1, + "applicationMetadata.accountId": 1, + "application.status.healthStatus": 1 + } + }, + { + "keys": { + "applicationMetadata.name": 1, + "applicationMetadata.accountId": 1, + "current": 1 + } + }, + { + "keys": { + "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 7d4519f14..873855b69 100644 --- a/indexes/read-models/rollouts.json +++ b/indexes/read-models/rollouts.json @@ -1,393 +1,386 @@ [ { - "v" : 2.0, - "key" : { - "_id" : 1.0 + "keys": { + "__passiveReferencedBy.name": 1 }, - "name" : "_id_" - }, - { - "v" : 2.0, - "key" : { - "__passiveReferencedBy.name" : 1.0 - }, - "name" : "__passiveReferencedBy.name_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "__passiveReferencedBy.name" : 1.0, - "__passiveReferencedBy.kind" : 1.0, - "__passiveReferencedBy.namespace" : 1.0, - "__passiveReferencedBy.group" : 1.0, - "__passiveReferencedBy.version" : 1.0 + "keys": { + "__passiveReferencedBy.name": 1, + "__passiveReferencedBy.kind": 1, + "__passiveReferencedBy.namespace": 1, + "__passiveReferencedBy.group": 1, + "__passiveReferencedBy.version": 1 }, - "name" : "__passiveReferencedBy.name_1___passiveReferencedBy.kind_1___passiveReferencedBy.namespace_1___passiveReferencedBy.group_1___passiveReferencedBy.version_1", - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.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" + } } }, { - "v" : 2.0, - "key" : { - "__passiveReferences.name" : 1.0 + "keys": { + "__passiveReferences.name": 1 }, - "name" : "__passiveReferences.name_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "__passiveReferences.name" : 1.0, - "__passiveReferences.kind" : 1.0, - "__passiveReferences.namespace" : 1.0, - "__passiveReferences.group" : 1.0, - "__passiveReferences.version" : 1.0 + "keys": { + "__passiveReferences.name": 1, + "__passiveReferences.kind": 1, + "__passiveReferences.namespace": 1, + "__passiveReferences.group": 1, + "__passiveReferences.version": 1 }, - "name" : "__passiveReferences.name_1___passiveReferences.kind_1___passiveReferences.namespace_1___passiveReferences.group_1___passiveReferences.version_1", - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.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" + } } }, { - "v" : 2.0, - "key" : { - "__inferredReferencedBy.name" : 1.0 + "keys": { + "__inferredReferencedBy.name": 1 }, - "name" : "__inferredReferencedBy.name_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "__inferredReferencedBy.name" : 1.0, - "__inferredReferencedBy.kind" : 1.0, - "__inferredReferencedBy.namespace" : 1.0, - "__inferredReferencedBy.group" : 1.0, - "__inferredReferencedBy.version" : 1.0 + "keys": { + "__inferredReferencedBy.name": 1, + "__inferredReferencedBy.kind": 1, + "__inferredReferencedBy.namespace": 1, + "__inferredReferencedBy.group": 1, + "__inferredReferencedBy.version": 1 }, - "name" : "__inferredReferencedBy.name_1___inferredReferencedBy.kind_1___inferredReferencedBy.namespace_1___inferredReferencedBy.group_1___inferredReferencedBy.version_1", - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.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" + } } }, { - "v" : 2.0, - "key" : { - "__inferredReferences.name" : 1.0 + "keys": { + "__inferredReferences.name": 1 }, - "name" : "__inferredReferences.name_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "__inferredReferences.name" : 1.0, - "__inferredReferences.kind" : 1.0, - "__inferredReferences.namespace" : 1.0, - "__inferredReferences.group" : 1.0, - "__inferredReferences.version" : 1.0 + "keys": { + "__inferredReferences.name": 1, + "__inferredReferences.kind": 1, + "__inferredReferences.namespace": 1, + "__inferredReferences.group": 1, + "__inferredReferences.version": 1 }, - "name" : "__inferredReferences.name_1___inferredReferences.kind_1___inferredReferences.namespace_1___inferredReferences.group_1___inferredReferences.version_1", - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.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" + } } }, { - "v" : 2.0, - "key" : { - "updatedAt" : 1.0 + "keys": { + "updatedAt": 1 }, - "name" : "updatedAt_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "projects" : 1.0 + "keys": { + "projects": 1 }, - "name" : "projects_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "metadata.name" : 1.0 + "keys": { + "metadata.name": 1 }, - "name" : "metadata.name_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "metadata.labels" : 1.0 + "keys": { + "metadata.labels": 1 }, - "name" : "metadata.labels_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "source.syncStartedAt" : 1.0 + "keys": { + "source.syncStartedAt": 1 }, - "name" : "source.syncStartedAt_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "source.gitSource" : 1.0 + "keys": { + "source.gitSource": 1 }, - "name" : "source.gitSource_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "metadata.accountId" : 1.0, - "metadata.runtime" : 1.0, - "metadata.cluster" : 1.0, - "metadata.namespace" : 1.0, - "metadata.group" : 1.0, - "metadata.version" : 1.0, - "metadata.kind" : 1.0, - "metadata.name" : 1.0, - "metadata.revision" : 1.0, - "metadata.uid" : 1.0, - "metadata.labels.app\\u002ekubernetes\\u002eio/instance" : 1.0 + "keys": { + "metadata.accountId": 1, + "metadata.runtime": 1, + "metadata.cluster": 1, + "metadata.namespace": 1, + "metadata.group": 1, + "metadata.version": 1, + "metadata.kind": 1, + "metadata.name": 1, + "metadata.revision": 1, + "metadata.uid": 1, + "metadata.labels.app\\u002ekubernetes\\u002eio/instance": 1 }, - "name" : "metadata.accountId_1_metadata.runtime_1_metadata.cluster_1_metadata.namespace_1_metadata.group_1_metadata.version_1_metadata.kind_1_metadata.name_1_metadata.revision_1_metadata.uid_1_metadata.labels.app\\u002ekubernetes\\u002eio/instance_1", - "unique" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.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" + } } }, { - "v" : 2.0, - "key" : { - "source.gitSourceUID" : 1.0 + "keys": { + "source.gitSourceUID": 1 }, - "name" : "source.gitSourceUID_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "source.gitSourceNamespace" : 1.0 + "keys": { + "source.gitSourceNamespace": 1 }, - "name" : "source.gitSourceNamespace_1", - "background" : true, - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.1" + "options": { + "background": 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" + } } }, { - "v" : 2.0, - "key" : { - "metadata.appName" : 1, - "metadata.accountId" : 1, - "metadata.runtime" : 1, - "_id" : -1 + "keys": { + "metadata.appName": 1, + "metadata.accountId": 1, + "metadata.runtime": 1, + "_id": -1 }, - "name" : "metadata.appName_1_metadata.accountId_1_metadata.runtime_1__id_-1", - "collation" : { - "locale" : "en_US", - "caseLevel" : false, - "caseFirst" : "off", - "strength" : 1.0, - "numericOrdering" : false, - "alternate" : "non-ignorable", - "maxVariable" : "punct", - "normalization" : false, - "backwards" : false, - "version" : "57.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" + } } } -] +] \ No newline at end of file From 9628417a73351753d18a1a4c494943257af38d84 Mon Sep 17 00:00:00 2001 From: Vasil Sudakou Date: Wed, 4 Jun 2025 14:14:48 +0400 Subject: [PATCH 3/6] fix: README.md --- codefresh/README.md | 130 ++++++++++++++++++++++++++++-------- codefresh/README.md.gotmpl | 131 +++++++++++++++++++++++++++++-------- 2 files changed, 206 insertions(+), 55 deletions(-) diff --git a/codefresh/README.md b/codefresh/README.md index 592adb052..e033ba36b 100644 --- a/codefresh/README.md +++ b/codefresh/README.md @@ -34,6 +34,7 @@ Helm chart for deploying [Codefresh On-Premises](https://codefresh.io/docs/docs/ - [Enable session cookie](#enable-session-cookie) - [X-Frame-Options response header](#x-frame-options-response-header) - [Configuring OIDC Provider](#configuring-oidc-provider) +- [Maintaining MongoDB indexes](#maintaining-mongodb-indexes) - [Upgrading](#upgrading) - [To 2.0.0](#to-200) - [To 2.0.12](#to-2012) @@ -88,7 +89,7 @@ imageCredentials: password: '{ "type": "service_account", "project_id": "codefresh-enterprise", "private_key_id": ... }' ``` -- Specify `.Values.global.appUrl`, `.Values.global.firebaseUrl` and `.Values.global.firebaseSecret` +- Specify `.Values.global.appUrl`, `.Values.global.firebaseUrl`, `.Values.global.firebaseSecret`, `.Values.global.env.MONGOOSE_AUTO_INDEX`, `.Values.global.env.MONGO_AUTOMATIC_INDEX_CREATION` ```yaml global: @@ -112,6 +113,14 @@ global: # firebaseSecretSecretKeyRef: # name: my-secret # key: firebase-secret + + # -- Enable index creation in MongoDB + # This is required for first-time installations! + # Before usage in Production, you must set it to `false` or remove it! + env: + MONGOOSE_AUTO_INDEX: "true" + MONGO_AUTOMATIC_INDEX_CREATION: "true" + ``` - Specify `.Values.ingress.tls.cert` and `.Values.ingress.tls.key` OR `.Values.ingress.tls.existingSecret` @@ -167,6 +176,17 @@ ingress-nginx: --timeout 15m ``` +### ⚠️ **MANDATORY** Post-Installation Action Items + +Once your Codefresh On-Prem instance is installed, configured, and confirmed to be ready for production use, the following variables must be set to `false` or removed: + +```yaml +global: + env: + MONGOOSE_AUTO_INDEX: "false" + MONGO_AUTOMATIC_INDEX_CREATION: "false" +``` + ## Chart Configuration See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands: @@ -1391,6 +1411,84 @@ To see all the claims supported by Codefresh OIDC provider, see `claims_supporte Use [obtain-oidc-id-token](https://github.com/codefresh-io/steps/blob/822afc0a9a128384e76459c6573628020a2cf404/incubating/obtain-oidc-id-token/step.yaml#L27-L58) and [aws-sts-assume-role-with-web-identity](https://github.com/codefresh-io/steps/blob/822afc0a9a128384e76459c6573628020a2cf404/incubating/aws-sts-assume-role-with-web-identity/step.yaml#L29-L63) steps to exchange the OIDC token (JWT) for a cloud access token. +## Maintaining MongoDB Indexes + +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. + +### Index alignment + +The required index definitions for each release can be found at the following resources: + +- `2.6` + +The indexes are stored in JSON files with keys and options specified. + +The directory structure is: + +```console +indexes +├── # MongoDB database name +│ ├── .json # MongoDB indexes for the specified collection +``` + +**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.) +3. 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.** +> +> 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)) +> +> Even minor changes to indexes (e.g., index removal) can cause brief but noticeable performance degradation ([*Source: MongoDB official documentation*](https://www.mongodb.com/docs/manual/core/query-plans/#plan-cache-flushes)) + +#### Self-hosted MongoDB + +For self-hosted MongoDB, follow the instructions below: + +- Connect to the MongoDB server using the [mongosh](https://www.mongodb.com/docs/mongodb-shell/install/) shell. Open your terminal or command prompt and run the following command, replacing `` with the appropriate MongoDB connection string for your server: + +```shell +mongosh "" +``` + +- Retrieve the list of indexes for a specific collection: + +```js +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 + +**Index creation** + +> ⚠ **Note! Always create indexes sequentially, one by one. Don't create them in bulk.** + +- To create an index, use the `createIndex()` method: + +```js +db.getSiblingDB('').getCollection('').createIndex(, ) +``` + +After executing the `createIndex()` command, you should see a result indicating that the index was created successfully. + +**Index removal** + +- To remove an index, use the `dropIndex()` method with either the `` or a ``: + +```js +db.getSiblingDB('').getCollection('').dropIndex('' | ) +``` + +#### Atlas Database + +If you're hosting MongoDB on [Atlas](https://www.mongodb.com/atlas/database), use the following [Manage Indexes](https://www.mongodb.com/docs/atlas/atlas-ui/indexes/) guide to View, Create or Remove indexes. + +> ⚠️ **Important!** In Atlas in production environment the indexes must be created in *a rolling fashion* mode, i.e., with `Build index via rolling process` checkbox enabled. + ## Upgrading ### To 2.0.0 @@ -1926,6 +2024,10 @@ cfapi: ### To 2.6.0 +> ⚠️ **WARNING! MongoDB indexes changed!** +> +> Please, follow [Maintaining MongoDB indexes](#maintaining-mongodb-indexes) guide to meet index requirements **BEFORE** the upgrade process. + ### [What's new in 2.6.x](https://codefresh.io/docs/docs/whats-new/on-prem-release-notes/#on-premises-version-26) #### Affected values @@ -1964,32 +2066,6 @@ cfapi: digest: "" ``` -#### Auto-index creation in MongoDB - -In Codefresh On-Prem 2.6.x, the `cfapi` can create indexes in MongoDB automatically. This feature is disabled by default. To enable it, set the following environment variable: - -> **Note!** Enabling this feature can cause performance degradation during the index creation process. - -> **Note!** It is recommended to add indexes during a maintenance window. The indexes list is provided in `codefresh/files/indexes//.json` files. - -```yaml -cfapi: - container: - env: - MONGOOSE_AUTO_INDEX: "true" -``` - -```yaml -argo-platform: - api-graphql: - env: - MONGO_AUTOMATIC_INDEX_CREATION: "true" -``` - -Ref: -- [Create an Index in Atlas DB](https://www.mongodb.com/docs/atlas/atlas-ui/indexes/#create-an-index) -- [Create an Index with mongosh](https://www.mongodb.com/docs/manual/reference/method/db.collection.createIndex/) - ## Troubleshooting ### Error: Failed to validate connection to Docker daemon; caused by Error: certificate has expired diff --git a/codefresh/README.md.gotmpl b/codefresh/README.md.gotmpl index e0b6a6f5a..703a0a04d 100644 --- a/codefresh/README.md.gotmpl +++ b/codefresh/README.md.gotmpl @@ -34,6 +34,7 @@ Helm chart for deploying [Codefresh On-Premises](https://codefresh.io/docs/docs/ - [Enable session cookie](#enable-session-cookie) - [X-Frame-Options response header](#x-frame-options-response-header) - [Configuring OIDC Provider](#configuring-oidc-provider) +- [Maintaining MongoDB indexes](#maintaining-mongodb-indexes) - [Upgrading](#upgrading) - [To 2.0.0](#to-200) - [To 2.0.12](#to-2012) @@ -89,7 +90,7 @@ imageCredentials: password: '{ "type": "service_account", "project_id": "codefresh-enterprise", "private_key_id": ... }' ``` -- Specify `.Values.global.appUrl`, `.Values.global.firebaseUrl` and `.Values.global.firebaseSecret` +- Specify `.Values.global.appUrl`, `.Values.global.firebaseUrl`, `.Values.global.firebaseSecret`, `.Values.global.env.MONGOOSE_AUTO_INDEX`, `.Values.global.env.MONGO_AUTOMATIC_INDEX_CREATION` ```yaml global: @@ -113,6 +114,14 @@ global: # firebaseSecretSecretKeyRef: # name: my-secret # key: firebase-secret + + # -- Enable index creation in MongoDB + # This is required for first-time installations! + # Before usage in Production, you must set it to `false` or remove it! + env: + MONGOOSE_AUTO_INDEX: "true" + MONGO_AUTOMATIC_INDEX_CREATION: "true" + ``` - Specify `.Values.ingress.tls.cert` and `.Values.ingress.tls.key` OR `.Values.ingress.tls.existingSecret` @@ -168,6 +177,17 @@ ingress-nginx: --timeout 15m ``` +### ⚠️ **MANDATORY** Post-Installation Action Items + +Once your Codefresh On-Prem instance is installed, configured, and confirmed to be ready for production use, the following variables must be set to `false` or removed: + +```yaml +global: + env: + MONGOOSE_AUTO_INDEX: "false" + MONGO_AUTOMATIC_INDEX_CREATION: "false" +``` + ## Chart Configuration See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands: @@ -1397,6 +1417,84 @@ To see all the claims supported by Codefresh OIDC provider, see `claims_supporte Use [obtain-oidc-id-token](https://github.com/codefresh-io/steps/blob/822afc0a9a128384e76459c6573628020a2cf404/incubating/obtain-oidc-id-token/step.yaml#L27-L58) and [aws-sts-assume-role-with-web-identity](https://github.com/codefresh-io/steps/blob/822afc0a9a128384e76459c6573628020a2cf404/incubating/aws-sts-assume-role-with-web-identity/step.yaml#L29-L63) steps to exchange the OIDC token (JWT) for a cloud access token. +## Maintaining MongoDB Indexes + +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. + +### Index alignment + +The required index definitions for each release can be found at the following resources: + +- `2.6` + +The indexes are stored in JSON files with keys and options specified. + +The directory structure is: + +```console +indexes +├── # MongoDB database name +│ ├── .json # MongoDB indexes for the specified collection +``` + +**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.) +3. 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.** +> +> 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)) +> +> Even minor changes to indexes (e.g., index removal) can cause brief but noticeable performance degradation ([*Source: MongoDB official documentation*](https://www.mongodb.com/docs/manual/core/query-plans/#plan-cache-flushes)) + +#### Self-hosted MongoDB + +For self-hosted MongoDB, follow the instructions below: + +- Connect to the MongoDB server using the [mongosh](https://www.mongodb.com/docs/mongodb-shell/install/) shell. Open your terminal or command prompt and run the following command, replacing `` with the appropriate MongoDB connection string for your server: + + +```shell +mongosh "" +``` + +- Retrieve the list of indexes for a specific collection: + +```js +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 + +**Index creation** + +> ⚠ **Note! Always create indexes sequentially, one by one. Don't create them in bulk.** + +- To create an index, use the `createIndex()` method: + +```js +db.getSiblingDB('').getCollection('').createIndex(, ) +``` + +After executing the `createIndex()` command, you should see a result indicating that the index was created successfully. + +**Index removal** + +- To remove an index, use the `dropIndex()` method with either the `` or a ``: + +```js +db.getSiblingDB('').getCollection('').dropIndex('' | ) +``` + +#### Atlas Database + +If you're hosting MongoDB on [Atlas](https://www.mongodb.com/atlas/database), use the following [Manage Indexes](https://www.mongodb.com/docs/atlas/atlas-ui/indexes/) guide to View, Create or Remove indexes. + +> ⚠️ **Important!** In Atlas in production environment the indexes must be created in *a rolling fashion* mode, i.e., with `Build index via rolling process` checkbox enabled. ## Upgrading @@ -1934,6 +2032,10 @@ cfapi: ### To 2.6.0 +> ⚠️ **WARNING! MongoDB indexes changed!** +> +> Please, follow [Maintaining MongoDB indexes](#maintaining-mongodb-indexes) guide to meet index requirements **BEFORE** the upgrade process. + ### [What's new in 2.6.x](https://codefresh.io/docs/docs/whats-new/on-prem-release-notes/#on-premises-version-26) #### Affected values @@ -1972,33 +2074,6 @@ cfapi: digest: "" ``` -#### Auto-index creation in MongoDB - -In Codefresh On-Prem 2.6.x, the `cfapi` can create indexes in MongoDB automatically. This feature is disabled by default. To enable it, set the following environment variable: - -> **Note!** Enabling this feature can cause performance degradation during the index creation process. - -> **Note!** It is recommended to add indexes during a maintenance window. The indexes list is provided in `codefresh/files/indexes//.json` files. - -```yaml -cfapi: - container: - env: - MONGOOSE_AUTO_INDEX: "true" -``` - -```yaml -argo-platform: - api-graphql: - env: - MONGO_AUTOMATIC_INDEX_CREATION: "true" -``` - -Ref: -- [Create an Index in Atlas DB](https://www.mongodb.com/docs/atlas/atlas-ui/indexes/#create-an-index) -- [Create an Index with mongosh](https://www.mongodb.com/docs/manual/reference/method/db.collection.createIndex/) - - ## Troubleshooting ### Error: Failed to validate connection to Docker daemon; caused by Error: certificate has expired From 3b85fdecaf6f89e0463ffc30548d0eff58e6f2f5 Mon Sep 17 00:00:00 2001 From: Vasil Sudakou Date: Wed, 4 Jun 2025 14:34:45 +0400 Subject: [PATCH 4/6] fix: README.md --- codefresh/README.md | 3 ++- codefresh/README.md.gotmpl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/codefresh/README.md b/codefresh/README.md index e033ba36b..9752022bf 100644 --- a/codefresh/README.md +++ b/codefresh/README.md @@ -1437,7 +1437,8 @@ indexes 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.) -3. Then remove any unnecessary 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.** > diff --git a/codefresh/README.md.gotmpl b/codefresh/README.md.gotmpl index 703a0a04d..de8ccfda6 100644 --- a/codefresh/README.md.gotmpl +++ b/codefresh/README.md.gotmpl @@ -1443,7 +1443,8 @@ indexes 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.) -3. Then remove any unnecessary 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.** > From 74f0090ff899ae8ec69dc3db588454609caec7a7 Mon Sep 17 00:00:00 2001 From: Vasil Sudakou Date: Wed, 4 Jun 2025 20:57:06 +0400 Subject: [PATCH 5/6] fix: indexes --- indexes/read-models/analysisruns.json | 8 ----- indexes/read-models/images-binaries.json | 18 ------------ indexes/read-models/releases.json | 37 ------------------------ indexes/read-models/rollouts.json | 12 -------- 4 files changed, 75 deletions(-) diff --git a/indexes/read-models/analysisruns.json b/indexes/read-models/analysisruns.json index c20d7050f..7c8071247 100644 --- a/indexes/read-models/analysisruns.json +++ b/indexes/read-models/analysisruns.json @@ -4,7 +4,6 @@ "__passiveReferencedBy.name": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -47,7 +46,6 @@ "__passiveReferences.name": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -90,7 +88,6 @@ "__inferredReferencedBy.name": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -133,7 +130,6 @@ "__inferredReferences.name": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -176,7 +172,6 @@ "updatedAt": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -196,7 +191,6 @@ "projects": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -216,7 +210,6 @@ "metadata.name": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -236,7 +229,6 @@ "metadata.labels": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, diff --git a/indexes/read-models/images-binaries.json b/indexes/read-models/images-binaries.json index 2cad65377..c8efda894 100644 --- a/indexes/read-models/images-binaries.json +++ b/indexes/read-models/images-binaries.json @@ -4,9 +4,6 @@ "accountId": 1, "imageName": 1, "repositoryName": 1 - }, - "options": { - "background": true } }, { @@ -14,9 +11,6 @@ "accountId": 1, "repositoryName": 1, "gitRepository": 1 - }, - "options": { - "background": true } }, { @@ -24,35 +18,23 @@ "accountId": 1, "repositoryName": 1, "branch": 1 - }, - "options": { - "background": true } }, { "keys": { "runtime.name": 1 - }, - "options": { - "background": true } }, { "keys": { "accountId": 1, "repoDigest": 1 - }, - "options": { - "background": true } }, { "keys": { "accountId": 1, "internalImageId": 1 - }, - "options": { - "background": true } }, { diff --git a/indexes/read-models/releases.json b/indexes/read-models/releases.json index e0faf171a..731a06bb0 100644 --- a/indexes/read-models/releases.json +++ b/indexes/read-models/releases.json @@ -2,65 +2,41 @@ { "keys": { "applicationMetadata.name": 1 - }, - "options": { - "background": true } }, { "keys": { "applicationMetadata.labels": 1 - }, - "options": { - "background": true } }, { "keys": { "application.prs.type": 1 - }, - "options": { - "background": true } }, { "keys": { "application.prs.key": 1 - }, - "options": { - "background": true } }, { "keys": { "application.prs.accountId": 1 - }, - "options": { - "background": true } }, { "keys": { "application.issues.type": 1 - }, - "options": { - "background": true } }, { "keys": { "application.issues.key": 1 - }, - "options": { - "background": true } }, { "keys": { "application.issues.accountId": 1 - }, - "options": { - "background": true } }, { @@ -70,9 +46,6 @@ "applicationMetadata.name": 1, "applicationMetadata.namespace": 1, "application.issues.key": 1 - }, - "options": { - "background": true } }, { @@ -82,9 +55,6 @@ "applicationMetadata.name": 1, "applicationMetadata.namespace": 1, "application.prs.key": 1 - }, - "options": { - "background": true } }, { @@ -94,9 +64,6 @@ "applicationMetadata.name": 1, "applicationMetadata.namespace": 1, "application.committers.userName": 1 - }, - "options": { - "background": true } }, { @@ -111,7 +78,6 @@ "historyId": -1 }, "options": { - "background": true, "unique": true } }, @@ -126,9 +92,6 @@ "reportedToJira": 1, "historyId": 1, "application.status.syncStartedAt": 1 - }, - "options": { - "background": true } }, { diff --git a/indexes/read-models/rollouts.json b/indexes/read-models/rollouts.json index 873855b69..0bb53806c 100644 --- a/indexes/read-models/rollouts.json +++ b/indexes/read-models/rollouts.json @@ -4,7 +4,6 @@ "__passiveReferencedBy.name": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -47,7 +46,6 @@ "__passiveReferences.name": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -90,7 +88,6 @@ "__inferredReferencedBy.name": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -133,7 +130,6 @@ "__inferredReferences.name": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -176,7 +172,6 @@ "updatedAt": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -196,7 +191,6 @@ "projects": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -216,7 +210,6 @@ "metadata.name": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -236,7 +229,6 @@ "metadata.labels": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -256,7 +248,6 @@ "source.syncStartedAt": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -276,7 +267,6 @@ "source.gitSource": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -326,7 +316,6 @@ "source.gitSourceUID": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, @@ -346,7 +335,6 @@ "source.gitSourceNamespace": 1 }, "options": { - "background": true, "collation": { "locale": "en_US", "caseLevel": false, From a1a59177f0224d5d7b6efd7f05c6262a413321da Mon Sep 17 00:00:00 2001 From: Vasil Sudakou Date: Wed, 4 Jun 2025 20:59:08 +0400 Subject: [PATCH 6/6] fix: README.md --- codefresh/README.md | 6 +++--- codefresh/README.md.gotmpl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/codefresh/README.md b/codefresh/README.md index 9752022bf..d21a6b70e 100644 --- a/codefresh/README.md +++ b/codefresh/README.md @@ -1478,17 +1478,17 @@ After executing the `createIndex()` command, you should see a result indicating **Index removal** -- To remove an index, use the `dropIndex()` method with either the `` or a ``: +- To remove an index, use the `dropIndex()` method with ``: ```js -db.getSiblingDB('').getCollection('').dropIndex('' | ) +db.getSiblingDB('').getCollection('').dropIndex('') ``` #### Atlas Database If you're hosting MongoDB on [Atlas](https://www.mongodb.com/atlas/database), use the following [Manage Indexes](https://www.mongodb.com/docs/atlas/atlas-ui/indexes/) guide to View, Create or Remove indexes. -> ⚠️ **Important!** In Atlas in production environment the indexes must be created in *a rolling fashion* mode, i.e., with `Build index via rolling process` checkbox enabled. +> ⚠️ **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/)) ## Upgrading diff --git a/codefresh/README.md.gotmpl b/codefresh/README.md.gotmpl index de8ccfda6..f235ed00b 100644 --- a/codefresh/README.md.gotmpl +++ b/codefresh/README.md.gotmpl @@ -1485,17 +1485,17 @@ After executing the `createIndex()` command, you should see a result indicating **Index removal** -- To remove an index, use the `dropIndex()` method with either the `` or a ``: +- To remove an index, use the `dropIndex()` method with ``: ```js -db.getSiblingDB('').getCollection('').dropIndex('' | ) +db.getSiblingDB('').getCollection('').dropIndex('') ``` #### Atlas Database If you're hosting MongoDB on [Atlas](https://www.mongodb.com/atlas/database), use the following [Manage Indexes](https://www.mongodb.com/docs/atlas/atlas-ui/indexes/) guide to View, Create or Remove indexes. -> ⚠️ **Important!** In Atlas in production environment the indexes must be created in *a rolling fashion* mode, i.e., with `Build index via rolling process` checkbox enabled. +> ⚠️ **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/)) ## Upgrading