Distinguish between port number of internal endpoint and binding

port number in barbican

Now binding ports of service and pod spec are configured using
internal endpoint values.
To support reverse proxy for internalUrl, need to distinguish
between binding ports and internal endpoint ports.

I added `service` section in endpoint items apart from admin,public
,internal and default.

Change-Id: I33dbc62338ef8e21fab774e3b91bc474efd6bf36
This commit is contained in:
josebb 2021-12-02 16:25:53 +02:00
parent ced30abead
commit 497f2bbfa8
6 changed files with 9 additions and 6 deletions

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Barbican
name: barbican
version: 0.2.15
version: 0.2.16
home: https://docs.openstack.org/barbican/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Barbican/OpenStack_Project_Barbican_vertical.png
sources:

View File

@ -68,11 +68,11 @@ limitations under the License.
{{- end -}}
{{- if empty .Values.conf.barbican.barbican_api.bind_port -}}
{{- $_ := tuple "key_manager" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.barbican.barbican_api "bind_port" -}}
{{- $_ := tuple "key_manager" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.barbican.barbican_api "bind_port" -}}
{{- end -}}
{{- if empty .Values.conf.barbican_api.uwsgi.socket -}}
{{- $_ := printf ":%s" ( tuple "key_manager" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" ) | set .Values.conf.barbican_api.uwsgi "socket" -}}
{{- $_ := printf ":%s" ( tuple "key_manager" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" ) | set .Values.conf.barbican_api.uwsgi "socket" -}}
{{- end -}}
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}

View File

@ -72,10 +72,10 @@ spec:
- stop
ports:
- name: b-api
containerPort: {{ tuple "key_manager" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
containerPort: {{ tuple "key_manager" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
tcpSocket:
port: {{ tuple "key_manager" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
port: {{ tuple "key_manager" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
volumeMounts:
- name: pod-tmp
mountPath: /tmp

View File

@ -22,7 +22,7 @@ metadata:
spec:
ports:
- name: b-api
port: {{ tuple "key-manager" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
port: {{ tuple "key-manager" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{ if .Values.network.api.node_port.enabled }}
nodePort: {{ .Values.network.api.node_port.port }}
{{ end }}

View File

@ -570,10 +570,12 @@ endpoints:
default: /
scheme:
default: http
service: http
port:
api:
default: 9311
public: 80
service: 9311
oslo_db:
auth:
admin:

View File

@ -19,4 +19,5 @@ barbican:
- 0.2.13 Migrated PodDisruptionBudget resource to policy/v1 API version
- 0.2.14 Add Xena and Yoga values overrides
- 0.2.15 Added OCI registry authentication
- 0.2.16 Distinguish between port number of internal endpoint and binding port number
...