feat: add metricsEnabled and probesEnabled configuration options to payment, content, centralStorage, authentication, and notification services

Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
zhenyus 2025-03-17 23:51:35 +08:00
parent 96ab638756
commit e8a07a08e6
20 changed files with 44 additions and 65 deletions

View File

@ -16,6 +16,6 @@ data:
MONGODB_NAME: {{ .Values.authentication.configs.mongodbName | b64enc | quote }}
MONGODB_PORT: {{ .Values.authentication.configs.mongodbPort | toString | b64enc }}
MONGODB_URI: {{ .Values.authentication.configs.mongodbUri | b64enc | quote }}
METRICS_ENABLED: {{ .Values.authentication.serviceMonitor.enabled | default false | toString | b64enc }}
PROBES_ENABLED: {{ if and .Values.authentication.probes (gt (len .Values.authentication.probes) 0) }}{{ "true" | b64enc }}{{ else }}{{ "false" | b64enc }}{{ end }}
METRICS_ENABLED: {{ .Values.authentication.configs.metricsEnabled | default false | toString | b64enc }}
PROBES_ENABLED: {{ .Values.authentication.configs.probesEnabled | default false | toString | b64enc }}

View File

@ -93,13 +93,4 @@ spec:
name: authentication-config
key: {{ $key | snakecase | upper }}
{{- end }}
- name: METRICS_ENABLED
valueFrom:
secretKeyRef:
name: authentication-config
key: METRICS_ENABLED
- name: PROBES_ENABLED
valueFrom:
secretKeyRef:
name: authentication-config
key: PROBES_ENABLED

View File

@ -68,3 +68,5 @@ authentication:
mongodbName: freeleaps2
mongodbPort: 27017
mongodbUri: mongodb+srv://freeadmin:0eMV0bt8oyaknA0m@freeleaps2.zmsmpos.mongodb.net/?retryWrites=true&w=majority
metricsEnabled: "true"
probesEnabled: "true"

View File

@ -56,3 +56,7 @@ authentication:
mongodbPort: "27017"
# MONGODB_URI
mongodbUri: ""
# METRICS_ENABLED
metricsEnabled: "false"
# PROBES_ENABLED
probesEnabled: "false"

View File

@ -14,6 +14,5 @@ data:
MONGODB_URI: {{ .Values.centralStorage.configs.mongodbUri | b64enc | quote }}
AZURE_STORAGE_DOCUMENT_API_KEY: {{ .Values.centralStorage.configs.azureStorageDocumentApiKey | b64enc | quote }}
AZURE_STORAGE_DOCUMENT_API_ENDPOINT: {{ .Values.centralStorage.configs.azureStorageDocumentApiEndpoint | b64enc | quote }}
METRICS_ENABLED: {{ .Values.centralStorage.serviceMonitor.enabled | default false | toString | b64enc }}
PROBES_ENABLED: {{ if and .Values.centralStorage.probes (gt (len .Values.centralStorage.probes) 0) }}{{ "true" | b64enc }}{{ else }}{{ "false" | b64enc }}{{ end }}
METRICS_ENABLED: {{ .Values.centralStorage.configs.metricsEnabled | default false | toString | b64enc }}
PROBES_ENABLED: {{ .Values.centralStorage.configs.probesEnabled | default false | toString | b64enc }}

View File

@ -93,13 +93,3 @@ spec:
name: central-storage-config
key: {{ $key | snakecase | upper }}
{{- end }}
- name: METRICS_ENABLED
valueFrom:
secretKeyRef:
name: authentication-config
key: METRICS_ENABLED
- name: PROBES_ENABLED
valueFrom:
secretKeyRef:
name: authentication-config
key: PROBES_ENABLED

View File

@ -66,3 +66,5 @@ centralStorage:
mongodbUri: mongodb+srv://freeadmin:0eMV0bt8oyaknA0m@freeleaps2.zmsmpos.mongodb.net/?retryWrites=true&w=majority
azureStorageDocumentApiKey: xbiFtFeQ6v5dozgVM99fZ9huUomL7QcLu6s0y8zYHtIXZ8XdneKDMcg4liQr/9oNlVoRFcZhWjLY+ASt9cjICQ==
azureStorageDocumentApiEndpoint: https://freeleaps1document.blob.core.windows.net/
metricsEnabled: "true"
probesEnabled: "true"

View File

@ -55,3 +55,7 @@ central-storage:
azureStorageDocumentApiKey: ""
# AZURE_STORAGE_DOCUMENT_API_ENDPOINT
azureStorageDocumentApiEndpoint: ""
# METRICS_ENABLED
metricsEnabled: "false"
# PROBES_ENABLED
probesEnabled: "false"

View File

@ -14,6 +14,5 @@ data:
MONGODB_URI: {{ .Values.content.configs.mongodbUri | b64enc | quote }}
FREELEAPS_WWW_AS_AZURE_CLIENT_SECRET: {{ .Values.content.configs.freeleapsWwwAsAzureClientSecret | b64enc | quote }}
CENTRAL_STORAGE_WEBAPI_URL_BASE: {{ .Values.content.configs.centralStorageWebapiUrlBase | b64enc | quote }}
METRICS_ENABLED: {{ .Values.content.serviceMonitor.enabled | default false | toString | b64enc }}
PROBES_ENABLED: {{ if and .Values.content.probes (gt (len .Values.content.probes) 0) }}{{ "true" | b64enc }}{{ else }}{{ "false" | b64enc }}{{ end }}
METRICS_ENABLED: {{ .Values.content.configs.metricsEnabled | default false | toString | b64enc }}
PROBES_ENABLED: {{ .Values.content.configs.probesEnabled | default false | toString | b64enc }}

