Skip to content

OTCS-Frontend 언어팩/패치 적용 절차


1. 언어팩/패치 파일 서버에 복사

sudo mkdir -p /mnt/k8s/languagepack
sudo mkdir -p /mnt/k8s/patch

sudo cp languagepack_ko.zip /mnt/k8s/languagepack/
sudo cp custom_patch.zip /mnt/k8s/patch/

2. PV/PVC 선언 및 적용

languagepack PV/PVC

apiVersion: v1
kind: PersistentVolume
metadata:
  name: languagepack-pv
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteMany
  hostPath:
    path: /mnt/k8s/languagepack
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: languagepack-pvc
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi

patch PV/PVC

apiVersion: v1
kind: PersistentVolume
metadata:
  name: patch-pv
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteMany
  hostPath:
    path: /mnt/k8s/patch
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: patch-pvc
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi

적용

kubectl apply -f languagepack-pv-pvc.yaml
kubectl apply -f patch-pv-pvc.yaml

3. StatefulSet YAML 추출 및 수정

추출

kubectl get statefulset otcs-frontend -n ecm -o yaml > otcs-frontend-tmp.yaml

4. YAML에 마운트 및 Init Container 추가

(1) volumes 항목 추가

      - name: languagepack
        persistentVolumeClaim:
          claimName: languagepack-pvc
      - name: patch
        persistentVolumeClaim:
          claimName: patch-pvc

(2) volumeMounts 항목 추가 (메인 컨테이너 & initContainers)

        - name: languagepack
          mountPath: /languagepack
        - name: patch
          mountPath: /patch

(3) Init Container 추가

  initContainers:
    - name: unzip-languagepack
      image: busybox
      command: ["sh", "-c", "unzip /languagepack/languagepack_ko.zip -d /opt/opentext/cs/langpkgstaging/"]
#      command: ["sh", "-c", "cp /languagepack/languagepack_ko.zip /opt/opentext/cs/langpkgstaging/"]
      volumeMounts:
        - name: languagepack
          mountPath: /languagepack
    - name: unzip-patch
      image: busybox
      command: ["sh", "-c", "unzip /patch/custom_patch.zip -d /opt/opentext/cs/patch/"]
      volumeMounts:
        - name: patch
          mountPath: /patch

5. 적용

kubectl apply -f otcs-frontend-tmp.yaml -n ecm

참고

  • /opt/opentext/cs 경로는 컨테이너의 로컬 파일시스템(overlay)임.
  • 하위 폴더 langpkgstaging, patch에 직접 언팩하면 바로 반영됨.
  • PVC를 /opt/opentext/cs에 마운트하지 않아도 됨.
  • 필요에 따라 파일권한(chown/chmod 등)도 추가적으로 조정 가능.