From a91ebe8c354c4da5ea25575f5c057d88e0e50723 Mon Sep 17 00:00:00 2001 From: George Taylor Date: Tue, 12 Nov 2024 17:55:41 +0000 Subject: [PATCH] fix: remove contentstore.deleted folder from migration list --- .github/workflows/migrate-s3.yaml | 5 +++++ Taskfile.yml | 3 ++- cert.yaml | 13 +++++++++++++ jobs/reindex_date/templates/reindexing-job.yaml | 1 + kustomize/preprod/patch-ingress-repository.yaml | 2 +- kustomize/preprod/patch-ingress-share.yaml | 2 +- 6 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 cert.yaml diff --git a/.github/workflows/migrate-s3.yaml b/.github/workflows/migrate-s3.yaml index 78b2e3c..6e00502 100644 --- a/.github/workflows/migrate-s3.yaml +++ b/.github/workflows/migrate-s3.yaml @@ -68,9 +68,14 @@ jobs: prefixes=$(kubectl exec $SERVICE_POD_NAME -- aws s3api list-objects-v2 --bucket $SRC_BUCKET --delimiter '/' --query 'CommonPrefixes[*].Prefix' --output text) # remove all spaces and put one comma between prefixes cleaned_prefixes=$(echo $prefixes | tr -s '[:space:]' ',' | sed 's/[,/]*$//') + + # remove `contentstore.deleted/` from cleaned_prefixes + cleaned_prefixes=$(echo $cleaned_prefixes | sed 's/contentstore.deleted,//') + DIRS="" IFS=',' for prefix in $cleaned_prefixes; do + DIR=$(kubectl exec $SERVICE_POD_NAME -- aws s3api list-objects-v2 --bucket $SRC_BUCKET --prefix "$prefix" --delimiter '/' --query 'CommonPrefixes[*].Prefix' --output text) if [ -n "$DIR" ]; then DIR=$(echo $DIR | tr -s '[:space:]' ',' | sed 's/[,/]*$//') diff --git a/Taskfile.yml b/Taskfile.yml index 5ae8504..e049e42 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -190,7 +190,8 @@ tasks: simple_reindex_date: cmds: - | - helm install "reindex-default-$(openssl rand -hex 4)" ./jobs/reindex_date --set "global.elasticsearch.host={{.OPENSEARCH_HOST}}" --set "fromTime=201707060001" --set "toTime=201707070001" --namespace {{.NAMESPACE}} + helm install "reindex-default-$(openssl rand -hex 4)" ./jobs/reindex_date --set "global.elasticsearch.host={{.OPENSEARCH_HOST}}" --set "fromTime=201707311201" --set "toTime=201708311201" --namespace {{.NAMESPACE}} + # change simple_reindex_date_metadata-only: cmds: diff --git a/cert.yaml b/cert.yaml new file mode 100644 index 0000000..55b92ce --- /dev/null +++ b/cert.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: share + namespace: hmpps-delius-alfresco-stage +spec: + secretName: share-ingress-cert + issuerRef: + name: letsencrypt-production + kind: ClusterIssuer + dnsNames: + - share.hmpps-delius-alfresco-stage.apps.live.cloud-platform.service.justice.gov.uk diff --git a/jobs/reindex_date/templates/reindexing-job.yaml b/jobs/reindex_date/templates/reindexing-job.yaml index b31de21..4ba65e3 100644 --- a/jobs/reindex_date/templates/reindexing-job.yaml +++ b/jobs/reindex_date/templates/reindexing-job.yaml @@ -76,6 +76,7 @@ spec: -Dalfresco.reindex.fromTime={{ .Values.fromTime }} -Dalfresco.reindex.toTime={{ .Values.toTime }} -Dalfresco.reindex.contentIndexingEnabled={{ .Values.content }} + -Dalfresco.reindex.retryingEnabled=false -Dalfresco.reindex.metadataIndexingEnabled=true -Dalfresco.reindex.multithreadedStepEnabled=true -Dalfresco.reindex.concurrentProcessors=30 diff --git a/kustomize/preprod/patch-ingress-repository.yaml b/kustomize/preprod/patch-ingress-repository.yaml index 1e595a0..5d4911e 100644 --- a/kustomize/preprod/patch-ingress-repository.yaml +++ b/kustomize/preprod/patch-ingress-repository.yaml @@ -4,7 +4,7 @@ metadata: name: alfresco-content-services-alfresco-cs-repository annotations: external-dns.alpha.kubernetes.io/set-identifier: alfresco-content-services-alfresco-cs-repository-hmpps-delius-alfresco-preprod-green - nginx.ingress.kubernetes.io/whitelist-source-range: "3.10.104.193,3.11.26.150,18.130.189.137,35.178.209.113,3.8.51.207,35.177.252.54,35.176.93.186/32,35.177.125.252/32,35.177.137.160/32,81.134.202.29/32,51.149.250.0/24,51.149.251.0/24,213.121.161.112/28,217.33.148.210/32,13.43.9.198/32,13.42.163.245/32,18.132.208.127/32,51.149.249.0/29,51.149.249.32/29,194.33.192.0/25,194.33.193.0/25,194.33.196.0/25,194.33.197.0/25,195.59.75.0/24,194.33.248.0/29,194.33.249.0/29,62.25.106.209/32,195.92.40.49/32,62.25.109.197/32,195.92.38.16/28,212.137.36.230/32,78.33.10.50/31,78.33.10.52/30,78.33.10.56/30,78.33.10.60/32,78.33.32.99/32,78.33.32.100/30,78.33.32.104/30,78.33.32.108/32,83.98.63.176/29,194.75.210.216/29,217.138.45.109/32,217.138.45.110/32" + nginx.ingress.kubernetes.io/whitelist-source-range: "placeholder" spec: rules: - host: hmpps-delius-alfresco-preprod.apps.live.cloud-platform.service.justice.gov.uk diff --git a/kustomize/preprod/patch-ingress-share.yaml b/kustomize/preprod/patch-ingress-share.yaml index 266870b..4eb86e9 100644 --- a/kustomize/preprod/patch-ingress-share.yaml +++ b/kustomize/preprod/patch-ingress-share.yaml @@ -4,7 +4,7 @@ metadata: name: alfresco-content-services-alfresco-cs-share annotations: external-dns.alpha.kubernetes.io/set-identifier: alfresco-content-services-alfresco-cs-share-hmpps-delius-alfresco-preprod-green - nginx.ingress.kubernetes.io/whitelist-source-range: "3.10.104.193,3.11.26.150,18.130.189.137,35.178.209.113,3.8.51.207,35.177.252.54,35.176.93.186/32,35.177.125.252/32,35.177.137.160/32,81.134.202.29/32,51.149.250.0/24,51.149.251.0/24,213.121.161.112/28,217.33.148.210/32,13.43.9.198/32,13.42.163.245/32,18.132.208.127/32,51.149.249.0/29,51.149.249.32/29,194.33.192.0/25,194.33.193.0/25,194.33.196.0/25,194.33.197.0/25,195.59.75.0/24,194.33.248.0/29,194.33.249.0/29,62.25.106.209/32,195.92.40.49/32,62.25.109.197/32,195.92.38.16/28,212.137.36.230/32,78.33.10.50/31,78.33.10.52/30,78.33.10.56/30,78.33.10.60/32,78.33.32.99/32,78.33.32.100/30,78.33.32.104/30,78.33.32.108/32,83.98.63.176/29,194.75.210.216/29,217.138.45.109/32,217.138.45.110/32" + nginx.ingress.kubernetes.io/whitelist-source-range: "placeholder" spec: rules: - host: share.hmpps-delius-alfresco-preprod.apps.live.cloud-platform.service.justice.gov.uk