View File

@ -93,13 +93,3 @@ spec:
name: content-config
key: {{ $key | snakecase | upper }}
{{- end }}
- name: METRICS_ENABLED
valueFrom:
secretKeyRef:
name: authentication-config
key: METRICS_ENABLED
- name: PROBES_ENABLED
valueFrom:
secretKeyRef:
name: authentication-config
key: PROBES_ENABLED

View File

@ -66,3 +66,5 @@ content:
mongodbUri: mongodb+srv://freeadmin:0eMV0bt8oyaknA0m@freeleaps2.zmsmpos.mongodb.net/?retryWrites=true&w=majority
freeleapsWwwAsAzureClientSecret: jTu8Q~WceiK-5dfZB44Ww-K4fVGi3_5tHNWYYbdX
centralStorageWebapiUrlBase: http://central-storage-service.freeleaps-prod.svc.freeleaps.cluster:8005/api/central_storage
metricsEnabled: "true"
probesEnabled: "true"

View File

@ -55,4 +55,8 @@ content:
freeleapsWwwAsAzureClientSecret: ""
# CENTRAL_STORAGE_WEBAPI_URL_BASE
centralStorageWebapiUrlBase: ""
# METRICS_ENABLED
metricsEnabled: "false"
# PROBES_ENABLED
probesEnabled: "false"

View File

@ -93,13 +93,4 @@ spec:
name: notification-config
key: {{ $key | snakecase | upper }}
{{- end }}
- name: METRICS_ENABLED
valueFrom:
secretKeyRef:
name: authentication-config
key: METRICS_ENABLED
- name: PROBES_ENABLED
valueFrom:
secretKeyRef:
name: authentication-config
key: PROBES_ENABLED

View File

@ -21,6 +21,5 @@ data:
SENDGRID_API_KEY: {{ .Values.notification.configs.sendgridApiKey | b64enc | quote }}
TWILIO_ACCOUNT_SID: {{ .Values.notification.configs.twilioAccountSid | b64enc | quote }}
TWILIO_AUTH_TOKEN: {{ .Values.notification.configs.twilioAuthToken | b64enc | quote }}
METRICS_ENABLED: {{ .Values.notification.serviceMonitor.enabled | default false | toString | b64enc }}
PROBES_ENABLED: {{ if and .Values.notification.probes (gt (len .Values.notification.probes) 0) }}{{ "true" | b64enc }}{{ else }}{{ "false" | b64enc }}{{ end }}
METRICS_ENABLED: {{ .Values.notification.configs.metricsEnabled | default false | toString | b64enc }}
PROBES_ENABLED: {{ .Values.notification.configs.probesEnabled | default false | toString | b64enc }}

View File

@ -73,3 +73,5 @@ notification:
sendgridApiKey: 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
twilioAccountSid: ACf8c9283a6acda060258eadb29be58bc8
twilioAuthToken: ef160748cc22c8b7195b49df4b8eca7e
metricsEnabled: "true"
probesEnabled: "true"

View File

@ -69,3 +69,7 @@ notification:
twilioAccountSid: ""
# TWILIO_AUTH_TOKEN
twilioAuthToken: ""
# METRICS_ENABLED
metricsEnabled: "false"
# PROBES_ENABLED
probesEnabled: "false"

View File

@ -93,13 +93,3 @@ spec:
name: payment-config
key: {{ $key | snakecase | upper }}
{{- end }}
- name: METRICS_ENABLED
valueFrom:
secretKeyRef:
name: authentication-config
key: METRICS_ENABLED
- name: PROBES_ENABLED
valueFrom:
secretKeyRef:
name: authentication-config
key: PROBES_ENABLED

View File

@ -14,5 +14,5 @@ data:
MONGODB_URI: {{ .Values.payment.configs.mongodbUri | b64enc | quote }}
STRIPE_API_KEY: {{ .Values.payment.configs.stripeApiKey | b64enc | quote }}
SITE_URL_ROOT: {{ .Values.payment.configs.siteUrlRoot | b64enc | quote }}
METRICS_ENABLED: {{ .Values.payment.serviceMonitor.enabled | default false | toString | b64enc }}
PROBES_ENABLED: {{ if and .Values.payment.probes (gt (len .Values.payment.probes) 0) }}{{ "true" | b64enc }}{{ else }}{{ "false" | b64enc }}{{ end }}
METRICS_ENABLED: {{ .Values.payment.configs.metricsEnabled | default false | toString | b64enc }}
PROBES_ENABLED: {{ .Values.payment.configs.probesEnabled | default false | toString | b64enc }}

View File

@ -66,3 +66,5 @@ payment:
mongodbUri: mongodb+srv://freeadmin:0eMV0bt8oyaknA0m@freeleaps2.zmsmpos.mongodb.net/?retryWrites=true&w=majority
stripeApiKey: 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
siteUrlRoot: https://freeleaps.mathmast.com
metricsEnabled: "true"
probesEnabled: "true"

View File

@ -55,3 +55,7 @@ payment:
stripeApiKey: ""
# SITE_URL_ROOT
siteUrlRoot: ""
# METRICS_ENABLED
metricsEnabled: "false"
# PROBES_ENABLED
probesEnabled: "false"