Rework RabbitMQ credential configuration
PTP Notification deploys two separate rabbitmq instances: registration and notification-broker, with a default user/password of admin/admin. This commit enables PTP notification to function with an user-defined name, password and also AMQP port for both instances. TEST PLAN: PASS: PTP pull/push notifications with default notification/registration user/password/port (without helm override for these) PASS: PTP pull/push notifications with changing notification/registration user/password/port (with helm overide for these) system helm-override-update ptp-notification ptp-notification \ notification --values ~/notification-override.yaml registration: endpoint: port: 5673 user: admin-reg pass: Registration1234 notification: endpoint: port: 5674 user: admin-noti pass: Notification1234 Story: 2011332 Task: 51620 Signed-off-by: Tara Nath Subedi <tara.subedi@windriver.com> Change-Id: Id98c2ae68a1adb5b17f1a336ac609cd57fe3a026
This commit is contained in:
parent
a5bb2dc260
commit
19841dd96f
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2021-2024 Wind River Systems, Inc.
|
||||
# Copyright (c) 2021-2025 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@ -54,11 +54,11 @@ spec:
|
||||
- name: THIS_NAMESPACE
|
||||
value: {{ .Values.global.namespace }}
|
||||
- name: RABBITMQ_DEFAULT_USER
|
||||
value: "admin"
|
||||
value: "{{ .Values.notification.endpoint.user }}"
|
||||
- name: RABBITMQ_DEFAULT_PASS
|
||||
value: "admin"
|
||||
- name: RABBITMQ_DEFAULT_PORT
|
||||
value: "5672"
|
||||
value: "{{ .Values.notification.endpoint.pass }}"
|
||||
- name: RABBITMQ_NODE_PORT
|
||||
value: "{{ .Values.notification.endpoint.port }}"
|
||||
- name: {{ .Chart.Name }}-location
|
||||
image: "{{ .Values.location.image.repository }}:{{ .Values.location.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.location.image.pullPolicy }}
|
||||
@ -141,17 +141,17 @@ spec:
|
||||
- name: OVERALL_HOLDOVER_SECONDS
|
||||
value: "{{ .Values.ptptrackingv2.overall.holdover_seconds }}"
|
||||
- name: NOTIFICATIONSERVICE_USER
|
||||
value: "admin"
|
||||
value: "{{ .Values.notification.endpoint.user }}"
|
||||
- name: NOTIFICATIONSERVICE_PASS
|
||||
value: "admin"
|
||||
value: "{{ .Values.notification.endpoint.pass }}"
|
||||
- name: NOTIFICATIONSERVICE_PORT
|
||||
value: "5672"
|
||||
value: "{{ .Values.notification.endpoint.port }}"
|
||||
- name: REGISTRATION_USER
|
||||
value: "admin"
|
||||
value: "{{ .Values.registration.endpoint.user }}"
|
||||
- name: REGISTRATION_PASS
|
||||
value: "admin"
|
||||
value: "{{ .Values.registration.endpoint.pass }}"
|
||||
- name: REGISTRATION_PORT
|
||||
value: "5672"
|
||||
value: "{{ .Values.registration.endpoint.port }}"
|
||||
- name: REGISTRATION_HOST
|
||||
value: "registration.{{.Values.global.namespace}}.svc.cluster.local"
|
||||
- name: HEALTH_API_HOST
|
||||
@ -250,17 +250,17 @@ spec:
|
||||
- name: PTP_POLL_FREQ_SECONDS
|
||||
value: "{{ .Values.ptptracking.device.poll_freq_seconds }}"
|
||||
- name: NOTIFICATIONSERVICE_USER
|
||||
value: "admin"
|
||||
value: "{{ .Values.notification.endpoint.user }}"
|
||||
- name: NOTIFICATIONSERVICE_PASS
|
||||
value: "admin"
|
||||
value: "{{ .Values.notification.endpoint.pass }}"
|
||||
- name: NOTIFICATIONSERVICE_PORT
|
||||
value: "5672"
|
||||
value: "{{ .Values.notification.endpoint.port }}"
|
||||
- name: REGISTRATION_USER
|
||||
value: "admin"
|
||||
value: "{{ .Values.registration.endpoint.user }}"
|
||||
- name: REGISTRATION_PASS
|
||||
value: "admin"
|
||||
value: "{{ .Values.registration.endpoint.pass }}"
|
||||
- name: REGISTRATION_PORT
|
||||
value: "5672"
|
||||
value: "{{ .Values.registration.endpoint.port }}"
|
||||
- name: REGISTRATION_HOST
|
||||
value: "registration.{{.Values.global.namespace}}.svc.cluster.local"
|
||||
- name: HEALTH_API_HOST
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2021 Wind River Systems, Inc.
|
||||
# Copyright (c) 2021-2025 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@ -43,9 +43,9 @@ spec:
|
||||
image: "{{ .Values.registration.image.repository }}:{{ .Values.registration.image.tag }}"
|
||||
env:
|
||||
- name: RABBITMQ_DEFAULT_USER
|
||||
value: "admin"
|
||||
value: "{{ .Values.registration.endpoint.user }}"
|
||||
- name: RABBITMQ_DEFAULT_PASS
|
||||
value: "admin"
|
||||
- name: RABBITMQ_DEFAULT_PORT
|
||||
value: "5672"
|
||||
value: "{{ .Values.registration.endpoint.pass }}"
|
||||
- name: RABBITMQ_NODE_PORT
|
||||
value: "{{ .Values.registration.endpoint.port }}"
|
||||
---
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2021 Wind River Systems, Inc.
|
||||
# Copyright (c) 2021,2024-2025 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@ -13,7 +13,7 @@ spec:
|
||||
#clusterIP: None
|
||||
ports:
|
||||
- name: rabbitmq
|
||||
port: 5672
|
||||
port: {{ .Values.registration.endpoint.port }}
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: rabbitmq
|
@ -224,7 +224,7 @@ class PtpService(object):
|
||||
}
|
||||
raise client_exception.SubscriptionAlreadyExists(
|
||||
subscriptioninfo)
|
||||
|
||||
|
||||
_, nodename, _, _, _ = subscription_helper.parse_resource_address(
|
||||
resource_address)
|
||||
|
||||
@ -353,4 +353,4 @@ class PtpService(object):
|
||||
LOG.warning("subscription {0} is not deleted due to:"
|
||||
"{1}/{2}".format(self.subscriptionid, type(ex),
|
||||
str(ex)))
|
||||
raise ex
|
||||
raise ex
|
Loading…
x
Reference in New Issue
Block a user