mirror of
https://github.com/LukeHagar/pypistats.dev.git
synced 2025-12-06 04:21:09 +00:00
82 lines
1.5 KiB
YAML
82 lines
1.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: web
|
|
namespace: pypistats
|
|
labels:
|
|
app: pypistats
|
|
component: web
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: pypistats
|
|
component: web
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: pypistats
|
|
component: web
|
|
spec:
|
|
initContainers:
|
|
- name: migrate
|
|
image: us.gcr.io/pypistats-org/pypistats:11
|
|
imagePullPolicy: Always
|
|
envFrom:
|
|
- secretRef:
|
|
name: pypistats-secrets
|
|
args: ["migrate"]
|
|
containers:
|
|
- name: web
|
|
image: us.gcr.io/pypistats-org/pypistats:11
|
|
imagePullPolicy: Always
|
|
envFrom:
|
|
- secretRef:
|
|
name: pypistats-secrets
|
|
args: ["web"]
|
|
ports:
|
|
- containerPort: 5000
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 5000
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: web
|
|
namespace: pypistats
|
|
spec:
|
|
type: NodePort
|
|
ports:
|
|
- name: http
|
|
protocol: TCP
|
|
port: 5000
|
|
targetPort: 5000
|
|
selector:
|
|
app: pypistats
|
|
component: web
|
|
|
|
---
|
|
|
|
apiVersion: networking.k8s.io/v1beta1
|
|
kind: Ingress
|
|
metadata:
|
|
name: web
|
|
namespace: pypistats
|
|
spec:
|
|
backend:
|
|
serviceName: web
|
|
servicePort: http
|
|
rules:
|
|
- http:
|
|
paths:
|
|
- backend:
|
|
serviceName: web
|
|
servicePort: http
|
|
path: /
|