ready for build

This commit is contained in:
qiqian
2022-08-15 13:51:23 +08:00
parent 2a15d631e1
commit 8fa3ac851c
15 changed files with 260 additions and 40 deletions

35
k8s/base/deployment.yaml Normal file
View File

@@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: alertmanager-webhook
spec:
selector:
matchLabels:
app: alertmanager-webhook
template:
metadata:
labels:
app: alertmanager-webhook
spec:
volumes:
- name: config
configMap:
name: alertmanager-webhook
containers:
- name: alertmanager-webhook
volumeMounts:
- mountPath: /app/webhook/config
name: config
image: webhook
ports:
- containerPort: 8080
name: web
readinessProbe:
httpGet:
port: web
path: /health
livenessProbe:
httpGet:
port: web
path: /health
initialDelaySeconds: 10

11
k8s/base/service.yaml Normal file
View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: alertmanager-webhook
spec:
selector:
app: alertmanager-webhook
ports:
- port: 8080
protocol: TCP
targetPort: web

23
k8s/kustomization.yaml Normal file
View File

@@ -0,0 +1,23 @@
# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- base/deployment.yaml
- base/service.yaml
commonLabels:
app: alertmanager-webhook
configMapGenerator:
- name: alertmanager-webhook
files:
- config/config.yaml
- config/text_template.tpl
images:
- name: webhook
newName: ''
newTag: ''
patches:
- path: overlay.yaml
target:
kind: Deployment
labelSelector: app=alertmanager-webhook

12
k8s/overlay.yaml Normal file
View File

@@ -0,0 +1,12 @@
kind: Deployment
metadata:
name: alertmanager-webhook
spec:
selector:
matchLabels:
app: alertmanager-webhook
template:
spec:
containers:
- name: alertmanager-webhook
resources: {}