feat: add lolympus tournament support deployment
This commit is contained in:
1 parent
80b9341308
commit
fd99f3cb2a
13 files changed
+246
-2
No files matched your search
@@ -1,9 +1,12 @@
|
|||||||
# service-state
|
# service-state
|
||||||
|
|
||||||
Application workload manifests for the main cluster.
|
메인 클러스터에 배포되는 애플리케이션 워크로드 매니페스트 저장소입니다.
|
||||||
|
|
||||||
Argo CD discovers services from:
|
Argo CD는 아래 경로에서 서비스 배포 대상을 찾습니다.
|
||||||
|
|
||||||
- `apps/*/overlays/staging`
|
- `apps/*/overlays/staging`
|
||||||
- `apps/*/overlays/prod`
|
- `apps/*/overlays/prod`
|
||||||
|
|
||||||
|
애플리케이션 목록:
|
||||||
|
|
||||||
|
- `lolympus-tournament-support`
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# lolympus-tournament-support
|
||||||
|
|
||||||
|
`lolympus-tournament-support` 애플리케이션 배포를 위한 Kustomize 매니페스트입니다.
|
||||||
|
|
||||||
|
Argo CD는 아래 overlay 경로를 배포 대상으로 사용합니다.
|
||||||
|
|
||||||
|
- `apps/lolympus-tournament-support/overlays/staging`
|
||||||
|
- `apps/lolympus-tournament-support/overlays/prod`
|
||||||
|
|
||||||
|
로컬에서 overlay를 렌더링하려면 아래 명령어를 사용합니다.
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
kubectl kustomize apps/lolympus-tournament-support/overlays/staging
|
||||||
|
kubectl kustomize apps/lolympus-tournament-support/overlays/prod
|
||||||
|
```
|
||||||
|
|
||||||
|
Namespace 생성:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
kubectl create namespace lolympus-staging
|
||||||
|
kubectl create namespace lolympus-prod
|
||||||
|
```
|
||||||
|
|
||||||
|
컨테이너 이미지는 overlay에서 지정합니다.
|
||||||
|
|
||||||
|
```text
|
||||||
|
registry.dahyeon.us/lolympus/lolympus-tournament-support/prod:1.0.4
|
||||||
|
```
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: lolympus-tournament-support
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: api
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: lolympus-tournament-support
|
||||||
|
app.kubernetes.io/component: api
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: lolympus-tournament-support
|
||||||
|
app.kubernetes.io/component: api
|
||||||
|
spec:
|
||||||
|
serviceAccountName: lolympus-tournament-support
|
||||||
|
automountServiceAccountToken: false
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harbor-registry
|
||||||
|
containers:
|
||||||
|
- name: app
|
||||||
|
image: registry.dahyeon.us/lolympus/lolympus-tournament-support
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: PORT
|
||||||
|
value: "8080"
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: lolympus-tournament-support-config
|
||||||
|
optional: true
|
||||||
|
- secretRef:
|
||||||
|
name: lolympus-tournament-support-secrets
|
||||||
|
optional: true
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 15
|
||||||
|
periodSeconds: 20
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- deployment.yaml
|
||||||
|
- service.yaml
|
||||||
|
- serviceaccount.yaml
|
||||||
|
|
||||||
|
commonLabels:
|
||||||
|
app.kubernetes.io/name: lolympus-tournament-support
|
||||||
|
app.kubernetes.io/part-of: lolympus
|
||||||
|
app.kubernetes.io/managed-by: kustomize
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: lolympus-tournament-support
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: api
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: lolympus-tournament-support
|
||||||
|
app.kubernetes.io/component: api
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: lolympus-tournament-support
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: api
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: lolympus-tournament-support-config
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: api
|
||||||
|
data:
|
||||||
|
APP_ENV: prod
|
||||||
|
NODE_ENV: production
|
||||||
|
LOG_LEVEL: info
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: lolympus-tournament-support
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/environment: prod
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: app
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 256Mi
|
||||||
|
limits:
|
||||||
|
cpu: "1"
|
||||||
|
memory: 1Gi
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: secrets.infisical.com/v1beta1
|
||||||
|
kind: InfisicalStaticSecret
|
||||||
|
metadata:
|
||||||
|
name: lolympus-tournament-support-secrets
|
||||||
|
spec:
|
||||||
|
infisicalAuthRef:
|
||||||
|
name: infisical-auth
|
||||||
|
namespace: infisical
|
||||||
|
syncOptions:
|
||||||
|
refreshInterval: 60s
|
||||||
|
instantUpdates: false
|
||||||
|
sources:
|
||||||
|
- projectId: 26a80d59-a424-4e33-adfc-2b6e84d6e25f
|
||||||
|
environmentSlug: prod
|
||||||
|
secretPath: /
|
||||||
|
recursive: true
|
||||||
|
targets:
|
||||||
|
- name: lolympus-tournament-support-secrets
|
||||||
|
namespace: lolympus-prod
|
||||||
|
kind: Secret
|
||||||
|
creationPolicy: Owner
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: lolympus-prod
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- ../../base
|
||||||
|
- configmap.yaml
|
||||||
|
- infisical-secret.yaml
|
||||||
|
|
||||||
|
images:
|
||||||
|
- name: registry.dahyeon.us/lolympus/lolympus-tournament-support
|
||||||
|
newName: registry.dahyeon.us/lolympus/lolympus-tournament-support/prod:1.0.4
|
||||||
|
|
||||||
|
replicas:
|
||||||
|
- name: lolympus-tournament-support
|
||||||
|
count: 2
|
||||||
|
|
||||||
|
patches:
|
||||||
|
- path: deployment-patch.yaml
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: lolympus-tournament-support-config
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: api
|
||||||
|
data:
|
||||||
|
APP_ENV: staging
|
||||||
|
NODE_ENV: production
|
||||||
|
LOG_LEVEL: debug
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: lolympus-tournament-support
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/environment: staging
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: app
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: lolympus-staging
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- ../../base
|
||||||
|
- configmap.yaml
|
||||||
|
|
||||||
|
images:
|
||||||
|
- name: registry.dahyeon.us/lolympus/lolympus-tournament-support
|
||||||
|
newName: registry.dahyeon.us/lolympus/lolympus-tournament-support/staging/1.0.4
|
||||||
|
|
||||||
|
replicas:
|
||||||
|
- name: lolympus-tournament-support
|
||||||
|
count: 1
|
||||||
|
|
||||||
|
patches:
|
||||||
|
- path: deployment-patch.yaml
|
||||||
Reference in new issue
Block a user