Skip to content

Commit

Permalink
[ADD] cert manager config.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbyrathoree committed Mar 17, 2020
1 parent 04966d2 commit 04101bb
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 12 deletions.
46 changes: 46 additions & 0 deletions services/manager/deployment/nginx-ingress-resource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: backend-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
- hosts:
- manager.bobbyrathore.com
- session.bobbyrathore.com
- retrieval.bobbyrathore.com
- model.bobbyrathore.com
secretName: bobbyrathore-tls
rules:
- host: manager.bobbyrathore.com
http:
paths:
- backend:
serviceName: "manager-svc"
servicePort: 8000
- host: session.bobbyrathore.com
http:
paths:
- backend:
serviceName: "session-manager-svc"
servicePort: 8100
- host: retrieval.bobbyrathore.com
http:
paths:
- backend:
serviceName: "data-retrieval-svc"
servicePort: 8200
- host: model.bobbyrathore.com
http:
paths:
- backend:
serviceName: "model-execution-svc"
servicePort: 8300
# - host: postprocessor.bobbyrathore.com
# http:
# paths:
# - backend:
# serviceName: "postprocessor-execution-svc"
# servicePort: 8400
19 changes: 19 additions & 0 deletions services/manager/deployment/production-issuer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
namespace: cert-manager
spec:
acme:
# The ACME server URL
server: https://acme-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: "[email protected]"
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-prod
# Enable the HTTP-01 challenge provider
solvers:
- http01:
ingress:
class: nginx
12 changes: 6 additions & 6 deletions services/manager/deployment/production_jinja.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
"REDIS_HOST": "redis://falling-clownfish-redis-ha.default.svc.cluster.local:6379",
"PUBSUB_PROJECT_ID": "weather-forecast-266119",
"DATA_RETRIEVAL_TOPIC": "data_retrieval",
"DATA_RETRIEVAL_ENDPOINT": "http://35.190.121.111/weather_data_retrieval/dark/history",
"DATA_RETRIEVAL_ENDPOINT": "https://retrieval.bobbyrathore.com/dark/history",
"SAVE_SESSION_TOPIC": "save_session",
"SAVE_SESSION_ENDPOINT": "http://35.190.121.111/session_manager/session/save",
"SAVE_SESSION_ENDPOINT": "https://session.bobbyrathore.com/session/save",
"MODEL_EXECUTE_TOPIC": "model_execute",
"MODEL_EXECUTE_ENDPOINT": "http://35.190.121.111/model_execution/dark/forecast",
"MODEL_EXECUTE_ENDPOINT": "https://model.bobbyrathore.com/dark/forecast",
"UPDATE_STATUS_TOPIC": "update_status",
"UPDATE_STATUS_ENDPOINT": "http://35.190.121.111:8000/session/status",
"UPDATE_STATUS_ENDPOINT": "https://manager.bobbyrathore.com/session/status",
"UPDATE_SESSION_TOPIC": "update_session",
"UPDATE_SESSION_ENDPOINT": "http://35.190.121.111/session_manager/session/update",
"UPDATE_SESSION_ENDPOINT": "https://session.bobbyrathore.com/session/update",
"POST_PROCESS_TOPIC": "post_process",
"POST_PROCESS_ENDPOINT": "http://35.190.121.111/postprocessor/process/analyze",
"POST_PROCESS_ENDPOINT": "https://postprocessor.bobbyrathore.com/process/analyze",
"GOOGLE_APPLICATION_CREDENTIALS": "./api_manager/firestore/pubsub-firestore-development.json",
"BIND_ON": "0.0.0.0:8000"
}
Expand Down
19 changes: 19 additions & 0 deletions services/manager/deployment/staging-issuer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-staging
namespace: cert-manager
spec:
acme:
# The ACME server URL
server: https://acme-staging-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: "[email protected]"
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-staging
# Enable the HTTP-01 challenge provider
solvers:
- http01:
ingress:
class: nginx
6 changes: 3 additions & 3 deletions services/model_execution/deployment/production_jinja.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"PUBSUB_PROJECT_ID": "weather-forecast-266119",
"REDIS_HOST": "redis://falling-clownfish-redis-ha.default.svc.cluster.local:6379",
"UPDATE_STATUS_TOPIC": "update_status",
"UPDATE_STATUS_ENDPOINT": "http://35.190.121.111/manager/session/status",
"UPDATE_STATUS_ENDPOINT": "https://manager.bobbyrathore.com/session/status",
"UPDATE_SESSION_TOPIC": "update_session",
"UPDATE_SESSION_ENDPOINT": "http://35.190.121.111/session_manager/session/update",
"UPDATE_SESSION_ENDPOINT": "https://session.bobbyrathore.com/session/update",
"POST_PROCESS_TOPIC": "post_process",
"POST_PROCESS_ENDPOINT": "http://35.190.121.111/postprocessor/process/analyze",
"POST_PROCESS_ENDPOINT": "https://postprocessor.bobbyrathore.com/process/analyze",
"BIND_ON": "0.0.0.0:8300"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"REDIS_HOST": "redis://falling-clownfish-redis-ha.default.svc.cluster.local:6379",
"PUBSUB_PROJECT_ID": "weather-forecast-266119",
"MODEL_EXECUTE_TOPIC": "model_execute",
"MODEL_EXECUTE_ENDPOINT": "http://35.190.121.111/model_execution/dark/forecast",
"MODEL_EXECUTE_ENDPOINT": "https://model.bobbyrathore.com/dark/forecast",
"UPDATE_STATUS_TOPIC": "update_status",
"UPDATE_STATUS_ENDPOINT": "http://35.190.121.111/manager/session/status",
"UPDATE_STATUS_ENDPOINT": "https://manager.bobbyrathore.com/session/status",
"UPDATE_SESSION_TOPIC": "update_session",
"UPDATE_SESSION_ENDPOINT": "http://35.190.121.111/session_manager/session/update",
"UPDATE_SESSION_ENDPOINT": "https://session.bobbyrathore.com/session/update",
"BIND_ON": "0.0.0.0:8200"
}
}

0 comments on commit 04101bb

Please sign in to comment.