updated docker/helm files for svc,ping,robot,ssh, and o1
authorChen, Jackie (jv246a) <jv246a@att.com>
Tue, 19 Jan 2021 21:14:25 +0000 (16:14 -0500)
committerZhe Huang <zhehuang@research.att.com>
Fri, 29 Jan 2021 18:28:19 +0000 (18:28 +0000)
Change-Id: I2ee5e79cf429d41e9d3de44e1f7ba3346f8659d8
Signed-off-by: Chen, Jackie <jv246a@att.com>
16 files changed:
otf-ping-test-head/helm/otf-ping-test-head/templates/deployment.yaml
otf-ping-test-head/helm/otf-ping-test-head/values.yaml
otf-ping-test-head/otfPingTestHead.py
otf-robot-test-head/helm/otf-robot-test-head/templates/deployment.yaml
otf-robot-test-head/helm/otf-robot-test-head/values.yaml
otf-robot-test-head/run.py
otf-service-api/helm/otf-service-api/Chart.yaml
otf-service-api/helm/otf-service-api/templates/deployment.yaml
otf-service-api/helm/otf-service-api/templates/service.yaml
otf-service-api/src/main/resources/application.properties
otf-ssh-test-head/helm/otf-ssh-test-head/templates/deployment.yaml
otf-ssh-test-head/helm/otf-ssh-test-head/templates/secret.yaml
otf-ssh-test-head/helm/otf-ssh-test-head/values.yaml
otf-ssh-test-head/ssh_test_head.py
smo-o1-vth/helm/o1-vth/templates/deployment.yaml
smo-o1-vth/helm/o1-vth/values.yaml

index b6cc154..0a0455c 100644 (file)
@@ -26,6 +26,10 @@ spec:
         app: {{ .Values.appName}}\r
         version: {{.Values.version}}\r
     spec:\r
+      {{ if .Values.pullSecret }}\r
+      imagePullSecrets:\r
+        - name: {{ .Values.pullSecret }}\r
+      {{ end }}\r
       serviceAccount: default\r
       volumes:\r
       - name: {{ .Values.appName}}-cert-volume\r
@@ -40,12 +44,12 @@ spec:
       {{ if or (eq .Values.env "st") (eq .Values.env "prod-dr")}}\r
       {{else}}\r
       - name: logging-pvc\r
-        persistentVolumeClaim:\r
-          {{if eq .Values.env "prod"}}\r
-          claimName: {{ .Values.pvc.prod | quote }}\r
-          {{ else }}\r
-          claimName: {{ .Values.pvc.dev | quote }}\r
-          {{ end }}\r
+        #persistentVolumeClaim:\r
+        #  {{if eq .Values.env "prod"}}\r
+        #  claimName: {{ .Values.pvc.prod | quote }}\r
+        #  {{ else }}\r
+        #  claimName: {{ .Values.pvc.dev | quote }}\r
+        #  {{ end }}\r
       {{end}}\r
       containers:\r
       - name: {{ .Values.appName}}\r
@@ -54,7 +58,7 @@ spec:
         ports:\r
         - name: http\r
           containerPort: 5000\r
-          nodePort: {{.Values.nodePort}}\r
+          #nodePort: {{.Values.nodePort}}\r
           protocol: TCP\r
         {{ if eq .Values.env "st"}}\r
         resources:\r
@@ -92,7 +96,7 @@ spec:
           httpGet:\r
             path: {{.Values.health}}\r
             port: http\r
-            scheme: HTTPS\r
+            scheme: HTTP\r
             httpHeaders:\r
               - name: X-Custom-Header\r
                 value: Alive\r
@@ -103,7 +107,7 @@ spec:
           httpGet:\r
             path: {{.Values.health}}\r
             port: http\r
-            scheme: HTTPS\r
+            scheme: HTTP\r
             httpHeaders:\r
               - name: X-Custom-Header\r
                 value: Ready\r
index bb24ca1..4a447ca 100644 (file)
@@ -3,10 +3,11 @@ env: dev
 version: 0.0.1-SNAPSHOT\r
 image: otf-ping-test-head:0.0.1-SNAPSHOT\r
 namespace: org-oran-otf\r
-nodePort: 32223\r
+nodePort: 32225\r
 replicas: 1\r
 health : /otf/vth/ping/v1/health\r
 sharedCert: otf-cert-secret-builder\r
+#pullSecret: ""\r
 pvc:\r
   dev: org-oran-otf-dev-logs-pv\r
   prod: org-oran-otf-prod-logs-pv\r
index 1163034..5cf0b4a 100644 (file)
@@ -192,5 +192,5 @@ if __name__ == '__main__':
        app.logger.setLevel(logging.INFO)\r
        app.logger.addHandler(logHandler)\r
        context = ('opt/cert/otf.pem', 'opt/cert/privateKey.pem')\r
