Add reviews app base configuration and k8s-test overlay with kustomization files

This commit is contained in:
emelinda 2026-04-13 11:32:29 +03:00
parent 74c321bb50
commit e71fd8d3a6
7 changed files with 80 additions and 1 deletions

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: dockerhub

View File

@ -1,5 +1,8 @@
--- ---
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
namespace: reviews
resources: 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,6 @@ resources:
- ./flux-system - ./flux-system
- ./helm-repositories.yaml - ./helm-repositories.yaml
- ./infrastructure - ./infrastructure
# apps
- ../../apps/reviews/yc-k8s-test