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