From d0a06769016b94c17406e0b2b7162bb0f4ba63f0 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Thu, 26 Jun 2025 16:36:13 +0200 Subject: [PATCH 1/5] chore: remove old search deployments and values squashme: update changelog --- .../cypress/e2e/v2/verifyInfrastructure.cy.ts | 1 - helm-chart/renku/templates/ingress.yaml | 1 - .../renku/templates/network-policies.yaml | 37 ------- .../renku/templates/search/_helpers.tpl | 32 ------ .../search/search-api-deployment.yaml | 90 ----------------- .../templates/search/search-api-service.yaml | 23 ----- .../search/search-provision-deployment.yaml | 98 ------------------- .../search/search-provision-service.yaml | 23 ----- helm-chart/renku/values.yaml | 38 ------- helm-chart/values.yaml.changelog.md | 6 ++ 10 files changed, 6 insertions(+), 343 deletions(-) delete mode 100644 helm-chart/renku/templates/search/_helpers.tpl delete mode 100644 helm-chart/renku/templates/search/search-api-deployment.yaml delete mode 100644 helm-chart/renku/templates/search/search-api-service.yaml delete mode 100644 helm-chart/renku/templates/search/search-provision-deployment.yaml delete mode 100644 helm-chart/renku/templates/search/search-provision-service.yaml diff --git a/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts b/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts index 805942f11c..f6381885a9 100644 --- a/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts +++ b/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts @@ -36,7 +36,6 @@ function retryRequest( describe("Verify the infrastructure is ready", () => { it("Can interact with the backend components", () => { retryRequest("api/data/version", "Data services"); - retryRequest("api/search/version", "Search"); retryRequest("api/auth/login", "Gateway"); retryRequest("config.json", "UI client"); diff --git a/helm-chart/renku/templates/ingress.yaml b/helm-chart/renku/templates/ingress.yaml index a704db71e3..f4fcdab81b 100644 --- a/helm-chart/renku/templates/ingress.yaml +++ b/helm-chart/renku/templates/ingress.yaml @@ -10,7 +10,6 @@ {{- $uiserverServicePort := .Values.ui.server.service.port -}} {{- $webhookServiceFullname := include "renku.graph.webhookService.fullname" . -}} {{- $knowledgeGraphFullname := include "renku.graph.knowledgeGraph.fullname" . -}} -{{- $searchApiFullname := include "renku.search.searchApi.fullname" . -}} {{- $renkuFullname := include "renku.fullname" . -}} {{- $jenaFullname := include "renku-jena.fullname" . -}} {{- $jenaServicePort := .Values.jena.service.port -}} diff --git a/helm-chart/renku/templates/network-policies.yaml b/helm-chart/renku/templates/network-policies.yaml index 6e327aa7ce..f8fabbd124 100644 --- a/helm-chart/renku/templates/network-policies.yaml +++ b/helm-chart/renku/templates/network-policies.yaml @@ -369,33 +369,6 @@ spec: --- apiVersion: networking.k8s.io/v1 kind: NetworkPolicy -metadata: - name: ingress-to-search-service-from-gateway - labels: - app: {{ template "renku.name" . }} - chart: {{ template "renku.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - podSelector: - matchLabels: - app: {{ template "renku.search.searchApi.name" . }} - release: {{ .Release.Name }} - policyTypes: - - Ingress - ingress: - - from: - - podSelector: - matchLabels: - app: {{ template "gateway.name" . }} - release: {{ .Release.Name }} - ports: - - protocol: TCP - port: http-search-api - ---- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy metadata: name: ingress-to-uiserver-from-anywhere labels: @@ -637,10 +610,6 @@ spec: matchLabels: app: renku-data-tasks release: {{ .Release.Name }} - - podSelector: - matchLabels: - app: {{ template "renku.search.searchApi.name" . }} - release: {{ .Release.Name }} ports: - protocol: TCP port: redis @@ -673,12 +642,6 @@ spec: matchLabels: app: renku-data-tasks release: {{ .Release.Name }} - - podSelector: - matchLabels: - app: search-api - - podSelector: - matchLabels: - app: search-provision ports: - protocol: TCP port: http diff --git a/helm-chart/renku/templates/search/_helpers.tpl b/helm-chart/renku/templates/search/_helpers.tpl deleted file mode 100644 index b37902d471..0000000000 --- a/helm-chart/renku/templates/search/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "renku.search.searchApi.name" -}} -{{- "search-api" -}} -{{- end -}} - -{{- define "renku.search.searchProvision.name" -}} -{{- "search-provision" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "renku.search.searchApi.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- printf "%s-search-api" .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-search-api" .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} - -{{- define "renku.search.searchProvision.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- printf "%s-search-provision" .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-search-provision" .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} diff --git a/helm-chart/renku/templates/search/search-api-deployment.yaml b/helm-chart/renku/templates/search/search-api-deployment.yaml deleted file mode 100644 index 48a0050304..0000000000 --- a/helm-chart/renku/templates/search/search-api-deployment.yaml +++ /dev/null @@ -1,90 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "renku.search.searchApi.fullname" . }} - labels: - app: {{ template "renku.search.searchApi.name" . }} - chart: {{ template "renku.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.search.searchApi.replicas }} - strategy: - type: Recreate - selector: - matchLabels: - app: {{ template "renku.search.searchApi.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "renku.search.searchApi.name" . }} - release: {{ .Release.Name }} - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - automountServiceAccountToken: {{ .Values.global.debug }} - initContainers: - {{- include "certificates.initContainer" . | nindent 8 }} - containers: - - name: search-api - image: "{{ .Values.search.searchApi.image.repository }}:{{ .Values.search.searchApi.image.tag }}" - imagePullPolicy: {{ .Values.search.searchApi.image.pullPolicy }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: RS_SOLR_URL - value: "http://{{ template "solr.fullname" . }}:{{ .Values.global.solr.port }}" - - name: RS_SOLR_CORE - value: {{ first .Values.solr.coreNames }} - - name: RS_SOLR_USER - value: {{ default "admin" .Values.solr.auth.adminUsername | quote }} - - name: RS_SOLR_PASS - valueFrom: - secretKeyRef: - name: {{ template "solr.fullname" . }} - key: solr-password - - name: RS_SOLR_DEFAULT_COMMIT_WITHIN - value: "500ms" - - name: RS_SOLR_LOG_MESSAGE_BODIES - value: "false" - - name: "RS_JWT_ALLOWED_ISSUER_URL_PATTERNS" - value: "{{ include "renku.keycloakUrl" . }}*/*" - - name: "RS_SENTRY_DSN" - value: {{ .Values.search.sentry.dsn | quote }} - - name: "RS_SENTRY_ENV" - value: {{ .Values.search.sentry.environment | quote }} - - name: "RS_SENTRY_ENABLED" - value: {{ .Values.search.sentry.enabled | quote}} - - name: JAVA_OPTS - value: "-Xmx{{ .Values.search.searchApi.jvmXmx }} -XX:+UseZGC -XX:+ZGenerational" - ports: - - name: http-search-api - containerPort: 8080 - protocol: TCP - livenessProbe: - httpGet: - path: /ping - port: http-search-api - readinessProbe: - httpGet: - path: /ping - port: http-search-api - resources: - {{- toYaml .Values.search.searchApi.resources | nindent 12 }} - volumeMounts: - {{- include "certificates.volumeMounts.openjdk17" . | nindent 12 }} - volumes: - {{- include "certificates.volumes" . | nindent 8 }} - {{- with .Values.nodeSelector }} -nodeSelector: - {{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} -affinity: - {{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} -tolerations: - {{ toYaml . | indent 8 }} - {{- end }} diff --git a/helm-chart/renku/templates/search/search-api-service.yaml b/helm-chart/renku/templates/search/search-api-service.yaml deleted file mode 100644 index 0bff5aca6b..0000000000 --- a/helm-chart/renku/templates/search/search-api-service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "renku.search.searchApi.fullname" . }} - labels: - app: {{ template "renku.search.searchApi.name" . }} - chart: {{ template "renku.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - annotations: - prometheus.io/scrape: 'true' - prometheus.io/path: '/metrics' - prometheus.io/port: '8080' -spec: - type: {{ .Values.search.searchApi.service.type }} - ports: - - port: {{ .Values.search.searchApi.service.port }} - targetPort: http-search-api - protocol: TCP - name: http - selector: - app: {{ template "renku.search.searchApi.name" . }} - release: {{ .Release.Name }} diff --git a/helm-chart/renku/templates/search/search-provision-deployment.yaml b/helm-chart/renku/templates/search/search-provision-deployment.yaml deleted file mode 100644 index dcc676d2a6..0000000000 --- a/helm-chart/renku/templates/search/search-provision-deployment.yaml +++ /dev/null @@ -1,98 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "renku.search.searchProvision.fullname" . }} - labels: - app: {{ template "renku.search.searchProvision.name" . }} - chart: {{ template "renku.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.search.searchProvision.replicas }} - strategy: - type: Recreate - selector: - matchLabels: - app: {{ template "renku.search.searchProvision.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "renku.search.searchProvision.name" . }} - release: {{ .Release.Name }} - # The label below enables to connect to redis - {{ .Values.global.redis.clientLabel | toYaml | nindent 8 }} - spec: - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - automountServiceAccountToken: {{ .Values.global.debug }} - initContainers: - {{- include "certificates.initContainer" . | nindent 8 }} - containers: - - name: search-provision - image: "{{ .Values.search.searchProvision.image.repository }}:{{ .Values.search.searchProvision.image.tag }}" - imagePullPolicy: {{ .Values.search.searchProvision.image.pullPolicy }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: RS_REDIS_HOST - value: {{ .Values.global.redis.host | quote }} - - name: RS_REDIS_PORT - value: {{ .Values.global.redis.port | quote }} - - name: RS_REDIS_SENTINEL - value: {{ .Values.global.redis.sentinel.enabled | quote }} - - name: RS_REDIS_DB - value: {{ .Values.global.redis.dbIndex.events | quote }} - - name: RS_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.global.redis.existingSecret }} - key: {{ .Values.global.redis.existingSecretPasswordKey }} - - name: RS_REDIS_MASTER_SET - value: {{ .Values.global.redis.sentinel.masterSet | quote }} - {{- include "renku.events.streamEnvVars" . | nindent 12 }} - - name: RS_SOLR_URL - value: "http://{{ template "solr.fullname" . }}:{{ .Values.global.solr.port }}" - - name: RS_SOLR_CORE - value: {{ first .Values.solr.coreNames }} - - name: RS_SOLR_USER - value: {{ default "admin" .Values.solr.auth.adminUsername | quote }} - - name: RS_SOLR_PASS - valueFrom: - secretKeyRef: - name: {{ template "solr.fullname" . }} - key: solr-password - - name: RS_SOLR_DEFAULT_COMMIT_WITHIN - value: "500ms" - - name: RS_SOLR_LOG_MESSAGE_BODIES - value: "false" - - name: "RS_SENTRY_DSN" - value: {{ .Values.search.sentry.dsn | quote }} - - name: "RS_SENTRY_ENV" - value: {{ .Values.search.sentry.environment | quote }} - - name: "RS_SENTRY_ENABLED" - value: {{ .Values.search.sentry.enabled | quote }} - - name: JAVA_OPTS - value: "-Xmx{{ .Values.search.searchProvision.jvmXmx }} -XX:+UseZGC -XX:+ZGenerational" - ports: - - name: http-searchprov - containerPort: 8081 - protocol: TCP - resources: - {{- toYaml .Values.search.searchProvision.resources | nindent 12 }} - volumeMounts: - {{- include "certificates.volumeMounts.openjdk17" . | nindent 12 }} - volumes: - {{- include "certificates.volumes" . | nindent 8 }} - {{- with .Values.nodeSelector }} -nodeSelector: - {{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} -affinity: - {{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} -tolerations: - {{ toYaml . | indent 8 }} - {{- end }} diff --git a/helm-chart/renku/templates/search/search-provision-service.yaml b/helm-chart/renku/templates/search/search-provision-service.yaml deleted file mode 100644 index b1aa6d4687..0000000000 --- a/helm-chart/renku/templates/search/search-provision-service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "renku.search.searchProvision.fullname" . }} - labels: - app: {{ template "renku.search.searchProvision.name" . }} - chart: {{ template "renku.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - annotations: - prometheus.io/scrape: 'true' - prometheus.io/path: '/metrics' - prometheus.io/port: '8081' -spec: - type: {{ .Values.search.searchProvision.service.type }} - ports: - - port: {{ .Values.search.searchProvision.service.port }} - targetPort: http-searchprov - protocol: TCP - name: http - selector: - app: {{ template "renku.search.searchProvision.name" . }} - release: {{ .Release.Name }} diff --git a/helm-chart/renku/values.yaml b/helm-chart/renku/values.yaml index ded007e848..98e393c7ae 100644 --- a/helm-chart/renku/values.yaml +++ b/helm-chart/renku/values.yaml @@ -1248,44 +1248,6 @@ jena: additionalInitContainerScript: "find /fuseki -name tdb.lock -type f -delete && find /fuseki/configuration -name *.ttl -type f -empty -delete && echo clean-up done" test: enabled: false -## Configuration for renku-search services -search: - sentry: - enabled: false - dsn: - environment: - searchApi: - replicas: 1 - image: - repository: renku/search-api - tag: "0.7.0" - pullPolicy: IfNotPresent - service: - type: ClusterIP - port: 80 - resources: - limits: - memory: 450Mi - requests: - cpu: 50m - memory: 450Mi - jvmXmx: 256M - searchProvision: - replicas: 1 - image: - repository: renku/search-provision - tag: "0.7.0" - pullPolicy: IfNotPresent - service: - type: ClusterIP - port: 8081 - resources: - limits: - memory: 900Mi - requests: - cpu: 100m - memory: 900Mi - jvmXmx: 256M ## Configuration for renku-graph services graph: webhookService: diff --git a/helm-chart/values.yaml.changelog.md b/helm-chart/values.yaml.changelog.md index d87b05e6eb..303426e272 100644 --- a/helm-chart/values.yaml.changelog.md +++ b/helm-chart/values.yaml.changelog.md @@ -5,6 +5,12 @@ For changes that require manual steps other than changing values, please check o Please follow this convention when adding a new row * ` - **:
` +## Upgrading to Renku 2.3.0 + +* DELETE `search`, now the search and search provisioning is part of the data services and data tasks and are not separate services. + +This will result in 2 fewer deployments in your cluster. If the values are left in the values file they will be ignored. Therefore this does not require immediate action by administrators, it is just good practice to remove deprecated sections that you may have in your values file. + ## Upgrading to Renku 0.71.0 +* NEW `enableV1Services` used to indicate whether services needed exclusively for Renku V1 are deployed or not. The support for this feature is experimental and it should not yet be used in production at all. From 9fc6c2a1b62ad9da09f000ff7f65c35665af5965 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Fri, 27 Jun 2025 10:44:14 +0200 Subject: [PATCH 2/5] squashme: minor fix --- cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts b/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts index f6381885a9..1ed9b94ea5 100644 --- a/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts +++ b/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts @@ -46,13 +46,6 @@ describe("Verify the infrastructure is ready", () => { throw new Error("Data service endpoints not working as expected."); }); - // Search should return a list of items - const searchUrl = "/api/search/query"; - cy.request(searchUrl).then((resp) => { - if (resp.status >= 400 || !("items" in resp.body)) - throw new Error("Search endpoints not working as expected."); - }); - // UI should load const uiUrl = `/help`; cy.request(uiUrl).then((resp) => { From 941e79f5ce89af1a9ae166c5bcea29dc613130d4 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Fri, 27 Jun 2025 10:55:59 +0200 Subject: [PATCH 3/5] squashme: minor fix --- cypress-tests/cypress/support/utils/search.utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress-tests/cypress/support/utils/search.utils.ts b/cypress-tests/cypress/support/utils/search.utils.ts index eddb90e79c..5dabf68949 100644 --- a/cypress-tests/cypress/support/utils/search.utils.ts +++ b/cypress-tests/cypress/support/utils/search.utils.ts @@ -16,7 +16,7 @@ export function verifySearchIndexing( ); function attempt(tries: number): Cypress.Chainable { - return cy.request(`/api/search/query?q=${query}`).then((response) => { + return cy.request(`/api/data/search/query?q=${query}`).then((response) => { const success = matcher === "eq" ? response.body.items && response.body.items.length === expectedItems From d8114ccd97b1fdd605162f34e22027f25fa3c041 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Fri, 27 Jun 2025 11:08:25 +0200 Subject: [PATCH 4/5] Revert "squashme: minor fix" This reverts commit 9fc6c2a1b62ad9da09f000ff7f65c35665af5965. --- cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts b/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts index 1ed9b94ea5..f6381885a9 100644 --- a/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts +++ b/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts @@ -46,6 +46,13 @@ describe("Verify the infrastructure is ready", () => { throw new Error("Data service endpoints not working as expected."); }); + // Search should return a list of items + const searchUrl = "/api/search/query"; + cy.request(searchUrl).then((resp) => { + if (resp.status >= 400 || !("items" in resp.body)) + throw new Error("Search endpoints not working as expected."); + }); + // UI should load const uiUrl = `/help`; cy.request(uiUrl).then((resp) => { From b35f71bea71ba7925f19dd6cd025c52461981d3b Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Fri, 27 Jun 2025 11:08:51 +0200 Subject: [PATCH 5/5] squashme: minor fix --- cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts b/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts index f6381885a9..167d922fbd 100644 --- a/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts +++ b/cypress-tests/cypress/e2e/v2/verifyInfrastructure.cy.ts @@ -47,7 +47,7 @@ describe("Verify the infrastructure is ready", () => { }); // Search should return a list of items - const searchUrl = "/api/search/query"; + const searchUrl = "/api/data/search/query"; cy.request(searchUrl).then((resp) => { if (resp.status >= 400 || !("items" in resp.body)) throw new Error("Search endpoints not working as expected.");