Add projects app base configuration and yc-k8s-test overlay with Kustomization files
This commit is contained in:
parent
d45263ecea
commit
00708f1853
@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: example-app-config
|
|
||||||
namespace: example-app
|
|
||||||
data:
|
|
||||||
APP_ENV: "production"
|
|
||||||
LOG_LEVEL: "info"
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: example-app
|
|
||||||
namespace: example-app
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: example-app
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app.kubernetes.io/name: example-app
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: example-app
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: example-app
|
|
||||||
image: nginx:1.27-alpine
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
envFrom:
|
|
||||||
- configMapRef:
|
|
||||||
name: example-app-config
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 64Mi
|
|
||||||
limits:
|
|
||||||
cpu: 200m
|
|
||||||
memory: 128Mi
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /
|
|
||||||
port: http
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
readinessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /
|
|
||||||
port: http
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: example-app
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: example-app
|
|
||||||
namespace: example-app
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: example-app
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app.kubernetes.io/name: example-app
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: http
|
|
||||||
protocol: TCP
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./base
|
|
||||||
patches:
|
|
||||||
- path: patches/replicas.yaml
|
|
||||||
target:
|
|
||||||
kind: Deployment
|
|
||||||
name: example-app
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
# Переопределения для example-app на кластере contour
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: example-app
|
|
||||||
namespace: example-app
|
|
||||||
spec:
|
|
||||||
replicas: 2
|
|
||||||
46
apps/projects/base/deployment.yaml
Normal file
46
apps/projects/base/deployment.yaml
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: projects-frontend-static
|
||||||
|
namespace: projects
|
||||||
|
labels:
|
||||||
|
app: projects-frontend-static
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: projects-frontend-static
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: projects-frontend-static
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: projects-frontend-static
|
||||||
|
image: cr.yandex/crp3ccidau046kdj8g9q/project-frontend-app:wb_fd49eb19
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /ping
|
||||||
|
port: 80
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 60
|
||||||
|
failureThreshold: 10
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /ping
|
||||||
|
port: 80
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
failureThreshold: 20
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 100Mi
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: regcred
|
||||||
@ -1,9 +1,8 @@
|
|||||||
---
|
---
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: example-app
|
namespace: projects
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- configmap.yaml
|
# - deployment.yaml
|
||||||
- deployment.yaml
|
# - service.yaml
|
||||||
- service.yaml
|
|
||||||
7
apps/projects/base/namespace.yaml
Normal file
7
apps/projects/base/namespace.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: projects
|
||||||
|
labels:
|
||||||
|
istio-injection: enabled
|
||||||
15
apps/projects/base/service.yaml
Normal file
15
apps/projects/base/service.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: projects-frontend-static-service
|
||||||
|
namespace: projects
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: projects-frontend-static
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
10
apps/projects/yc-k8s-test/kustomization.yaml
Normal file
10
apps/projects/yc-k8s-test/kustomization.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
|
patches: []
|
||||||
|
# - path: replicas.yaml
|
||||||
|
# target:
|
||||||
|
# kind: Deployment
|
||||||
|
# name: projects-frontend-static
|
||||||
8
apps/projects/yc-k8s-test/replicas.yaml
Normal file
8
apps/projects/yc-k8s-test/replicas.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: projects-frontend-static
|
||||||
|
namespace: projects
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
||||||
@ -6,4 +6,5 @@ resources:
|
|||||||
- ./infrastructure
|
- ./infrastructure
|
||||||
|
|
||||||
# apps
|
# apps
|
||||||
- ../../apps/reviews/yc-k8s-test
|
- ../../apps/reviews/yc-k8s-test
|
||||||
|
- ../../apps/projects/yc-k8s-test
|
||||||
Loading…
Reference in New Issue
Block a user