Browse Source

docker 配置 vtd 镜像

martin 2 years ago
parent
commit
b66b54b673

+ 3 - 3
simulation-resource-scheduler/src/main/java/com/css/simulation/resource/scheduler/configuration/algorithm/AlgorithmPlatform.java

@@ -20,7 +20,7 @@ public class AlgorithmPlatform {
     @Resource
     OauthParameter oauthParameter;
     @Resource
-    StringRedisTemplate redisTemplate;
+    StringRedisTemplate stringRedisTemplate;
     @Resource
     CloseableHttpClient closeableHttpClient;
     @Resource
@@ -45,7 +45,7 @@ public class AlgorithmPlatform {
     @SneakyThrows
     private String getToken() {
 
-        String token = redisTemplate.opsForValue().get(TOKEN_KEY);
+        String token = stringRedisTemplate.opsForValue().get(TOKEN_KEY);
         if (ObjectUtil.isNull(token)) {//token失效重新获取
             String tokenUri = oauthParameter.getTokenUri();
             String appid = oauthParameter.getAppid();
@@ -58,7 +58,7 @@ public class AlgorithmPlatform {
                 token = dataNode.path("access_token").asText();
                 if (ObjectUtil.isNotNull(token)) {
                     int expiresSec = dataNode.path("expires_in_sec").asInt();
-                    redisTemplate.opsForValue().set(TOKEN_KEY, token, expiresSec / 60);
+                    stringRedisTemplate.opsForValue().set(TOKEN_KEY, token, expiresSec / 60);
                 }
             }
         }

+ 1 - 1
simulation-resource-scheduler/src/main/resources/kubernetes/template/pod/pod-template.yaml

@@ -16,7 +16,7 @@ spec:
         - scgpu001
   containers:
     - name: vtd-container
-      image: vtd.run.perception:latest
+      image: vtd-image
       imagePullPolicy: IfNotPresent
       command: [ "/Controller/VTDController", "/Controller/config/docker_cloud.ini", "kafkaTopic" ]
       env: