From 39ce5605bed8317df2643394e78819a8e8972108 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 26 Sep 2025 15:23:37 +0900 Subject: [PATCH] Remove remaining logic for volume v1/v2 API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These old API versions were already removed from cinder. Remove API v1 https://review.opendev.org/c/openstack/cinder/+/499342 Remove Block Storage API v2 https://review.opendev.org/c/openstack/cinder/+/792299 Co-Authored-By: Mathieu Gagné Change-Id: I6f817801ca50aee1c26596c567593505b82e2f69 Signed-off-by: Takashi Kajinami --- cinder/templates/configmap-etc.yaml | 4 +- cinder/templates/deployment-api.yaml | 14 ++-- cinder/templates/job-ks-endpoints.yaml | 9 +-- cinder/templates/service-api.yaml | 4 +- cinder/templates/service-ingress-api.yaml | 2 +- cinder/values.yaml | 78 ++----------------- ...e-legacy-volume-apis-12d2d1abbb7fbe61.yaml | 6 ++ 7 files changed, 25 insertions(+), 92 deletions(-) create mode 100644 releasenotes/notes/remove-legacy-volume-apis-12d2d1abbb7fbe61.yaml diff --git a/cinder/templates/configmap-etc.yaml b/cinder/templates/configmap-etc.yaml index 45dc2f621d..e686fb31bd 100644 --- a/cinder/templates/configmap-etc.yaml +++ b/cinder/templates/configmap-etc.yaml @@ -117,7 +117,7 @@ limitations under the License. {{- end -}} {{- if empty .Values.conf.cinder.DEFAULT.osapi_volume_listen_port -}} -{{- $_ := tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.cinder.DEFAULT "osapi_volume_listen_port" -}} +{{- $_ := tuple "volumev3" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.cinder.DEFAULT "osapi_volume_listen_port" -}} {{- end -}} {{- if .Values.conf.cinder.service_user.send_service_user_token -}} @@ -148,7 +148,7 @@ limitations under the License. {{- $_ := set .Values.conf.cinder_api_uwsgi.uwsgi "processes" .Values.conf.cinder.DEFAULT.osapi_volume_workers -}} {{- end -}} {{- if empty (index .Values.conf.cinder_api_uwsgi.uwsgi "http-socket") -}} -{{- $http_socket_port := tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | toString }} +{{- $http_socket_port := tuple "volumev3" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | toString }} {{- $http_socket := printf "0.0.0.0:%s" $http_socket_port }} {{- $_ := set .Values.conf.cinder_api_uwsgi.uwsgi "http-socket" $http_socket -}} {{- end -}} diff --git a/cinder/templates/deployment-api.yaml b/cinder/templates/deployment-api.yaml index 55d55e83b6..22541a5137 100644 --- a/cinder/templates/deployment-api.yaml +++ b/cinder/templates/deployment-api.yaml @@ -14,16 +14,16 @@ limitations under the License. {{- define "cinderApiLivenessProbeTemplate" }} httpGet: - scheme: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }} - path: {{ tuple "volume" "healthcheck" "internal" . | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} - port: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + scheme: {{ tuple "volumev3" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }} + path: {{ tuple "volumev3" "healthcheck" "internal" . | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} + port: {{ tuple "volumev3" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- end }} {{- define "cinderApiReadinessProbeTemplate" }} httpGet: - scheme: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }} - path: {{ tuple "volume" "healthcheck" "internal" . | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} - port: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + scheme: {{ tuple "volumev3" "service" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" | upper }} + path: {{ tuple "volumev3" "healthcheck" "internal" . | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }} + port: {{ tuple "volumev3" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- end }} {{- if .Values.manifests.deployment_api }} @@ -112,7 +112,7 @@ spec: - stop ports: - name: c-api - containerPort: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + containerPort: {{ tuple "volumev3" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{ dict "envAll" $envAll "component" "api" "container" "cinder-api" "type" "readiness" "probeTemplate" (include "cinderApiReadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }} {{ dict "envAll" $envAll "component" "api" "container" "cinder-api" "type" "liveness" "probeTemplate" (include "cinderApiLivenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }} volumeMounts: diff --git a/cinder/templates/job-ks-endpoints.yaml b/cinder/templates/job-ks-endpoints.yaml index 24fdc38d5f..99d5360ef3 100644 --- a/cinder/templates/job-ks-endpoints.yaml +++ b/cinder/templates/job-ks-endpoints.yaml @@ -17,15 +17,8 @@ helm.sh/hook: post-install,post-upgrade helm.sh/hook-weight: "-2" {{- end }} -{{- $volTypes := list "volumev3" -}} -{{- if .Values.conf.cinder.DEFAULT.enable_v1_api }} -{{- $volTypes = append $volTypes "volume" }} -{{- end }} -{{- if .Values.conf.cinder.DEFAULT.enable_v2_api }} -{{- $volTypes = append $volTypes "volumev2" }} -{{- end }} {{- if .Values.manifests.job_ks_endpoints }} -{{- $ksServiceJob := dict "envAll" . "serviceName" "cinder" "serviceTypes" ( $volTypes ) -}} +{{- $ksServiceJob := dict "envAll" . "serviceName" "cinder" "serviceTypes" ( tuple "volumev3" ) -}} {{- if or .Values.manifests.certificates .Values.tls.identity -}} {{- $_ := set $ksServiceJob "tlsSecret" .Values.secrets.tls.volumev3.api.internal -}} {{- end -}} diff --git a/cinder/templates/service-api.yaml b/cinder/templates/service-api.yaml index c906aa04f1..d0530633c0 100644 --- a/cinder/templates/service-api.yaml +++ b/cinder/templates/service-api.yaml @@ -18,11 +18,11 @@ limitations under the License. apiVersion: v1 kind: Service metadata: - name: {{ tuple "volume" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} + name: {{ tuple "volumev3" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} spec: ports: - name: c-api - port: {{ tuple "volume" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + port: {{ tuple "volumev3" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{ if .Values.network.api.node_port.enabled }} nodePort: {{ .Values.network.api.node_port.port }} {{ end }} diff --git a/cinder/templates/service-ingress-api.yaml b/cinder/templates/service-ingress-api.yaml index 951afb5942..ff0d27e516 100644 --- a/cinder/templates/service-ingress-api.yaml +++ b/cinder/templates/service-ingress-api.yaml @@ -13,6 +13,6 @@ limitations under the License. */}} {{- if and .Values.manifests.service_ingress_api .Values.network.api.ingress.public }} -{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "volume" -}} +{{- $serviceIngressOpts := dict "envAll" . "backendServiceType" "volumev3" -}} {{ $serviceIngressOpts | include "helm-toolkit.manifests.service_ingress" }} {{- end }} diff --git a/cinder/values.yaml b/cinder/values.yaml index 2ed0d95341..43d87796f5 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -488,19 +488,7 @@ conf: use: call:cinder.api:root_app_factory /: apiversions /healthcheck: healthcheck - /v1: openstack_volume_api_v1 - /v2: openstack_volume_api_v2 /v3: openstack_volume_api_v3 - composite:openstack_volume_api_v1: - use: call:cinder.api.middleware.auth:pipeline_factory - noauth: cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler noauth apiv1 - keystone: cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler authtoken audit keystonecontext apiv1 - keystone_nolimit: cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler authtoken audit keystonecontext apiv1 - composite:openstack_volume_api_v2: - use: call:cinder.api.middleware.auth:pipeline_factory - noauth: cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler noauth apiv2 - keystone: cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler authtoken audit keystonecontext apiv2 - keystone_nolimit: cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler authtoken audit keystonecontext apiv2 composite:openstack_volume_api_v3: use: call:cinder.api.middleware.auth:pipeline_factory noauth: cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler noauth apiv3 @@ -521,10 +509,6 @@ conf: paste.filter_factory: cinder.api.middleware.auth:NoAuthMiddleware.factory filter:sizelimit: paste.filter_factory: oslo_middleware.sizelimit:RequestBodySizeLimiter.factory - app:apiv1: - paste.app_factory: cinder.api.v1.router:APIRouter.factory - app:apiv2: - paste.app_factory: cinder.api.v2.router:APIRouter.factory app:apiv3: paste.app_factory: cinder.api.v3.router:APIRouter.factory app:healthcheck: @@ -561,8 +545,6 @@ conf: types: type volumes: volume service_endpoints: - volume: service/storage/block - volumev2: service/storage/block volumev3: service/storage/block cinder_sudoers: | # This sudoers file supports rootwrap for both Kolla and LOCI Images. @@ -850,8 +832,6 @@ conf: log_config_append: /etc/cinder/logging.conf use_syslog: false use_stderr: true - enable_v1_api: false - enable_v2_api: false volume_name_template: "%s" osapi_volume_workers: 1 glance_api_version: 2 @@ -1137,7 +1117,7 @@ dependencies: - endpoint: internal service: identity - endpoint: internal - service: volume + service: volumev3 backup_storage_init: jobs: null bootstrap: @@ -1145,7 +1125,7 @@ dependencies: - endpoint: internal service: identity - endpoint: internal - service: volume + service: volumev3 pod: - requireSameNode: false labels: @@ -1208,7 +1188,7 @@ dependencies: - endpoint: internal service: identity - endpoint: internal - service: volume + service: volumev3 storage_init: jobs: null tests: @@ -1216,7 +1196,7 @@ dependencies: - endpoint: internal service: identity - endpoint: internal - service: volume + service: volumev3 volume: jobs: - cinder-db-sync @@ -1228,7 +1208,7 @@ dependencies: - endpoint: internal service: identity - endpoint: internal - service: volume + service: volumev3 volume_usage_audit: jobs: - cinder-db-sync @@ -1240,7 +1220,7 @@ dependencies: - endpoint: internal service: identity - endpoint: internal - service: volume + service: volumev3 image_repo_sync: services: - endpoint: internal @@ -1396,52 +1376,6 @@ endpoints: api: default: 9292 public: 80 - volume: - name: cinder - hosts: - default: cinder-api - public: cinder - host_fqdn_override: - default: null - # NOTE(portdirect): this chart supports TLS for fqdn over-ridden public - # endpoints using the following format: - # public: - # host: null - # tls: - # crt: null - # key: null - path: - default: '/v1/%(tenant_id)s' - healthcheck: /healthcheck - scheme: - default: 'http' - port: - api: - default: 8776 - public: 80 - volumev2: - name: cinderv2 - hosts: - default: cinder-api - public: cinder - host_fqdn_override: - default: null - # NOTE(portdirect): this chart supports TLS for fqdn over-ridden public - # endpoints using the following format: - # public: - # host: null - # tls: - # crt: null - # key: null - path: - default: '/v2/%(tenant_id)s' - healthcheck: /healthcheck - scheme: - default: 'http' - port: - api: - default: 8776 - public: 80 volumev3: name: cinderv3 hosts: diff --git a/releasenotes/notes/remove-legacy-volume-apis-12d2d1abbb7fbe61.yaml b/releasenotes/notes/remove-legacy-volume-apis-12d2d1abbb7fbe61.yaml new file mode 100644 index 0000000000..deda372f46 --- /dev/null +++ b/releasenotes/notes/remove-legacy-volume-apis-12d2d1abbb7fbe61.yaml @@ -0,0 +1,6 @@ +--- +cinder: + - | + Removed endpoints for v1 API and v2 API because these were already removed + from cinder. +...