Add persona-lenz deployment manifests
This commit is contained in:
1 parent
979326c082
commit
b2dba616a1
19 files changed
+342
-4
No files matched your search
@@ -10,3 +10,4 @@ Argo CD는 아래 경로에서 서비스 배포 대상을 찾습니다.
|
||||
애플리케이션 목록:
|
||||
|
||||
- `lolympus-tournament-support`
|
||||
- `persona-lenz`
|
||||
@@ -6,7 +6,9 @@ resources:
|
||||
- service.yaml
|
||||
- serviceaccount.yaml
|
||||
|
||||
commonLabels:
|
||||
app.kubernetes.io/name: lolympus-tournament-support
|
||||
app.kubernetes.io/part-of: lolympus
|
||||
app.kubernetes.io/managed-by: kustomize
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
app.kubernetes.io/name: lolympus-tournament-support
|
||||
app.kubernetes.io/part-of: lolympus
|
||||
app.kubernetes.io/managed-by: kustomize
|
||||
@@ -0,0 +1,28 @@
|
||||
# persona-lenz
|
||||
|
||||
Kustomize overlays:
|
||||
|
||||
- `apps/persona-lenz/overlays/staging`
|
||||
- `apps/persona-lenz/overlays/prod`
|
||||
|
||||
Harbor image pull secret:
|
||||
|
||||
```bash
|
||||
kubectl create secret docker-registry harbor-registry \
|
||||
-n persona-lenz-staging \
|
||||
--docker-server=registry.dahyeon.us \
|
||||
--docker-username='<robot-username>' \
|
||||
--docker-password='<robot-token>'
|
||||
|
||||
kubectl create secret docker-registry harbor-registry \
|
||||
-n persona-lenz-prod \
|
||||
--docker-server=registry.dahyeon.us \
|
||||
--docker-username='<robot-username>' \
|
||||
--docker-password='<robot-token>'
|
||||
```
|
||||
|
||||
Image:
|
||||
|
||||
```text
|
||||
registry.dahyeon.us/dahyeon/persona-lenz
|
||||
```
|
||||
@@ -0,0 +1,61 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: persona-lenz
|
||||
labels:
|
||||
app.kubernetes.io/component: api
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: persona-lenz
|
||||
app.kubernetes.io/component: api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: persona-lenz
|
||||
app.kubernetes.io/component: api
|
||||
spec:
|
||||
serviceAccountName: persona-lenz
|
||||
automountServiceAccountToken: false
|
||||
imagePullSecrets:
|
||||
- name: harbor-registry
|
||||
containers:
|
||||
- name: app
|
||||
image: registry.dahyeon.us/dahyeon/persona-lenz
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 3000
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: PORT
|
||||
value: "3000"
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: persona-lenz-config
|
||||
optional: true
|
||||
- secretRef:
|
||||
name: persona-lenz-secrets
|
||||
optional: false
|
||||
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,14 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- serviceaccount.yaml
|
||||
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
app.kubernetes.io/name: persona-lenz
|
||||
app.kubernetes.io/part-of: persona-lenz
|
||||
app.kubernetes.io/managed-by: kustomize
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: persona-lenz
|
||||
labels:
|
||||
app.kubernetes.io/component: api
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app.kubernetes.io/name: persona-lenz
|
||||
app.kubernetes.io/component: api
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: persona-lenz
|
||||
labels:
|
||||
app.kubernetes.io/component: api
|
||||
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: persona-lenz-config
|
||||
labels:
|
||||
app.kubernetes.io/component: api
|
||||
data:
|
||||
APP_ENV: prod
|
||||
NODE_ENV: prod
|
||||
LOG_LEVEL: info
|
||||
@@ -0,0 +1,19 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: persona-lenz
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/environment: prod
|
||||
spec:
|
||||
containers:
|
||||
- name: app
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
cpu: "2"
|
||||
memory: 2Gi
|
||||
@@ -0,0 +1,21 @@
|
||||
apiVersion: secrets.infisical.com/v1beta1
|
||||
kind: InfisicalStaticSecret
|
||||
metadata:
|
||||
name: persona-lenz-secrets
|
||||
spec:
|
||||
infisicalAuthRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
syncOptions:
|
||||
refreshInterval: 60s
|
||||
instantUpdates: false
|
||||
sources:
|
||||
- projectId: 4a8c8894-e041-4864-8c40-01da0cee2f87
|
||||
environmentSlug: prod
|
||||
secretPath: /
|
||||
recursive: true
|
||||
targets:
|
||||
- name: persona-lenz-secrets
|
||||
namespace: persona-lenz-prod
|
||||
kind: Secret
|
||||
creationPolicy: Owner
|
||||
@@ -0,0 +1,23 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: persona-lenz
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- persona-lenz-api.dahyeon.us
|
||||
secretName: persona-lenz-prod-tls
|
||||
rules:
|
||||
- host: persona-lenz-api.dahyeon.us
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: persona-lenz
|
||||
port:
|
||||
number: 80
|
||||
@@ -0,0 +1,23 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: persona-lenz-prod
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- ../../base
|
||||
- configmap.yaml
|
||||
- infisical-secret.yaml
|
||||
- ingress.yaml
|
||||
|
||||
images:
|
||||
- name: registry.dahyeon.us/dahyeon/persona-lenz
|
||||
newName: registry.dahyeon.us/dahyeon/persona-lenz
|
||||
newTag: "1"
|
||||
|
||||
replicas:
|
||||
- name: persona-lenz
|
||||
count: 1
|
||||
|
||||
patches:
|
||||
- path: deployment-patch.yaml
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: persona-lenz-prod
|
||||
labels:
|
||||
app.kubernetes.io/name: persona-lenz
|
||||
app.kubernetes.io/part-of: persona-lenz
|
||||
app.kubernetes.io/managed-by: kustomize
|
||||
app.kubernetes.io/environment: prod
|
||||
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: persona-lenz-config
|
||||
labels:
|
||||
app.kubernetes.io/component: api
|
||||
data:
|
||||
APP_ENV: staging
|
||||
NODE_ENV: staging
|
||||
LOG_LEVEL: debug
|
||||
@@ -0,0 +1,19 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: persona-lenz
|
||||
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,21 @@
|
||||
apiVersion: secrets.infisical.com/v1beta1
|
||||
kind: InfisicalStaticSecret
|
||||
metadata:
|
||||
name: persona-lenz-secrets
|
||||
spec:
|
||||
infisicalAuthRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
syncOptions:
|
||||
refreshInterval: 60s
|
||||
instantUpdates: false
|
||||
sources:
|
||||
- projectId: 4a8c8894-e041-4864-8c40-01da0cee2f87
|
||||
environmentSlug: staging
|
||||
secretPath: /
|
||||
recursive: true
|
||||
targets:
|
||||
- name: persona-lenz-secrets
|
||||
namespace: persona-lenz-staging
|
||||
kind: Secret
|
||||
creationPolicy: Owner
|
||||
@@ -0,0 +1,23 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: persona-lenz
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- persona-lenz-api-staging.dahyeon.us
|
||||
secretName: persona-lenz-staging-tls
|
||||
rules:
|
||||
- host: persona-lenz-api-staging.dahyeon.us
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: persona-lenz
|
||||
port:
|
||||
number: 80
|
||||
@@ -0,0 +1,23 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: persona-lenz-staging
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- ../../base
|
||||
- configmap.yaml
|
||||
- infisical-secret.yaml
|
||||
- ingress.yaml
|
||||
|
||||
images:
|
||||
- name: registry.dahyeon.us/dahyeon/persona-lenz
|
||||
newName: registry.dahyeon.us/dahyeon/persona-lenz
|
||||
newTag: "84.9"
|
||||
|
||||
replicas:
|
||||
- name: persona-lenz
|
||||
count: 2
|
||||
|
||||
patches:
|
||||
- path: deployment-patch.yaml
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: persona-lenz-staging
|
||||
labels:
|
||||
app.kubernetes.io/name: persona-lenz
|
||||
app.kubernetes.io/part-of: persona-lenz
|
||||
app.kubernetes.io/managed-by: kustomize
|
||||
app.kubernetes.io/environment: staging
|
||||
Reference in new issue
Block a user