-       app.run(debug = False, host = '0.0.0.0', port = 5000, ssl_context = context)\r
-       app.run(debug = False, host = '0.0.0.0', port = 5000)\r
+       #app.run(debug = False, host = '0.0.0.0', port = 5000, ssl_context = context)\r
+       app.run(debug = False, host = '0.0.0.0', port = 5000)\r
index 70d6e4c..d6d372d 100644 (file)
@@ -26,6 +26,10 @@ spec:
         app: {{ .Values.appName}}\r
         version: {{.Values.version}}\r
     spec:\r
+      {{ if .Values.pullSecret }}\r
+      imagePullSecrets:\r
+        - name: {{ .Values.pullSecret }}\r
+      {{ end }}\r
       serviceAccount: default\r
       volumes:\r
       - name: {{ .Values.appName}}-cert-volume\r
@@ -40,12 +44,12 @@ spec:
       {{ if or (eq .Values.env "st") (eq .Values.env "prod-dr")}}\r
       {{else}}\r
       - name: logging-pvc\r
-        persistentVolumeClaim:\r
-          {{if eq .Values.env "prod"}}\r
-          claimName: {{ .Values.pvc.prod | quote }}\r
-          {{ else }}\r
-          claimName: {{ .Values.pvc.dev | quote }}\r
-          {{ end }}\r
+        persistentVolumeClaim:\r
+          {{if eq .Values.env "prod"}}\r
+          claimName: {{ .Values.pvc.prod | quote }}\r
+          {{ else }}\r
+          claimName: {{ .Values.pvc.dev | quote }}\r
+          {{ end }}\r
       {{end}}\r
       containers:\r
       - name: {{ .Values.appName}}\r
@@ -54,7 +58,7 @@ spec:
         ports:\r
         - name: http\r
           containerPort: 5000\r
-          nodePort: {{.Values.nodePort}}\r
+          nodePort: {{.Values.nodePort}}\r
           protocol: TCP\r
         env:\r
         - name: NAMESPACE\r
@@ -64,41 +68,63 @@ spec:
         - name: APP_VERSION\r
           value: {{.Values.version}}\r
         - name: OTF_MONGO_HOSTS\r
-          {{ if or (eq .Values.env "prod") (eq .Values.env "prod-dr")}}\r
-          value: {{ .Values.mongo.prod.OTF_MONGO_HOSTS | quote}}\r
-          {{ else if eq .Values.env "st" }}\r
-          value: {{ .Values.mongo.st.OTF_MONGO_HOSTS | quote}}\r
-          {{ else }}\r
-          value: {{ .Values.mongo.dev.OTF_MONGO_HOSTS | quote}}\r
-          {{ end }}\r
+          value: {{ .Values.one_click.mongo.ip | quote }}\r
+          # {{ if or (eq .Values.env "prod") (eq .Values.env "prod-dr")}}\r
+          # value: {{ .Values.mongo.prod.OTF_MONGO_HOSTS | quote}}\r
+          # {{ else if eq .Values.env "st" }}\r
+          # value: {{ .Values.mongo.st.OTF_MONGO_HOSTS | quote}}\r
+          # {{ else }}\r
+          # value: {{ .Values.mongo.dev.OTF_MONGO_HOSTS | quote}}\r
+          # {{ end }}\r
         - name: OTF_MONGO_DATABASE\r
-          {{ if or (eq .Values.env "prod") (eq .Values.env "prod-dr")}}\r
-          value: {{ .Values.mongo.prod.OTF_MONGO_DBOTF | quote }}\r
-          {{ else if eq .Values.env "st" }}\r
-          value: {{ .Values.mongo.st.OTF_MONGO_DBOTF | quote }}\r
-          {{ else }}\r
-          value: {{ .Values.mongo.dev.OTF_MONGO_DBOTF | quote }}\r
-          {{ end }}\r
+          valueFrom:\r
+            secretKeyRef:\r
+              name: {{ .Values.one_click.mongo.secret_name}}\r
+              key: mongodb-database\r
+              optional: false\r
+          # {{ if or (eq .Values.env "prod") (eq .Values.env "prod-dr")}}\r
+          # value: {{ .Values.mongo.prod.OTF_MONGO_DBOTF | quote }}\r
+          # {{ else if eq .Values.env "st" }}\r
+          # value: {{ .Values.mongo.st.OTF_MONGO_DBOTF | quote }}\r
+          # {{ else }}\r
+          # value: {{ .Values.mongo.dev.OTF_MONGO_DBOTF | quote }}\r
+          # {{ end }}\r
         - name: OTF_MONGO_REPLICASET\r
