mirror of https://github.com/sgoudham/k8s
feat(pastebin): deploy `snips.sh`
parent
cf730c2e4b
commit
bf4f2f8a9a
@ -0,0 +1,53 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: pastebin
|
||||
name: pastebin
|
||||
namespace: pastebin
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pastebin
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 25%
|
||||
maxUnavailable: 25%
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pastebin
|
||||
spec:
|
||||
volumes:
|
||||
- name: pastebin-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: pastebin-pvc
|
||||
containers:
|
||||
- image: ghcr.io/robherley/snips.sh:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: pastebin
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
- containerPort: 2222
|
||||
protocol: TCP
|
||||
# livenessProbe:
|
||||
# httpGet:
|
||||
# path: /
|
||||
# port: 8080
|
||||
volumeMounts:
|
||||
- mountPath: "/data"
|
||||
name: pastebin-pv
|
||||
env:
|
||||
- name: SNIPS_HTTP_EXTERNAL
|
||||
value: "https://paste.goudham.com"
|
||||
- name: SNIPS_SSH_EXTERNAL
|
||||
value: "ssh://paste.goudham.com:2222"
|
||||
- name: SNIPS_HMACKEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: hmac
|
||||
key: signing-key
|
||||
resources: {}
|
@ -0,0 +1,23 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
labels:
|
||||
app: pastebin-ingress
|
||||
name: pastebin-ingress
|
||||
namespace: pastebin
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: paste.goudham.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: pastebin-http
|
||||
port:
|
||||
number: 8080
|
||||
path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- hosts:
|
||||
- paste.goudham.com
|
@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
labels:
|
||||
app: pastebin-pvc
|
||||
name: pastebin-pvc
|
||||
namespace: pastebin
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 30Gi
|
@ -0,0 +1,22 @@
|
||||
{
|
||||
"kind": "SealedSecret",
|
||||
"apiVersion": "bitnami.com/v1alpha1",
|
||||
"metadata": {
|
||||
"name": "hmac",
|
||||
"namespace": "pastebin",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"template": {
|
||||
"metadata": {
|
||||
"name": "hmac",
|
||||
"namespace": "pastebin",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"type": "Opaque"
|
||||
},
|
||||
"encryptedData": {
|
||||
"signing-key": "AgC4RHpNs2/ovDqN5CY4CflgDYNH2CjlB3dTO3gWgXm/PFuTWRbI1MWQDJmCvGGYfzWXgEUFsn0m7GbHh0OBbkLW9gUuqnQBJO74gFDckg4mOWZtnicP/uMqqrx49MovCZjmnEMhYvIIdF5cBIsBV0uFw+RIOGvjcx4pJx80jH4zDobobiHkFaMYZ1aTkiQZOsN3iCPhjZIq5i0nFNe2v0B/OzDbh1JbN61EndhXZieRh6Dbii9BE8OhV2NDLzqQdKH4tCMli1wzLg09rEVPNg4k0XqwIK7gdFBNSh1ex2mcTRmpmg4/2hSfCRP54yusR7kf74VjbA1LsUQMnXyE/GdHZLvYqkQc5EPY09TlA3qc9A53oZ51hPmFX/KoS+rghielfKsfzEr3o/H/dOYNPAYSiuLK0vPLG9QenTyRO/8JvDJf9SCfTpthfBoun+OxOL0mX++WE5lgnme5ZbP8nslmV1lv7HFp7I82jsgdBKNG5wfudLzyiw5KhpjyHf6kq9AVI+Toy15OBURsvJw9kXSUrC+TFFJ2Q716A4IpLEuskCHHaZVKjVgnXhyEgELmAwjUSaB5G7HgVXnYy1CZ7lQatLop6stqIEyMfc1mE18+BnHyZOV9cc9X2Y1cV3uuX60WvmPadaniMJvoBI2RPaPBP2hiHTcyHULRcLd5L0JPGSV7qgiN0fQXYKsBniku7iCMi+0KD7eoCpyXWUT/yYzWFmxfCrxqpHNPg3BjA8r0wrc="
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: pastebin-http
|
||||
name: pastebin-http
|
||||
namespace: pastebin
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ipFamilies:
|
||||
- IPv4
|
||||
ports:
|
||||
- port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: pastebin
|
||||
sessionAffinity: None
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: pastebin-ssh
|
||||
name: pastebin-ssh
|
||||
namespace: pastebin
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ipFamilies:
|
||||
- IPv4
|
||||
ports:
|
||||
- port: 2222
|
||||
protocol: TCP
|
||||
targetPort: 2222
|
||||
selector:
|
||||
app: pastebin
|
||||
sessionAffinity: None
|
Loading…
Reference in New Issue