Мне нужна помощь по развертыванию на весеннем облачном сервере потоков данных.Я хочу развернуть приложение с помощью helm и развернуть потоки в разных пространствах имен.Несмотря на то, что я обновляю конфигурационную карту Skipper с несколькими учетными записями и пространствами имен, проверка потоковых платформ показывает учетные записи с пространством имен, которые я развернул в облаке Spring и Skipper.Кажется, он игнорирует значения пространства имен в spring.application.json.Кто-нибудь может мне помочь по этому поводу?
Это шаблон, который я развернул в кластере:
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "scdf.fullname" . }}-skipper
labels:
app: {{ template "scdf.name" . }}
component: skipper
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
data:
spring.application.json:
'{"spring.cloud.skipper.server.enableLocalPlatform" : false,
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformName }}.environmentVariables" :
"SPRING_RABBITMQ_HOST=${{ printf "{" }}{{ template "scdf.envrelease" .
}}_RABBITMQ_SERVICE_HOST},SPRING_RABBITMQ_PORT=${{ printf "{" }}{{
template "scdf.envrelease" .
}}_RABBITMQ_SERVICE_PORT_AMQP},SPRING_RABBITMQ_USERNAME={{
.Values.rabbitmq.rabbitmqUsername }},
SPRING_RABBITMQ_PASSWORD=${RABBITMQ_PASSWORD}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformName }}.memory" : "{{
.Values.deployer.resourceLimits.memory }}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformName }}.cpu" : "{{
.Values.deployer.resourceLimits.cpu }}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformName }}.createDeployment" : true,
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameDev }}.environmentVariables" :
"SPRING_RABBITMQ_HOST=${{ printf "{" }}{{ template "scdf.envrelease" .
}}_RABBITMQ_SERVICE_HOST}, SPRING_RABBITMQ_PORT=${{ printf "{" }}{{
template "scdf.envrelease" .
}}_RABBITMQ_SERVICE_PORT_AMQP},SPRING_RABBITMQ_USERNAME={{
.Values.rabbitmq.rabbitmqUsername
}},SPRING_RABBITMQ_PASSWORD=${RABBITMQ_PASSWORD}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameDev }}.memory" : "{{
.Values.deployer.resourceLimits.memory }}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameDev }}.cpu" : "{{
.Values.deployer.resourceLimits.cpu }}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameDev }}.createDeployment" : true,
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameDev }}.namespace" : "str-runtime-dev",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNamePreview }}.environmentVariables" :
"SPRING_RABBITMQ_HOST=${{ printf "{" }}{{ template "scdf.envrelease" .
}}_RABBITMQ_SERVICE_HOST}, SPRING_RABBITMQ_PORT=${{ printf "{" }}{{
template "scdf.envrelease" .
}}_RABBITMQ_SERVICE_PORT_AMQP},SPRING_RABBITMQ_USERNAME={{
.Values.rabbitmq.rabbitmqUsername
}},SPRING_RABBITMQ_PASSWORD=${RABBITMQ_PASSWORD}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNamePreview }}.memory" : "{{
.Values.deployer.resourceLimits.memory }}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNamePreview }}.cpu" : "{{
.Values.deployer.resourceLimits.cpu }}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNamePreview }}.createDeployment" : true,
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNamePreview }}.namespace" : "str",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameUat }}.environmentVariables" :
"SPRING_RABBITMQ_HOST=${{ printf "{" }}{{ template "scdf.envrelease" .
}}_RABBITMQ_SERVICE_HOST}, SPRING_RABBITMQ_PORT=${{ printf "{" }}{{
template "scdf.envrelease" .
}}_RABBITMQ_SERVICE_PORT_AMQP},SPRING_RABBITMQ_USERNAME={{
.Values.rabbitmq.rabbitmqUsername
}},SPRING_RABBITMQ_PASSWORD=${RABBITMQ_PASSWORD}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameUat }}.memory" : "{{
.Values.deployer.resourceLimits.memory }}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameUat }}.cpu" : "{{
.Values.deployer.resourceLimits.cpu }}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameUat }}.createDeployment" : true,
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameUat }}.namespace" : "str-runtime-uat",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameProd }}.environmentVariables" :
"SPRING_RABBITMQ_HOST=${{ printf "{" }}{{ template "scdf.envrelease" .
}}_RABBITMQ_SERVICE_HOST}, SPRING_RABBITMQ_PORT=${{ printf "{" }}{{
template "scdf.envrelease" .
}}_RABBITMQ_SERVICE_PORT_AMQP},SPRING_RABBITMQ_USERNAME={{
.Values.rabbitmq.rabbitmqUsername
}},SPRING_RABBITMQ_PASSWORD=${RABBITMQ_PASSWORD}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameProd }}.memory" : "{{
.Values.deployer.resourceLimits.memory }}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameProd }}.cpu" : "{{
.Values.deployer.resourceLimits.cpu }}",
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameProd }}.createDeployment" : true,
"spring.cloud.skipper.server.platform.kubernetes.accounts.{{
.Values.skipper.platformNameProd }}.namespace" : "str-runtime-prod"}'
И это вывод потоковых платформ:
runtime-uat │kubernetes│master url = [https://10.96.0.1:443/], namespace = [str], api version = [v1]║
runtime-prod│kubernetes│master url = [https://10.96.0.1:443/], namespace = [str], api version = [v1]║
preview │kubernetes│master url = [https://10.96.0.1:443/], namespace = [str], api version = [v1]║
minikube │kubernetes│master url = [https://10.96.0.1:443/], namespace = [str], api version = [v1]║
runtime-dev │kubernetes│master url = [https://10.96.0.1:443/], namespace = [str], api version = [v1]║e
Изменить: я попробовал значения ниже и вот результаты:
Файл yaml развертывания шкипера:
- name: SPRING_APPLICATION_JSON
value: '{"spring.cloud.skipper.server.enableLocalPlatform" : false,"SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-dev]_ENVIRONMENT_VARIABLES" :"SPRING_RABBITMQ_HOST=${RABBITMQ_SERVICE_HOST},SPRING_RABBITMQ_PORT=${RABBITMQ_SERVICE_PORT}","SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-dev]_MEMORY" : "1024Mi","SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-dev]_CREATE_DEPLOYMENT" : true,"SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-dev]_NAMESPACE" : "namespace1","SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-qa]_ENVIRONMENT_VARIABLES" : "SPRING_RABBITMQ_HOST=${RABBITMQ_SERVICE_HOST},SPRING_RABBITMQ_PORT=${RABBITMQ_SERVICE_PORT}","SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-qa]_MEMORY" : "1024Mi","SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-qa]_CREATE_DEPLOYMENT" : true,"SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-qa]_NAMESPACE" : "namespace2"}'
1- переменная Env модуля шкипера
SPRING_APPLICATION_JSON= .
{"spring.cloud.skipper.server.enableLocalPlatform" :
false,"SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-dev]_ENVIRONMENT_VARIABLES":"SPRING_RABBITMQ_HOST=${RABBITMQ_SERVICE_HOST},SPRING_RABBITMQ_PORT=${RABBITMQ_SERVICE_PORT}","SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-dev]_MEMORY" : "1024Mi","SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-dev]_CREATE_DEPLOYMENT" : true,"SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-dev]_NAMESPACE" : "namespace1","SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-qa]_ENVIRONMENT_VARIABLES" : "SPRING_RABBITMQ_HOST=${RABBITMQ_SERVICE_HOST},SPRING_RABBITMQ_PORT=${RABBITMQ_SERVICE_PORT}","SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-qa]_MEMORY" : "1024Mi","SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-qa]_CREATE_DEPLOYMENT" : true,"SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_KUBERNETES_ACCOUNTS[k8s-qa]_NAMESPACE" : "namespace2"}
2 - Скриншот для платформ Вывод списка потоковых платформ