-          {{ if or (eq .Values.env "prod") (eq .Values.env "prod-dr")}}\r
-          value: {{ .Values.mongo.prod.OTF_MONGO_REPLICASET | quote }}\r
-          {{ else if eq .Values.env "st" }}\r
-          value: {{ .Values.mongo.st.OTF_MONGO_REPLICASET | quote }}          \r
-          {{ else }}\r
-          value: {{ .Values.mongo.dev.OTF_MONGO_REPLICASET | quote }}\r
-          {{ end }}\r
+          valueFrom:\r
+            secretKeyRef:\r
+              name: {{ .Values.one_click.mongo.secret_name}}\r
+              key: mongodb-replicaSet\r
+              optional: false\r
+          # {{ if or (eq .Values.env "prod") (eq .Values.env "prod-dr")}}\r
+          # value: {{ .Values.mongo.prod.OTF_MONGO_REPLICASET | quote }}\r
+          # {{ else if eq .Values.env "st" }}\r
+          # value: {{ .Values.mongo.st.OTF_MONGO_REPLICASET | quote }}          \r
+          # {{ else }}\r
+          # value: {{ .Values.mongo.dev.OTF_MONGO_REPLICASET | quote }}\r
+          # {{ end }}\r
         - name: OTF_MONGO_USERNAME\r
           valueFrom:\r
             secretKeyRef:\r
-              name: {{ .Values.appName}}\r
-              key: mongo_username\r
-              optional: true\r
+              name: {{ .Values.one_click.mongo.secret_name}}\r
+              key: mongodb-username\r
+              optional: false\r
+          # valueFrom:\r
+          #   secretKeyRef:\r
+          #     name: {{ .Values.appName}}\r
+          #     key: mongo_username\r
+          #     optional: true\r
         - name: OTF_MONGO_PASSWORD\r
+          # value: {{ .Values.mongo.password }}\r
           valueFrom:\r
             secretKeyRef:\r
-              name: {{ .Values.appName}}\r
-              key: mongo_password\r
-              optional: true\r
+              name: {{ .Values.one_click.mongo.secret_name}}\r
+              key: mongodb-password\r
+              optional: false\r
+          # valueFrom:\r
+          #   secretKeyRef:\r
+          #     name: {{ .Values.appName}}\r
+          #     key: mongo_password\r
+          #     optional: true\r
         - name: APP_SETTINGS\r
           value: {{ .Values.robot.APP_SETTINGS | quote }} \r
         {{ if eq .Values.env "st"}}\r
@@ -130,22 +156,24 @@ spec:
           httpGet:\r
             path: {{.Values.health}}\r
             port: http\r
-            scheme: HTTPS\r
+            scheme: HTTP\r
             httpHeaders:\r
               - name: X-Custom-Header\r
                 value: Alive\r
-          initialDelaySeconds: 30\r
+          initialDelaySeconds: 60\r
+          #30\r
           timeoutSeconds: 30\r
           periodSeconds: 30\r
         readinessProbe:\r
           httpGet:\r
             path: {{.Values.health}}\r
             port: http\r
-            scheme: HTTPS\r
+            scheme: HTTP\r
             httpHeaders:\r
               - name: X-Custom-Header\r
                 value: Ready\r
-          initialDelaySeconds: 30\r
+          initialDelaySeconds: 60\r
+          # 30\r
           timeoutSeconds: 30\r
           periodSeconds: 30\r
       restartPolicy: Always\r
index 111d059..38957b9 100644 (file)
@@ -7,25 +7,58 @@ nodePort: 32224
 replicas: 1\r
 health : /otf/vth/robot/v1/health\r
 sharedCert: otf-cert-secret-builder\r
+#pullSecret: ""\r
 robot:\r
   APP_SETTINGS: "app.configuration.DevelopmentConfiguration"\r
 pvc:\r
   dev: org-oran-otf-dev-logs-pv\r
   prod: org-oran-otf-prod-logs-pv\r
+\r
+one_click:\r
+  enabled: false\r
+  mongo:\r
+    replicaset: rs0\r
+    database: otf\r
+    secret_name: mongo-mongodb\r
+    ip: 10.0.51.84:27017\r
+    username: "!"\r
+    password: "!"\r
+    \r
 mongo:\r
   prod:\r
-    OTF_MONGO_HOSTS: "localhost:18720,localhost:18720,localhost:18720/"\r
+    OTF_MONGO_HOSTS: "10.0.136.214:27017/"\r
     OTF_MONGO_DBOTF: "otf"\r
