cluster.fun/manifests/tweetsvg/tweetsvg.yaml

93 lines
1.9 KiB
YAML
Raw Permalink Normal View History

2021-02-18 20:31:36 +00:00
apiVersion: v1
2021-05-11 04:43:42 +00:00
kind: Secret
metadata:
name: tweetsvg
namespace: tweetsvg
annotations:
kube-1password: dmjtjxrcpqtmeddq5x7zikj37i
kube-1password/vault: Kubernetes
kube-1password/secret-text-key: .env
type: Opaque
---
apiVersion: v1
2021-02-18 20:31:36 +00:00
kind: Service
metadata:
2021-05-11 04:43:42 +00:00
name: tweetsvg
namespace: tweetsvg
2021-02-18 20:31:36 +00:00
spec:
type: ClusterIP
ports:
- port: 80
2021-05-11 04:43:42 +00:00
targetPort: 8080
2021-02-18 20:31:36 +00:00
name: web
selector:
2021-05-11 04:43:42 +00:00
app: tweetsvg
2021-02-18 20:31:36 +00:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
2021-05-11 04:43:42 +00:00
name: tweetsvg
namespace: tweetsvg
2021-02-18 20:31:36 +00:00
spec:
2021-09-04 15:45:11 +00:00
replicas: 2
2021-02-18 20:31:36 +00:00
selector:
matchLabels:
2021-05-11 04:43:42 +00:00
app: tweetsvg
2021-02-18 20:31:36 +00:00
template:
metadata:
labels:
2021-05-11 04:43:42 +00:00
app: tweetsvg
2021-02-18 20:31:36 +00:00
spec:
containers:
- name: web
image: rg.fr-par.scw.cloud/averagemarcus/tweetsvg:latest
2021-02-18 20:31:36 +00:00
imagePullPolicy: Always
2021-05-11 04:43:42 +00:00
# env:
# - name: DOTENV_DIR
# value: /config/
2021-02-18 20:31:36 +00:00
ports:
2021-05-11 04:43:42 +00:00
- containerPort: 8080
2021-02-18 20:31:36 +00:00
name: web
resources:
limits:
memory: 100Mi
requests:
memory: 100Mi
2021-05-11 04:43:42 +00:00
volumeMounts:
- name: dotenv
mountPath: /app/.env
subPath: .env
volumes:
- name: dotenv
secret:
secretName: tweetsvg
2021-02-18 20:31:36 +00:00
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
2021-05-11 04:43:42 +00:00
name: tweetsvg
namespace: tweetsvg
2021-02-18 20:31:36 +00:00
annotations:
cert-manager.io/cluster-issuer: letsencrypt
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.tls: "true"
ingress.kubernetes.io/ssl-redirect: "true"
traefik.ingress.kubernetes.io/router.entrypoints: websecure
2021-02-18 20:31:36 +00:00
spec:
tls:
- hosts:
2021-05-11 04:43:42 +00:00
- tweet.cluster.fun
secretName: tweetsvg-ingress
2021-02-18 20:31:36 +00:00
rules:
2021-05-11 04:43:42 +00:00
- host: tweet.cluster.fun
2021-02-18 20:31:36 +00:00
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
2021-05-11 04:43:42 +00:00
name: tweetsvg
2021-02-18 20:31:36 +00:00
port:
number: 80