Skip to content

Instantly share code, notes, and snippets.

View calvin-puram's full-sized avatar
🎯
Focusing

Calvin Job Puram calvin-puram

🎯
Focusing
View GitHub Profile
apiVersion: apps/v1
kind: Deployment
metadata:
name: app3-nginx-deployment
labels:
app: app3-nginx
spec:
replicas: 1
selector:
matchLabels:
FROM ubuntu:18.04 as build
ENV DEBIAN_FRONTEND=noninteractive \
TZ=Etx/UTC
# Add required binaries to ubuntu image
RUN apt-get update -qq && apt-get install -y \
git \
cmake \
apiVersion: apps/v1
kind: Deployment
metadata:
name: faucet
spec:
selector:
matchLabels:
app: faucet
template:
metadata:
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: myapp
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/calvin-puram/argo-demo-deployment.git
targetRevision: HEAD
[2021-12-11 15:01:48,342] ERROR in app: Exception on /register [POST]
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/ubuntu/.local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/ubuntu/.local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/ubuntu/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value

1. Install and Configure PostgreSQL

Update packages

sudo apt update && sudo apt upgrade -y

install PostgreSQL

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
# add this line below
cert-manager.io/cluster-issuer: letsencrypt-prod
# end here
kubernetes.io/ingress.class: nginx
creationTimestamp: "2021-04-22T03:20:24Z"
generation: 2
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: calvinpuram.com
namespace: default
spec:
secretName: calvinpuram.com-tls
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
namespace: default
spec:
acme:
# The ACME server URL
server: https://acme-v02.api.letsencrypt.org/directory
# Email address used for ACME registration