-    OTF_MONGO_REPLICASET: "otf-rs-prod2"\r
+    OTF_MONGO_REPLICASET: "rs0"\r
   dev:\r
-    OTF_MONGO_HOSTS: "localhost:27017,localhost:27017,localhost:27017/"\r
+    OTF_MONGO_HOSTS: "10.0.136.214:27017/"\r
     OTF_MONGO_DBOTF: "otf"\r
-    OTF_MONGO_REPLICASET: "mongoOTF"\r
+    OTF_MONGO_REPLICASET: "rs0"\r
   st:\r
-    OTF_MONGO_HOSTS: "localhost:27017,localhost:27017,localhost:27017/"\r
+    OTF_MONGO_HOSTS: "10.0.136.214:27017/"\r
     OTF_MONGO_DBOTF: "otf_st"\r
-    OTF_MONGO_REPLICASET: "mongoOTF"\r
+    OTF_MONGO_REPLICASET: "rs0"\r
+  username: "otfuser"\r
+  password: "Today.123"\r
+\r
+# mongo:\r
+#   prod:\r
+#     OTF_MONGO_HOSTS: "localhost:18720,localhost:18720,localhost:18720/"\r
+#     OTF_MONGO_DBOTF: "otf"\r
+#     OTF_MONGO_REPLICASET: "otf-rs-prod2"\r
+#   dev:\r
+#     OTF_MONGO_HOSTS: "10.0.136.214:27017/"\r
+#     #"localhost:27017,localhost:27017,localhost:27017/"\r
+#     OTF_MONGO_DBOTF: "otf"\r
+#     OTF_MONGO_REPLICASET: "rs0"\r
+#     # "mongoOTF"\r
+#   st:\r
+#     OTF_MONGO_HOSTS: "localhost:27017,localhost:27017,localhost:27017/"\r
+#     OTF_MONGO_DBOTF: "otf_st"\r
+#     OTF_MONGO_REPLICASET: "mongoOTF"\r
 \r
-  username: ""\r
-  password: ""\r
+#   username: "otfuser"\r
+#   # "username"\r
+#   password: "Today.123"\r
+#   # "password"\r
 sharedSecret: otf-aaf-credential-generator\r
+\r
index bbb27e9..4527bd0 100644 (file)
@@ -21,10 +21,10 @@ if __name__ == '__main__':
 \r
     # Set SSL context with the certificate chain and the private RSA key.\r
     context = ('opt/cert/otf.pem', 'opt/cert/privateKey.pem')\r
-    app.run(\r
-        debug=app.config['DEBUG'],\r
-        host='0.0.0.0', port=5000,\r
-        use_reloader=True,\r
-        ssl_context=context)\r
+    app.run(\r
+        debug=app.config['DEBUG'],\r
+        host='0.0.0.0', port=5000,\r
+        use_reloader=True,\r
+        ssl_context=context)\r
     # Run without ssl\r
-       app.run(debug=app.config['DEBUG'], host='0.0.0.0', use_reloader=True, port=5000)
\ No newline at end of file
+       app.run(debug=app.config['DEBUG'], host='0.0.0.0', use_reloader=True, port=5000)
\ No newline at end of file
index 7c05894..3496836 100644 (file)
@@ -1,5 +1,5 @@
 apiVersion: v1\r
 appVersion: "1.0"\r
 description: A Helm chart the OTF TCU Service API\r
-name: otf-service-api\r
+name: otf-oran-service-api\r
 version: 0.0.1-SNAPSHOT
\ No newline at end of file
index 3a406d3..819085c 100644 (file)
@@ -7,6 +7,14 @@ metadata:
     app: {{ .Values.appName}}\r
     version: {{.Values.version}}\r
 spec:\r
+  revisionHistoryLimit: 1   # keep one replica set to allow rollback\r
+  minReadySeconds: 10\r
+  # strategy:\r
+  #   # indicate which strategy we want for rolling update\r
+  #   type: RollingUpdate\r
+  #   rollingUpdate:\r
+  #     maxSurge: 1\r
+  #     maxUnavailable: 1\r
   {{if or (eq .Values.env "prod") (eq .Values.env "prod-dr")}}\r
   replicas: {{ .Values.replicas.prod}}\r
   {{ else if  eq .Values.env "st"}}\r
@@ -24,19 +32,23 @@ spec:
         app: {{ .Values.appName}}\r
         version: {{.Values.version}}\r
     spec:\r
