chore(k8s,dns): decommission corona workloads and prune DNS records
This commit is contained in:
@@ -1,86 +0,0 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: corona-api
|
||||
labels:
|
||||
app: corona-api
|
||||
namespace: datalab
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: corona-api
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: corona-api
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: "registry-haumdaucher-de"
|
||||
containers:
|
||||
- image: registry.haumdaucher.de/corona_plumber:latest
|
||||
imagePullPolicy: Always
|
||||
name: corona-api
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: corona-api
|
||||
namespace: datalab
|
||||
spec:
|
||||
ports:
|
||||
- port: 8000
|
||||
targetPort: 8000
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: corona-api
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: corona-api-haumdaucher
|
||||
namespace: datalab
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- "corona-api.haumdaucher.de"
|
||||
secretName: corona-api-haumdaucher-de
|
||||
rules:
|
||||
- host: corona-api.haumdaucher.de
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: corona-api
|
||||
servicePort: 8000
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: corona-api-moritzgraf
|
||||
namespace: datalab
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- "corona-api.moritzgraf.de"
|
||||
secretName: corona-api-moritzgraf-de
|
||||
rules:
|
||||
- host: corona-api.moritzgraf.de
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: corona-api
|
||||
servicePort: 8000
|
||||
@@ -1,86 +0,0 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: corona
|
||||
labels:
|
||||
app: corona
|
||||
namespace: datalab
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: corona
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: corona
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: "registry-haumdaucher-de"
|
||||
containers:
|
||||
- image: registry.haumdaucher.de/corona:latest
|
||||
imagePullPolicy: Always
|
||||
name: corona
|
||||
ports:
|
||||
- containerPort: 3838
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: corona
|
||||
namespace: datalab
|
||||
spec:
|
||||
ports:
|
||||
- port: 3838
|
||||
targetPort: 3838
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: corona
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: corona-haumdaucher
|
||||
namespace: datalab
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- "corona.haumdaucher.de"
|
||||
secretName: corona-haumdaucher-de
|
||||
rules:
|
||||
- host: corona.haumdaucher.de
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: corona
|
||||
servicePort: 3838
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: corona-moritzgraf
|
||||
namespace: datalab
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- "corona.moritzgraf.de"
|
||||
secretName: corona-moritzgraf-de
|
||||
rules:
|
||||
- host: corona.moritzgraf.de
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: corona
|
||||
servicePort: 3838
|
||||
@@ -1,79 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: redeploy
|
||||
namespace: datalab
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
namespace: datalab
|
||||
name: redeploy
|
||||
rules:
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["deployments"]
|
||||
verbs: ["get",list","patch"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
# This role binding allows "jane" to read pods in the "default" namespace.
|
||||
# You need to already have a Role named "pod-reader" in that namespace.
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: redeploy-pods
|
||||
namespace: datalab
|
||||
subjects:
|
||||
# You can specify more than one "subject"
|
||||
- kind: ServiceAccount
|
||||
name: redeploy
|
||||
roleRef:
|
||||
# "roleRef" specifies the binding to a Role / ClusterRole
|
||||
kind: Role #this must be Role or ClusterRole
|
||||
name: redeploy
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
---
|
||||
apiVersion: batch/v1beta1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: redeploy-corona-api
|
||||
namespace: datalab
|
||||
spec:
|
||||
schedule: "0 5/12 * * *"
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
serviceAccountName: redeploy
|
||||
imagePullSecrets:
|
||||
- name: "registry-haumdaucher-de"
|
||||
containers:
|
||||
- name: redeploy-corona-api
|
||||
image: registry.haumdaucher.de/redeploy:latest
|
||||
env:
|
||||
- name: DEPLOYMENT
|
||||
value: "corona-api"
|
||||
restartPolicy: Never
|
||||
|
||||
---
|
||||
apiVersion: batch/v1beta1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: redeploy-corona
|
||||
namespace: datalab
|
||||
spec:
|
||||
schedule: "15 5/12 * * *"
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
serviceAccountName: redeploy
|
||||
imagePullSecrets:
|
||||
- name: "registry-haumdaucher-de"
|
||||
containers:
|
||||
- name: redeploy-corona
|
||||
image: registry.haumdaucher.de/redeploy:latest
|
||||
env:
|
||||
- name: DEPLOYMENT
|
||||
value: "corona"
|
||||
restartPolicy: Never
|
||||
+2
-2
@@ -33,7 +33,7 @@ resource "ovh_domain_zone_record" "moritzgraf_subdomains" {
|
||||
## new haumdaucher k8s
|
||||
|
||||
variable "subdomains_moritzgraf_k8s" {
|
||||
default = ["corona", "corona-api", "tt-rss", "git"]
|
||||
default = ["tt-rss", "git"]
|
||||
}
|
||||
|
||||
resource "ovh_domain_zone_record" "moritzgraf_subdomains_k8s" {
|
||||
@@ -78,7 +78,7 @@ resource "ovh_domain_zone_record" "krassescheisse_subdomains" {
|
||||
|
||||
|
||||
variable "subdomains_haumdaucher" {
|
||||
default = ["corona"]
|
||||
default = []
|
||||
}
|
||||
|
||||
# resource "ovh_domain_zone_record" "haumdaucher_subdomains" {
|
||||
|
||||
Reference in New Issue
Block a user