[5.03.20] Removal of Probe thread, change of port and removal of sh cmds from pipeline
This commit is contained in:
parent
151e62c65c
commit
8bbad71262
@ -62,34 +62,16 @@ spec:
|
|||||||
name: endpoints
|
name: endpoints
|
||||||
key: dbGateway.url
|
key: dbGateway.url
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5000
|
- containerPort: 9090
|
||||||
name: RESOURCE_NAME
|
name: RESOURCE_NAME
|
||||||
# livenessProbe:
|
|
||||||
# httpGet:
|
|
||||||
# path: /health
|
|
||||||
# port: 5000
|
|
||||||
# initialDelaySeconds: 30
|
|
||||||
# periodSeconds: 30
|
|
||||||
# timeoutSeconds: 1
|
|
||||||
# successThreshold: 1
|
|
||||||
# failureThreshold: 1
|
|
||||||
# readinessProbe:
|
|
||||||
# httpGet:
|
|
||||||
# port: 5000
|
|
||||||
# path: /readiness
|
|
||||||
# initialDelaySeconds: 30
|
|
||||||
# periodSeconds: 5
|
|
||||||
# timeoutSeconds: 1
|
|
||||||
# successThreshold: 1
|
|
||||||
# failureThreshold: 1
|
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 10m
|
||||||
memory: 64Mi
|
memory: 16Mi
|
||||||
limits:
|
limits:
|
||||||
cpu: 50m
|
cpu: 50m
|
||||||
memory: 128Mi
|
memory: 32Mi
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: registry-secret
|
- name: registry-secret
|
||||||
@ -9,8 +9,8 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: RESOURCE_NAME
|
app: RESOURCE_NAME
|
||||||
ports:
|
ports:
|
||||||
- port: 5000
|
- port: 9090
|
||||||
protocol: HTTP
|
protocol: HTTP
|
||||||
targetPort: 5000
|
targetPort: 9090
|
||||||
sessionAffinity: None
|
sessionAffinity: None
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
@ -43,9 +43,6 @@ try {
|
|||||||
sh "doctl auth init --access-token ${DOCTL_TOKEN}"
|
sh "doctl auth init --access-token ${DOCTL_TOKEN}"
|
||||||
sh "doctl kubernetes cluster kubeconfig save cryptosky-kubernetes-cluster-production"
|
sh "doctl kubernetes cluster kubeconfig save cryptosky-kubernetes-cluster-production"
|
||||||
}
|
}
|
||||||
|
|
||||||
sh "ls -la"
|
|
||||||
sh "pwd"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Test Artifact') {
|
stage('Test Artifact') {
|
||||||
@ -69,8 +66,6 @@ try {
|
|||||||
|
|
||||||
stage('Tag Repository') {
|
stage('Tag Repository') {
|
||||||
|
|
||||||
sh "ls -la"
|
|
||||||
|
|
||||||
withDockerServer([uri: "${env.DOCKER_REPOSITORY_TCP}"]) {
|
withDockerServer([uri: "${env.DOCKER_REPOSITORY_TCP}"]) {
|
||||||
withDockerRegistry([credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]) {
|
withDockerRegistry([credentialsId: 'Registry', url: "${env.DOCKER_REPOSITORY_URL}"]) {
|
||||||
def image = docker.build("${env.DOCKER_REPOSITORY}/${env.APPLICATION_NAME}:${env.APPLICATION_VERSION}")
|
def image = docker.build("${env.DOCKER_REPOSITORY}/${env.APPLICATION_NAME}:${env.APPLICATION_VERSION}")
|
||||||
|
|||||||
@ -16,7 +16,7 @@ def callProbes():
|
|||||||
|
|
||||||
if __name__=='__main__':
|
if __name__=='__main__':
|
||||||
|
|
||||||
Thread(target=callProbes).start()
|
# Thread(target=callProbes).start()
|
||||||
|
|
||||||
# Dynamically create new child for each currency
|
# Dynamically create new child for each currency
|
||||||
currencies = [ "btc_usd" ]
|
currencies = [ "btc_usd" ]
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
import sys
|
||||||
|
|
||||||
from pricing.bitfinex import bitfinexPublicTicker, bitfinexHighLowVol
|
from pricing.bitfinex import bitfinexPublicTicker, bitfinexHighLowVol
|
||||||
from pricing.coinbase import coinbasePublicTicker
|
from pricing.coinbase import coinbasePublicTicker
|
||||||
@ -89,6 +90,8 @@ def sendToGateway(c_type, timestamp, av_price, high, low, vol, o_price, c_price)
|
|||||||
if status != 200:
|
if status != 200:
|
||||||
logger.critical("Query wasn't executed properly, view logs. Status = {}".format(status))
|
logger.critical("Query wasn't executed properly, view logs. Status = {}".format(status))
|
||||||
logger.error("With Response of : {}".format(response))
|
logger.error("With Response of : {}".format(response))
|
||||||
|
sleep(30)
|
||||||
|
sys.exit()
|
||||||
else:
|
else:
|
||||||
logger.info("Query executed successfully with Status = {}".format(status))
|
logger.info("Query executed successfully with Status = {}".format(status))
|
||||||
logger.info("With Response of : {}".format(response))
|
logger.info("With Response of : {}".format(response))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user