-      revisionHistoryLimit: 1   # keep one replica set to allow rollback\r
-      minReadySeconds: 10\r
-      strategy:\r
-        # indicate which strategy we want for rolling update\r
-        type: RollingUpdate\r
-        rollingUpdate:\r
-          maxSurge: 1\r
-          maxUnavailable: 1\r
+      # revisionHistoryLimit: 1   # keep one replica set to allow rollback\r
+      # minReadySeconds: 10\r
+      # strategy:\r
+      #   # indicate which strategy we want for rolling update\r
+      #   type: RollingUpdate\r
+      #   rollingUpdate:\r
+      #     maxSurge: 1\r
+      #     maxUnavailable: 1\r
+      {{ if .Values.pullSecret }}\r
+      imagePullSecrets:\r
+        - name: {{ .Values.pullSecret }}\r
+      {{ end }}\r
       serviceAccount: default\r
       volumes:\r
-      - name: {{ .Values.appName}}-aaf-volume\r
-        secret:\r
-          secretName: {{.Values.sharedSecret}}\r
+#      - name: {{ .Values.appName}}-aaf-volume\r
+#        secret:\r
+#          secretName: {{.Values.sharedSecret}}\r
       - name: {{ .Values.appName}}-keyfile-volume\r
         secret:\r
           secretName: {{.Values.sharedSecret}}\r
@@ -59,13 +71,13 @@ spec:
             {{ end }}          \r
       {{ if or (eq .Values.env "st") (eq .Values.env "prod-dr")}}\r
       {{else}}\r
-      - name: logging-pvc\r
-        persistentVolumeClaim:\r
-          {{if eq .Values.env "prod"}}\r
-          claimName: {{ .Values.pvc.prod | quote }}\r
-          {{ else }}\r
-          claimName: {{ .Values.pvc.dev | quote }}\r
-          {{ end }}\r
+#      - name: logging-pvc\r
+#        persistentVolumeClaim:\r
+#          {{if eq .Values.env "prod"}}\r
+#          claimName: {{ .Values.pvc.prod | quote }}\r
+#          {{ else }}\r
+#          claimName: {{ .Values.pvc.dev | quote }}\r
+#          {{ end }}\r
       {{end}}\r
       containers:\r
       - name: {{ .Values.appName}}\r
@@ -74,25 +86,25 @@ spec:
         ports:\r
         - name: https\r
           containerPort: 8443\r
-          nodePort: {{.Values.nodePort}}\r
+          nodePort: {{.Values.nodePort}}\r
           protocol: TCP\r
-        {{ if eq .Values.env "st"}}\r
-        resources:\r
-          limits: \r
-            memory: "3Gi"\r
-            cpu: "1.8"\r
-          requests:\r
-            memory: "2Gi"\r
-            cpu: "1"\r
-        {{else}}  \r
-        resources:\r
-          limits:\r
-            memory: "6Gi"\r
-            cpu: "4"\r
-          requests:\r
-            memory: "2Gi"\r
-            cpu: "1.5"\r
-        {{ end }}\r
+       # {{ if eq .Values.env "st"}}\r
+       # resources:\r
+       #   limits: \r
+       #     memory: "3Gi"\r
+       #     cpu: "1.8"\r
+       #   requests:\r
+       #     memory: "2Gi"\r
+       #     cpu: "1"\r
+       # {{else}}  \r
+       # resources:\r
+       #   limits:\r
+       #     memory: "6Gi"\r
+       #     cpu: "4"\r
+       #   requests:\r
+       #     memory: "2Gi"\r
+       #     cpu: "1.5"\r
+       # {{ end }}\r
         env:\r
         - name: NAMESPACE\r
           value: {{.Values.namespace}}\r
@@ -124,12 +136,12 @@ spec:
               name: {{ .Values.sharedSecret}}\r
               key: aaf_password\r
               optional: true\r
-        - name: CADI_KEYFILE\r
-          valueFrom:\r
-            secretKeyRef:\r
-              name: {{ .Values.sharedSecret}}\r
-              key: keyfile_secret_path\r
-              optional: true\r
+        - name: CADI_KEYFILE\r
+          valueFrom:\r
+            secretKeyRef:\r
+              name: {{ .Values.sharedSecret}}\r
+              key: keyfile_secret_path\r
+              optional: true\r
         - name: CADI_HOSTNAME\r
           {{if eq .Values.env "prod"}}\r
           value: {{ .Values.cadiHostname.prod | quote }}\r
@@ -143,41 +155,63 @@ spec:
         - name: APP_VERSION\r
           value: {{.Values.version}}\r
         - name: OTF_MONGO_HOSTS\r
