Merge branch 'master' of ssh://158-160-253-227.nip.io:2222/infra/iac

This commit is contained in:
Kochetkov S 2026-04-13 12:23:50 +03:00
commit aee0d27f6c
30 changed files with 333 additions and 93 deletions

View File

@ -0,0 +1,29 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: srx-admin
namespace: control-interface
labels:
app: srx-admin
spec:
replicas: 1
selector:
matchLabels:
app: srx-admin
template:
metadata:
labels:
app: srx-admin
spec:
containers:
- name: srx-admin
image: cr.yandex/crp3ccidau046kdj8g9q/srx-admin:prod_3b9cb250
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
protocol: TCP
imagePullSecrets:
- name: regcred

View File

@ -1,9 +1,8 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: example-app
namespace: control-interface
resources:
- namespace.yaml
- configmap.yaml
- deployment.yaml
- service.yaml

View File

@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: control-interface
labels:
istio-injection: enabled

View File

@ -0,0 +1,14 @@
---
apiVersion: v1
kind: Service
metadata:
name: srx-admin-svc
namespace: control-interface
spec:
type: ClusterIP
selector:
app: srx-admin
ports:
- port: 8080
targetPort: 80
protocol: TCP

View File

@ -2,9 +2,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./base
- ../base
patches:
- path: patches/replicas.yaml
- path: replicas.yaml
target:
kind: Deployment
name: example-app
name: srx-admin

View File

@ -0,0 +1,8 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: srx-admin
namespace: control-interface
spec:
replicas: 1

View File

@ -0,0 +1,46 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: cross-section-static
namespace: cross-section
labels:
app: cross-section-static
spec:
replicas: 2
selector:
matchLabels:
app: cross-section-static
template:
metadata:
labels:
app: cross-section-static
spec:
containers:
- name: frontend
image: cr.yandex/crp3ccidau046kdj8g9q/cross-section-app:production_e09e648b
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /ping
port: 80
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 10
readinessProbe:
httpGet:
path: /ping
port: 80
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 20
resources:
requests:
cpu: 100m
memory: 100Mi
imagePullSecrets:
- name: regcred

View File

@ -0,0 +1,8 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: cross-section
resources:
- namespace.yaml
- deployment.yaml
- service.yaml

View File

@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: cross-section
labels:
istio-injection: enabled

View File

@ -0,0 +1,15 @@
---
apiVersion: v1
kind: Service
metadata:
name: cross-section-static
namespace: cross-section
spec:
type: ClusterIP
selector:
app: cross-section-static
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP

View File

@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../base
patches:
- path: replicas.yaml
target:
kind: Deployment
name: cross-section-static

View File

@ -0,0 +1,8 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: cross-section-static
namespace: cross-section
spec:
replicas: 1

View File

@ -1,9 +0,0 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: example-app-config
namespace: example-app
data:
APP_ENV: "production"
LOG_LEVEL: "info"

View File

@ -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

View File

@ -1,5 +0,0 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: example-app

View File

@ -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

View File

@ -1,9 +0,0 @@
---
# Переопределения для example-app на кластере contour
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-app
namespace: example-app
spec:
replicas: 2

View 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

View File

@ -0,0 +1,8 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: projects
resources:
- namespace.yaml
- deployment.yaml
- service.yaml

View File

@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: projects
labels:
istio-injection: enabled

View 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

View 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

View File

@ -0,0 +1,8 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: projects-frontend-static
namespace: projects
spec:
replicas: 2

View File

@ -0,0 +1,33 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
namespace: reviews
labels:
app: frontend
spec:
replicas: 1
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
version: stable
spec:
containers:
- name: frontend
image: cr.yandex/crp3ccidau046kdj8g9q/reviews-frontend:contour_3a66be35
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
protocol: TCP
resources:
requests:
cpu: 100m
memory: 100Mi
imagePullSecrets:
- name: regcred

View File

@ -1,5 +1,8 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: reviews
resources:
- example-app
- namespace.yaml
- deployment.yaml
- service.yaml

View File

@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: reviews
labels:
istio-injection: enabled

View File

@ -0,0 +1,15 @@
---
apiVersion: v1
kind: Service
metadata:
name: frontend-service
namespace: reviews
spec:
type: ClusterIP
selector:
app: frontend
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP

View File

@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../base
patches: []
# - path: replicas.yaml
# target:
# kind: Deployment
# name: frontend

View File

@ -0,0 +1,8 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
namespace: reviews
spec:
replicas: 1

View File

@ -4,3 +4,9 @@ resources:
- ./flux-system
- ./helm-repositories.yaml
- ./infrastructure
# apps
- ../../apps/reviews/yc-k8s-test
- ../../apps/projects/yc-k8s-test
- ../../apps/control-interface/yc-k8s-test
- ../../apps/cross-section/yc-k8s-test