-
Choerodon平台版本:
-
运行环境: https://choerodon.com.cn
-
问题描述:
部署时的values的解析顺序问题,顺序希望和chart里写的顺序一致
JSONObject解析的默认采用Map,需要启用
Feature.OrderedField
才能采用LinkedHashMap
,保留原有顺序。 -
执行的操作:
-
报错信息(请尽量使用代码块或系统截图的形式展现):
-
建议:
gitops配置库里的,重新部署的修改
diff --git a/release-uat-common-service.yaml b/release-uat-common-service.yaml
index 835ab8bb028e0c1bd30952773e4a0ef3fdc366c7..0634726e2d776cb2d3af0227021db5f871d5966b 100644
--- a/release-uat-common-service.yaml
+++ b/release-uat-common-service.yaml
@@ -8,30 +8,31 @@ spec:
chartVersion: 2019.4.12-171422-master
repoUrl: http://chart.choerodon.com.cn/hscf/hscf-framework/
values: |-
- image:
- pullSecrets:
- - name: regcred
-
preJob:
preInitMetadata:
- enable: true
- image: registry.choerodon.com.cn/hscf-hscf-framework/metadata-tool:latest
datasource:
url:
username:
password:
-
+ nodeSelector: {}
env:
open:
- EUREKA_DEFAULT_ZONE: "http://uat-hcloudregister-0.register-service-headless.uat:8761/eureka/,http://uat-hcloudregister-1.register-service-headless.uat:8761/eureka/"
- JAVA_OPTS: "-XX:MaxRAMFraction=1"
- SPRING_CLOUD_CONFIG_ENABLED: "true"
- SPRING_CLOUD_CONFIG_DISCOVERY_ENABLED: "true"
- SPRING_CLOUD_CONFIG_LABEL: "master"
- SPRING_PROFILES_ACTIVE: "uat"
+ SPRING_PROFILES_ACTIVE: uat
+ SPRING_CLOUD_CONFIG_LABEL: master
+ SPRING_CLOUD_CONFIG_ENABLED: 'true'
+ SPRING_CLOUD_CONFIG_DISCOVERY_ENABLED: 'true'
+ EUREKA_DEFAULT_ZONE: http://uat-hcloudregister-0.register-service-headless.uat:8761/eureka/,http://uat-hcloudregister-1.register-service-headless.uat:8761/eureka/
+ tolerations: []
+ ports:
+ - name: http
+ containerPort: 8999
+ protocol: TCP
+ - name: management
+ containerPort: 8001
+ protocol: TCP
resources:
- limits:
- memory: 800Mi
requests:
memory: 800Mi
+ limits:
+ memory: 800Mi
\ No newline at end of file
chart里values.yaml的内容为:
# Default values.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
image:
repository:
pullPolicy: Always
pullSecrets:
preJob:
timeout: 300
preInitMetadata:
image: registry.choerodon.com.cn/hscf-hscf-framework/metadata-tool:latest
enable: true
datasource:
url:
username:
password:
env:
open:
EUREKA_DEFAULT_ZONE: ""
JAVA_OPTS: "-XX:MaxRAMFraction=1"
metrics:
port: 8001
path: /prometheus
group: spring-boot
ports:
- name: http
containerPort: 8999
protocol: TCP
- name: management
containerPort: 8001
protocol: TCP
service:
enable: false
name: common-service
type: ClusterIP
httpPort: 8999
nodePort:
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources,such as Minikube. If you do want to specify resources,uncomment the following
# lines,adjust them as necessary,and remove the curly braces after 'resources:'.
limits:
# cpu: 100m
memory: 2Gi
requests:
# cpu: 100m
memory: 1Gi
probes:
readiness:
httpGet:
path: /health
port: management
failureThreshold: 3
initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
nodeSelector: {}
tolerations: []
例如nodeSelector直接从最后放到了中间了,和chart里的values.yaml里的顺序不一致
1 个赞
了解。我去看看
下个版本已修复
1 个赞