-          {{if or (eq .Values.env "prod") (eq .Values.env "prod-dr")}}\r
-          value: {{ .Values.otf.mongo.prod.host | quote }}\r
-          {{ else if eq  .Values.env "st" }}\r
-          value: {{ .Values.otf.mongo.st.host | quote }}\r
-          {{ else }}\r
-          value: {{ .Values.otf.mongo.dev.host | quote }}\r
-          {{ end }}\r
+          value: {{ .Values.one_click.mongo.ip | quote }}\r
+          #valueFrom:\r
+          #  secretKeyRef:\r
+          #    name: {{ .Values.one_click.mongo_secret_name}}\r
+          #    key: mongodb_ip\r
+          #    optional: false\r
+          #{{if or (eq .Values.env "prod") (eq .Values.env "prod-dr")}}\r
+          #value: {{ .Values.otf.mongo.prod.host | quote }}\r
+          #{{ else if eq  .Values.env "st" }}\r
+          #value: {{ .Values.otf.mongo.st.host | quote }}\r
+          #{{ else }}\r
+          #value: {{ .Values.otf.mongo.dev.host | quote }}\r
+          #{{ end }}\r
         - name: OTF_MONGO_USERNAME\r
+          #value: root\r
+          #value: otfuser\r
           valueFrom:\r
             secretKeyRef:\r
-              name: {{ .Values.appName}}\r
-              key: mongo_username\r
-              optional: true\r
+              name: {{ .Values.one_click.mongo.secret_name}}\r
+              key: mongodb-username\r
+              optional: false\r
         - name: OTF_MONGO_PASSWORD\r
+          #value: otf.123\r
+          #value: Today.123\r
           valueFrom:\r
             secretKeyRef:\r
-              name: {{ .Values.appName}}\r
-              key: mongo_password\r
-              optional: true\r
+              name: {{ .Values.one_click.mongo.secret_name}}\r
+              key: mongodb-password\r
+              optional: false\r
         - name: OTF_MONGO_REPLICASET\r
-          {{if or (eq .Values.env "prod") (eq .Values.env "prod-dr")}}\r
-          value: {{ .Values.otf.mongo.prod.replicaSet | quote }}\r
-          {{else if  eq .Values.env "st"}}\r
-          value: {{ .Values.otf.mongo.st.replicaSet | quote }}\r
-          {{ else }}\r
-          value: {{ .Values.otf.mongo.dev.replicaSet | quote }}\r
-          {{ end }}\r
+          # value: {{ .Values.one_click.mongo.replicaset | quote }}\r
+          valueFrom:\r
+            secretKeyRef:\r
+              name: {{ .Values.one_click.mongo.secret_name}}\r
+              key: mongodb-replicaSet\r
+              optional: false\r
+          #{{if or (eq .Values.env "prod") (eq .Values.env "prod-dr")}}\r
+          #value: {{ .Values.otf.mongo.prod.replicaSet | quote }}\r
+          #{{else if  eq .Values.env "st"}}\r
+          #value: {{ .Values.otf.mongo.st.replicaSet | quote }}\r
+          #{{ else }}\r
+          #value: {{ .Values.otf.mongo.dev.replicaSet | quote }}\r
+          #{{ end }}\r
         - name: OTF_MONGO_DATABASE\r
-          {{if or (eq .Values.env "prod") (eq .Values.env "prod-dr")}}\r
-          value: {{ .Values.otf.mongo.prod.database | quote }}\r
-          {{else if  eq .Values.env "st"}}\r
-          value: {{ .Values.otf.mongo.st.database | quote }}\r
-          {{ else }}\r
-          value: {{ .Values.otf.mongo.dev.database | quote }}\r
-          {{ end }}\r
+          # value: {{ .Values.one_click.mongo.database | quote }}\r
+          valueFrom:\r
+            secretKeyRef:\r
+              name: {{ .Values.one_click.mongo.secret_name}}\r
+              key: mongodb-database\r
+              optional: false\r
+          #{{if or (eq .Values.env "prod") (eq .Values.env "prod-dr")}}\r
+          #value: {{ .Values.otf.mongo.prod.database | quote }}\r
+          #{{else if  eq .Values.env "st"}}\r
+          #value: {{ .Values.otf.mongo.st.database | quote }}\r
+          #{{ else }}\r
+          #value: {{ .Values.otf.mongo.dev.database | quote }}\r
+          #{{ end }}\r
         - name: otf.camunda.host\r
           {{if eq .Values.env "prod"}}\r
           value: {{ .Values.otf.camunda.prod.host | quote }}\r
@@ -238,7 +272,7 @@ spec:
           value: {{ .Values.cert.st.path | quote }}\r
           {{ else }}\r
           value: {{ .Values.cert.dev.path | quote }}\r
-          {{ end }}  \r
+          {{ end }}\r
         - name: OTF_CERT_PASS\r
           valueFrom:\r
             secretKeyRef:\r
@@ -246,20 +280,20 @@ spec:
               key: PKCS12_KEY\r
               optional: true   \r
         volumeMounts:\r
