REFACTOR(docs): detach services,ingress from docs
This commit is contained in:
@@ -4,10 +4,7 @@ kind: Kustomization
|
||||
namespace: code-server
|
||||
|
||||
resources:
|
||||
# ArgoCD Application 리소스는 infrastructure/kustomization.yaml에서 관리
|
||||
# - argocd/code-server.yaml
|
||||
|
||||
# Namespace with Goldilocks label
|
||||
- namespace.yaml
|
||||
|
||||
- vault/code-server-password.yaml
|
||||
|
||||
@@ -26,7 +26,7 @@ spec:
|
||||
apk add --no-cache git
|
||||
echo "Cloning repository..."
|
||||
git clone https://gitea0213.kro.kr/bluemayne/applications.git /tmp/repo
|
||||
cd /tmp/repo/docusaurus
|
||||
cd /tmp/repo/docusaurus/asset
|
||||
echo "Installing dependencies..."
|
||||
npm install --legacy-peer-deps
|
||||
echo "Building Docusaurus site..."
|
||||
|
||||
@@ -2,12 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
# ArgoCD Application 리소스는 infrastructure/kustomization.yaml에서 관리
|
||||
# - argocd/docusaurus.yaml
|
||||
|
||||
# Namespace with Goldilocks label
|
||||
- namespace.yaml
|
||||
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
|
||||
@@ -2,13 +2,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
# Namespace with Goldilocks label
|
||||
- namespace.yaml
|
||||
|
||||
# Gitea Runner
|
||||
- deployment.yaml
|
||||
|
||||
# Vault secrets
|
||||
- vault/gitea-admin-secret.yaml
|
||||
- vault/gitea-postgres-password.yaml
|
||||
- vault/gitea-runner-token.yaml
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
@@ -60,61 +59,10 @@ spec:
|
||||
resources:
|
||||
requests:
|
||||
memory: "64Mi"
|
||||
cpu: "5m" # Reduced from 50m based on actual usage (1m)
|
||||
cpu: "5m"
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: homer-config
|
||||
- name: www
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: homer
|
||||
namespace: homer
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: homer
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: homer-ingress
|
||||
namespace: homer
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- mayne.kro.kr
|
||||
- www.mayne.kro.kr
|
||||
secretName: homer-tls
|
||||
rules:
|
||||
- host: mayne.kro.kr
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: homer
|
||||
port:
|
||||
number: 80
|
||||
- host: www.mayne.kro.kr
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: homer
|
||||
port:
|
||||
number: 80
|
||||
|
||||
120
homer/homer.yaml
120
homer/homer.yaml
@@ -1,120 +0,0 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: homer
|
||||
namespace: homer
|
||||
labels:
|
||||
app: homer
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: homer
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: homer
|
||||
spec:
|
||||
initContainers:
|
||||
- name: copy-homer-files
|
||||
image: b4bz/homer:latest
|
||||
command: ['sh', '-c']
|
||||
args:
|
||||
- |
|
||||
# Homer의 기본 파일들을 emptyDir로 복사
|
||||
cp -r /www/* /tmp/www/
|
||||
volumeMounts:
|
||||
- name: www
|
||||
mountPath: /tmp/www
|
||||
- name: copy-assets
|
||||
image: alpine/git:latest
|
||||
command: ['sh', '-c']
|
||||
args:
|
||||
- |
|
||||
# Git에서 assets 복사
|
||||
git clone --depth 1 --branch main https://gitea0213.kro.kr/bluemayne/applications.git /tmp/repo
|
||||
# assets 폴더 덮어쓰기
|
||||
rm -rf /www/assets
|
||||
cp -r /tmp/repo/homer/assets /www/assets
|
||||
# config.yml 복사
|
||||
cp /config/config.yml /www/assets/config.yml
|
||||
# lighttpd 사용자(uid=1000)가 읽을 수 있도록 권한 변경
|
||||
chmod -R 755 /www/assets
|
||||
chown -R 1000:65533 /www/assets
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /config
|
||||
- name: www
|
||||
mountPath: /www
|
||||
containers:
|
||||
- name: homer
|
||||
image: b4bz/homer:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: www
|
||||
mountPath: "/www"
|
||||
resources:
|
||||
requests:
|
||||
memory: "64Mi"
|
||||
cpu: "5m" # Reduced from 50m based on actual usage (1m)
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: homer-config
|
||||
- name: www
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: homer
|
||||
namespace: homer
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: homer
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: homer-ingress
|
||||
namespace: homer
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- mayne.kro.kr
|
||||
- www.mayne.kro.kr
|
||||
secretName: homer-tls
|
||||
rules:
|
||||
- host: mayne.kro.kr
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: homer
|
||||
port:
|
||||
number: 80
|
||||
- host: www.mayne.kro.kr
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: homer
|
||||
port:
|
||||
number: 80
|
||||
35
homer/ingress.yaml
Normal file
35
homer/ingress.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: homer-ingress
|
||||
namespace: homer
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- mayne.kro.kr
|
||||
- www.mayne.kro.kr
|
||||
secretName: homer-tls
|
||||
rules:
|
||||
- host: mayne.kro.kr
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: homer
|
||||
port:
|
||||
number: 80
|
||||
- host: www.mayne.kro.kr
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: homer
|
||||
port:
|
||||
number: 80
|
||||
@@ -2,15 +2,11 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
# ArgoCD Application 리소스는 infrastructure/kustomization.yaml에서 관리
|
||||
# - argocd/homer.yaml
|
||||
|
||||
# Namespace with Goldilocks label
|
||||
- namespace.yaml
|
||||
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
|
||||
# ConfigMap 생성: config.yml만 포함 (assets는 InitContainer에서 Git에서 복사)
|
||||
configMapGenerator:
|
||||
- name: homer-config
|
||||
namespace: homer
|
||||
|
||||
13
homer/service.yaml
Normal file
13
homer/service.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: homer
|
||||
namespace: homer
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: homer
|
||||
@@ -2,11 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
# ArgoCD Application 리소스는 infrastructure/kustomization.yaml에서 관리
|
||||
# - argocd/umami.yaml
|
||||
|
||||
# Namespace with Goldilocks label
|
||||
- namespace.yaml
|
||||
|
||||
- vault/umami-password.yaml
|
||||
- ingress.yaml
|
||||
|
||||
Reference in New Issue
Block a user