Skip to content

Commit

Permalink
feat: add fly-shortener chart
Browse files Browse the repository at this point in the history
  • Loading branch information
bchrobot committed Jun 8, 2022
1 parent 1061ea4 commit 6dcf872
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 0 deletions.
40 changes: 40 additions & 0 deletions charts/fly-shortener/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gavinnewsom-shorties-ingress
namespace: spoke-rewired
annotations:
ingress.kubernetes.io/proxy-body-size: 50m
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/proxy-body-size: 50m
nignx.ingress.kubernetes.io/force-ssl-redirect: "true"
spec:
ingressClassName: nginx
rules:
- host: gavinnewsom.me
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: gavinnewsom-shortie
port:
number: 80
- host: gavinnewsom.us
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: gavinnewsom-shortie
port:
number: 80
tls:
- hosts:
- gavinnewsom.me
- gavinnewsom.us
secretName: tls-gavinnewsom-shorties
27 changes: 27 additions & 0 deletions charts/fly-shortener/templates/redis-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gavinnewsom-redis
namespace: spoke-rewired
labels:
app: gavinnewsom-redis
spec:
replicas: 1
selector:
matchLabels:
app: gavinnewsom-redis
template:
metadata:
labels:
app: gavinnewsom-redis
spec:
containers:
- name: master
image: redis:6.2.7
resources:
requests:
cpu: 100m
memory: 100Mi
ports:
- containerPort: 6379
13 changes: 13 additions & 0 deletions charts/fly-shortener/templates/redis-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: gavinnewsom-redis
namespace: spoke-rewired
spec:
selector:
app: gavinnewsom-redis
ports:
- protocol: TCP
port: 6379
targetPort: 6379
54 changes: 54 additions & 0 deletions charts/fly-shortener/templates/shortener-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gavinnewsom-shortie
namespace: spoke-rewired
labels:
app: gavinnewsom-shortie
spec:
replicas: 1
selector:
matchLabels:
app: gavinnewsom-shortie
template:
metadata:
labels:
app: gavinnewsom-shortie
spec:
containers:
- name: fly-shortener
image: us-east4-docker.pkg.dev/assemble-services/apps/link-shortener:1.3.2
ports:
- containerPort: 8080
env:
- name: REDIS_PORT
value: "6379"
- name: REDIS_FAMILY
value: "6"
- name: REDIS_USERNAME
value: "default"
- name: SOURCE
value: google-sheets
- name: GOOGLE_SHEET_RANGE
value: "'Live Links'!B2:D"
- name: GOOGLE_SERVICE_ACCOUNT_EMAIL
value: [email protected]
- name: GOOGLE_SERVICE_ACCOUNT_KEY
value: "SECRET"
- name: AIRTABLE_API_KEY
value: ignore
- name: AIRTABLE_BASE
value: ignore
- name: ADMIN_SECRET
value: jaYsDPHdq8kolL7h9sZ45HobUikHVCdJ
- name: FALLBACK_URL
value: https://www.gavinnewsom.com/
- name: TIMEZONE
value: America/Los_Angeles
- name: REDIS_HOST
value: "gavinnewsom-redis"
- name: REDIS_PASSWORD
value: "SECRET"
- name: GOOGLE_SHEET_DOC_ID
value: SECRET
13 changes: 13 additions & 0 deletions charts/fly-shortener/templates/shortener-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: gavinnewsom-shortie
namespace: spoke-rewired
spec:
selector:
app: gavinnewsom-shortie
ports:
- protocol: TCP
port: 80
targetPort: 8080

0 comments on commit 6dcf872

Please sign in to comment.