-        - name: {{.Values.appName}}-keyfile-volume\r
-          mountPath: /opt/secret\r
-        - name: {{.Values.appName}}-cert-volume\r
-          mountPath: /opt/cert\r
+        - name: {{.Values.appName}}-keyfile-volume\r
+          mountPath: /opt/secret\r
+        - name: {{.Values.appName}}-cert-volume\r
+          mountPath: /opt/cert\r
         {{ if or (eq .Values.env "st") (eq .Values.env "prod-dr")}}\r
         {{else}}\r
-        - name: logging-pvc\r
-          mountPath: "/otf/logs"\r
+        - name: logging-pvc\r
+          mountPath: "/otf/logs"\r
         {{end}} \r
         livenessProbe:\r
           httpGet:\r
             path: /otf/api/health/v1\r
             port: https\r
-            scheme: HTTPS\r
+            scheme: HTTP\r
             httpHeaders:\r
             - name: X-Custom-Header\r
               value: Alive\r
@@ -270,7 +304,7 @@ spec:
           httpGet:\r
             path: /otf/api/health/v1\r
             port: https\r
-            scheme: HTTPS\r
+            scheme: HTTP\r
             httpHeaders:\r
             - name: X-Custom-Header\r
               value: Ready\r
index 38acf3d..3bb2e30 100644 (file)
@@ -7,12 +7,12 @@ metadata:
     app: {{ .Values.appName }}\r
     version: {{ .Values.version}}\r
 spec:\r
-  type: NodePort\r
+  type: ClusterIP\r
   ports:\r
   - name: https\r
     port: 8443\r
     protocol: TCP\r
-    nodePort: {{ .Values.nodePort}}\r
+#    nodePort: {{ .Values.nodePort}}\r
   selector:\r
     app: {{ .Values.appName }}\r
     version: {{ .Values.version}}\r
index 0a68a60..8dd0ba8 100644 (file)
@@ -2,10 +2,11 @@
 server.port=8443\r
 server.port.http=8080\r
 security.require-ssl=false\r
+ssl.enabled=${https-only.flag:false}\r
 \r
-server.ssl.key-store-type=PKCS12\r
-server.ssl.key-store=${OTF_CERT_PATH}\r
-server.ssl.key-store-password=${OTF_CERT_PASS}\r
+#server.ssl.key-store-type=PKCS12\r
+#server.ssl.key-store=${OTF_CERT_PATH}\r
+#server.ssl.key-store-password=${OTF_CERT_PASS}\r
 #server.servlet.context-path=/otf/api\r
 #spring.jersey.application-path=/otf\r
 #springfox.documentation.swagger.v2.path=/otf/api/swagger.json\r
@@ -29,12 +30,12 @@ logging.path=otf/logs
 \r
 spring.resources.add-mappings=true\r
 \r
-ssl.flag =${https-only.flag:true}\r
+ssl.flag =${https-only.flag:false}\r
 #springfox.documentation.auto-startup=false\r
 #springfox.documentation.swagger.v2.path=/otf/swagger.json\r
 \r
 #config\r
-aaf.enabled=true\r
+aaf.enabled=false\r
 aaf.call-timeout=10000\r
 aaf.conn-timeout=6000\r
 aaf.default-realm=localhost\r
index 369c4f1..0fae853 100644 (file)
@@ -26,6 +26,10 @@ spec:
         app: {{ .Values.appName}}\r
         version: {{.Values.version}}\r
     spec:\r
+      {{ if .Values.pullSecret }}\r
+      imagePullSecrets:\r
+        - name: {{ .Values.pullSecret }}\r
+      {{ end }}\r
       serviceAccount: default\r
       volumes:\r
       - name: {{ .Values.appName}}-cert-volume\r
@@ -47,12 +51,12 @@ spec:
       {{ if or (eq .Values.env "st") (eq .Values.env "prod-dr")}}\r
       {{else}}\r
       - name: logging-pvc\r
-        persistentVolumeClaim:\r
-          {{if eq .Values.env "prod"}}\r
-          claimName: {{ .Values.pvc.prod | quote }}\r
-          {{ else }}\r
-          claimName: {{ .Values.pvc.dev | quote }}\r
-          {{ end }}\r
+        persistentVolumeClaim:\r
+          {{if eq .Values.env "prod"}}\r
+          claimName: {{ .Values.pvc.prod | quote }}\r
+          {{ else }}\r
+          claimName: {{ .Values.pvc.dev | quote }}\r
+          {{ end }}\r
       {{end}}\r
       containers:\r
       - name: {{ .Values.appName}}\r
@@ -61,7 +65,7 @@ spec:
         ports:\r
         - name: http\r
           containerPort: 5000\r
