# Rancher Monitoring 버전 갱신 가이드 - 해당 차트는 `rancher-monitoring-crd`가 배포된 후 배포되어야 한다. - 갱신 작업 시 `rancher-monitoring-crd`에 대한 갱신 작업도 같이 진행되어야 한다. ## 1. git 작업 환경 구성 - 서비스 카탈로그 git 다운로드 ``` $ git clone https://github.com/paasup/service-catalog.git ``` - 작업 브랜치로 체크아웃 ``` $ git checkout -b update-monitoring/104.1.2+up57.0.3 ``` ## 2. helm chart upgrade ### 1) 파일 삭제 - 수정 또는 추가한 파일을 제외한 나머지 파일을 삭제한다. ``` sh # chart 디렉토리로 이동 cd ~/service-catalog/charts/rancher-monitoring # 파일 삭제 전 삭제할 파일 목록 확인 find . -mindepth 1 \( -name "CUSTOM-README.md" -o -name "BUILD-README.md" -o -name "custom-values.yaml" \) -prune -o -print # 파일 삭제 find . -mindepth 1 \(-name "CUSTOM-README.md" -o -name "BUILD-README.md" -o -name "custom-values.yaml" \) -prune -o -exec rm -rf {} + ``` ### 2) 차트 다운로드 - 해당 차트는 rancher에서 관리 중인 [charts](https://github.com/rancher/charts)에서 다운로드한다. - rancher/charts 클론 ``` sh # 작업 디렉토리로 이동 $ cd ~/ # rancher 버전 별로 branch가 관리된다. # rancher 버전에 맞추어 필요한 버전의 chart를 클론한다. $ git clone -b release-v2.9 https://github.com/rancher/charts ``` - 파일 복사 ``` sh $ cd service-catalog/charts/rancher-monitoring/ $ cp -r ~/charts/charts/rancher-monitoring/104.1.2+up57.0.3/* ./ ``` ## 3. git push 및 tag 추가 - **push 전에 rancher-monitoring-crd에 대한 갱신 작업을 완료 한 후 작업한다.** - 갱신작업 진행후 commit ``` $ git add ../rancher-monitoring-crd $ git add ../rancher-monitoring $ git commit -m "update rancher-monitoring/104.1.2+up57.0.3" ``` - main 브랜치에 체크아웃 후 merge ``` $ git checkout main $ git merge update-rancher-monitoring/104.1.2+up57.0.3 ``` - git에 push 후 작업 브랜치 삭제 ``` $ git push -u origin main $ git branch -d update-rancher-monitoring/104.1.2+up57.0.3 ``` - git tag 추가 후 push ``` $ git tag rancher-monitoring-crd/104.1.2+up57.0.3 $ git push origin rancher-monitoring-crd/104.1.2+up57.0.3 $ git tag rancher-monitoring/104.1.2+up57.0.3 $ git push origin rancher-monitoring/104.1.2+up57.0.3 ```