REFACTOR(apps): migrate to app-template
- docusaurus: Replace with app-template, configmap in manifests/ - homer: Replace with app-template, configMapGenerator for config.yml - crafty: Replace with app-template, pvc/ingress/service in manifests/ - mas: Replace with app-template, rbac/external-secret in manifests/ - All apps use app-template chart v3.6.1
This commit is contained in:
@@ -8,6 +8,15 @@ metadata:
|
||||
spec:
|
||||
project: default
|
||||
sources:
|
||||
- repoURL: https://bjw-s.github.io/helm-charts
|
||||
chart: app-template
|
||||
targetRevision: 3.6.1
|
||||
helm:
|
||||
valueFiles:
|
||||
- $values/homer/helm-values.yaml
|
||||
- repoURL: https://github.com/K3S-HOME/applications.git
|
||||
targetRevision: main
|
||||
ref: values
|
||||
- repoURL: https://github.com/K3S-HOME/applications.git
|
||||
targetRevision: main
|
||||
path: homer
|
||||
|
||||
@@ -1,68 +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://github.com/K3S-HOME/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"
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: homer-config
|
||||
- name: www
|
||||
emptyDir: {}
|
||||
93
homer/helm-values.yaml
Normal file
93
homer/helm-values.yaml
Normal file
@@ -0,0 +1,93 @@
|
||||
# homer - bjw-s/app-template values
|
||||
# Dashboard for self-hosted services
|
||||
|
||||
controllers:
|
||||
main:
|
||||
initContainers:
|
||||
copy-homer-files:
|
||||
image:
|
||||
repository: b4bz/homer
|
||||
tag: latest
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
cp -r /www/* /tmp/www/
|
||||
copy-assets:
|
||||
image:
|
||||
repository: alpine/git
|
||||
tag: latest
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
git clone --depth 1 --branch main https://github.com/K3S-HOME/applications.git /tmp/repo
|
||||
rm -rf /www/assets
|
||||
cp -r /tmp/repo/homer/assets /www/assets
|
||||
cp /config/config.yml /www/assets/config.yml
|
||||
chmod -R 755 /www/assets
|
||||
chown -R 1000:65533 /www/assets
|
||||
containers:
|
||||
main:
|
||||
image:
|
||||
repository: b4bz/homer
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
resources:
|
||||
requests:
|
||||
cpu: 5m
|
||||
memory: 64Mi
|
||||
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
|
||||
ingress:
|
||||
main:
|
||||
enabled: true
|
||||
className: traefik
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
hosts:
|
||||
- host: mayne.kro.kr
|
||||
paths:
|
||||
- path: /
|
||||
service:
|
||||
identifier: main
|
||||
port: http
|
||||
- host: www.mayne.kro.kr
|
||||
paths:
|
||||
- path: /
|
||||
service:
|
||||
identifier: main
|
||||
port: http
|
||||
tls:
|
||||
- secretName: homer-tls
|
||||
hosts:
|
||||
- mayne.kro.kr
|
||||
- www.mayne.kro.kr
|
||||
|
||||
persistence:
|
||||
www:
|
||||
enabled: true
|
||||
type: emptyDir
|
||||
advancedMounts:
|
||||
main:
|
||||
copy-homer-files:
|
||||
- path: /tmp/www
|
||||
copy-assets:
|
||||
- path: /www
|
||||
main:
|
||||
- path: /www
|
||||
config:
|
||||
enabled: true
|
||||
type: configMap
|
||||
name: homer-config
|
||||
advancedMounts:
|
||||
main:
|
||||
copy-assets:
|
||||
- path: /config
|
||||
@@ -1,35 +0,0 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: homer-ingress
|
||||
namespace: homer
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
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
|
||||
@@ -1,11 +1,9 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
configMapGenerator:
|
||||
- name: homer-config
|
||||
namespace: homer
|
||||
files:
|
||||
- config.yml
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: homer
|
||||
namespace: homer
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: homer
|
||||
Reference in New Issue
Block a user