-          nodePort: {{.Values.nodePort}}\r
+          nodePort: {{.Values.nodePort}}\r
           protocol: TCP\r
         {{ if eq .Values.env "st"}}\r
         resources:\r
@@ -107,7 +111,7 @@ spec:
           httpGet:\r
             path: {{.Values.health}}\r
             port: http\r
-            scheme: HTTPS\r
+            scheme: HTTP\r
             httpHeaders:\r
               - name: X-Custom-Header\r
                 value: Alive\r
@@ -118,7 +122,7 @@ spec:
           httpGet:\r
             path: {{.Values.health}}\r
             port: http\r
-            scheme: HTTPS\r
+            scheme: HTTP\r
             httpHeaders:\r
               - name: X-Custom-Header\r
                 value: Ready\r
index 7a056a9..039c313 100644 (file)
@@ -3,6 +3,6 @@ kind: Secret
 metadata:\r
   name: {{ .Values.appName}}\r
 type: Opaque\r
-data:\r
-  id_private_key: {{ .Files.Get .Values.Secret.id_private_key | b64enc }}\r
-  id_private_key_passphrase: {{ .Values.Secret.id_private_key_passphrase | b64enc }}
\ No newline at end of file
+data:\r
+  id_private_key: {{ .Files.Get .Values.Secret.id_private_key | b64enc }}\r
+  id_private_key_passphrase: {{ .Values.Secret.id_private_key_passphrase | b64enc }}
\ No newline at end of file
index cae8899..590e533 100644 (file)
@@ -7,6 +7,7 @@ nodePort: 32222
 replicas: 1\r
 health : /otf/vth/ssh/v1/health\r
 sharedCert: otf-cert-secret-builder\r
+#pullSecret: ""\r
 pvc:\r
   dev: org-oran-otf-dev-logs-pv\r
   prod: org-oran-otf-prod-logs-pv\r
index 132bcfc..9e7f6b1 100644 (file)
@@ -157,5 +157,5 @@ if __name__ == '__main__':
        app.logger.setLevel(logging.INFO)\r
        app.logger.addHandler(logHandler)\r
        context = ('opt/cert/otf.pem', 'opt/cert/privateKey.pem')\r
-       app.run(debug = False, host = '0.0.0.0', port = 5000, ssl_context = context)\r
-       app.run(debug = False, host = '0.0.0.0', port=5000)\r
+       #app.run(debug = False, host = '0.0.0.0', port = 5000, ssl_context = context)\r
+       app.run(debug = False, host = '0.0.0.0', port=5000)\r
index f78b5c8..26a76cc 100644 (file)
@@ -26,6 +26,10 @@ spec:
         app: {{ .Values.appName}}\r
         version: {{.Values.version}}\r
     spec:\r
+      {{ if .Values.pullSecret }}\r
+      imagePullSecrets:\r
+        - name: {{ .Values.pullSecret }}\r
+      {{ end }}\r
       serviceAccount: default\r
       volumes:\r
       - name: {{ .Values.appName}}-cert-volume\r
@@ -44,7 +48,7 @@ spec:
         ports:\r
         - name: http\r
           containerPort: 5000\r
-          nodePort: {{.Values.nodePort}}\r
+          nodePort: {{.Values.nodePort}}\r
           protocol: TCP\r
         env:\r
         - name: NAMESPACE\r
@@ -59,16 +63,16 @@ spec:
           value: {{ .Values.HTTPS}}\r
         - name: BASE_URL\r
           value: {{ .Values.BASE_URL}}\r
-        - name: USER\r
-          valueFrom:\r
-            secretKeyRef:\r
-              name: {{ .Values.appName}}\r
-              key: username\r
-        - name: PW\r
-          valueFrom:\r
-            secretKeyRef:\r
-              name: {{ .Values.appName}}\r
-              key: password\r
+        - name: USER\r
+          valueFrom:\r
+            secretKeyRef:\r
+              name: {{ .Values.appName}}\r
+              key: username\r
+        - name: PW\r
+          valueFrom:\r
+            secretKeyRef:\r
+              name: {{ .Values.appName}}\r
+              key: password\r
         volumeMounts:\r
         - name: {{.Values.appName}}-cert-volume\r
           mountPath: /opt/cert\r
index 44d602e..bbc6090 100644 (file)
@@ -7,6 +7,7 @@ nodePort: 32130
 replicas: 1\r
 health : /otf/vth/oran/smo/v1/health\r
 sharedCert: otf-cert-secret-builder\r
+#pullSecret: ""\r
 pvc:\r
   dev: org-oran-otf-dev-logs-pv\r
   prod: org-oran-otf-prod-logs-pv\r