Update BUILD-README.md, CUSTOM-REAME.md with preinstallHook
This commit is contained in:
@@ -12,22 +12,37 @@ $ git clone https://github.com/paasup/service-catalog.git
|
|||||||
$ git checkout -b update-rancher/2.9.1
|
$ git checkout -b update-rancher/2.9.1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 2. helm 차트 버전 업데이트
|
## 2. helm 차트 버전 업데이트
|
||||||
|
|
||||||
- README-build.md, custom-values.yaml(이름 미정)을 제외한 파일 삭제
|
### 1) 차트 버전 변경
|
||||||
|
|
||||||
|
- rancher 차트에 추가한 파일을 제외한 나미지 파일을 삭제한다.
|
||||||
|
|
||||||
|
- 삭제 제외 파일,디렉토리 목록
|
||||||
|
|
||||||
|
- BUILD-README.md
|
||||||
|
- CUSTOM-README.md
|
||||||
|
- custom-values.yaml
|
||||||
|
|
||||||
|
- templates/preinstallHook/*
|
||||||
|
|
||||||
|
- 삭제 명령어.
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
# chart 디렉토리로 이동
|
# chart 디렉토리로 이동
|
||||||
cd ~/service-catalog/charts/rancher
|
cd ~/service-catalog/charts/rancher
|
||||||
|
|
||||||
# 파일 삭제 전 삭제할 파일 목록 확인
|
# 파일 삭제 전 삭제할 파일 목록 확인
|
||||||
find . -mindepth 1 \( -name "CUSTOM-README.md" -o -name "BUILD-README.md" -o -name "custom-values.yaml" \) -prune -o -print
|
find . -type f -not \( -name "CUSTOM-README.md" -o -name "BUILD-README.md" -o -name "custom-values.yaml" -o -path "*/templates/preinstallHook/*" \)
|
||||||
|
|
||||||
# 파일 삭제
|
# 파일 삭제
|
||||||
find . -mindepth 1 \(-name "CUSTOM-README.md" -o -name "BUILD-README.md" -o -name "custom-values.yaml" \) -prune -o -exec rm -rf {} +
|
find . -type f -not \( -name "CUSTOM-README.md" -o -name "BUILD-README.md" -o -name "custom-values.yaml" -o -path "*/templates/preinstallHook/*" \) -delete
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
- rancher 차트 다운로드
|
- 변경할 rancher 버전의 차트를 다운로드
|
||||||
``` sh
|
``` sh
|
||||||
# charts 디렉토리로 이동
|
# charts 디렉토리로 이동
|
||||||
cd ~/service-catalog/charts
|
cd ~/service-catalog/charts
|
||||||
@@ -46,7 +61,10 @@ $ git checkout -b update-rancher/2.9.1
|
|||||||
rm rancher-*.tgz
|
rm rancher-*.tgz
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 3. git push 및 tag 추가
|
## 3. git push 및 tag 추가
|
||||||
|
|
||||||
- 갱신작업 진행후 commit
|
- 갱신작업 진행후 commit
|
||||||
```
|
```
|
||||||
$ git add .
|
$ git add .
|
||||||
@@ -70,3 +88,14 @@ $ git branch -d update-rancher/2.9.1
|
|||||||
$ git tag rancher/2.9.1
|
$ git tag rancher/2.9.1
|
||||||
$ git push origin rancher/2.9.1
|
$ git push origin rancher/2.9.1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 4. 차트 버전 정보
|
||||||
|
|
||||||
|
- rancher/2.9.1
|
||||||
|
- 서비스 배포를 위하여 custom-values.yam에 정의하였다.
|
||||||
|
- 차트의 빌드 방법과 배포 방법을 BUILD-README.md, CUSTOM-README.md 문서에 작성하였다.
|
||||||
|
- rancher/2.9.1-1
|
||||||
|
- 사설 인증서 사용시 전처리를 위한 Helm preinstall Hook을 추가하였다.
|
||||||
|
- 변경 사항을 BUILD-README.md, CUSTOM-README.md 문서에 반영하였다.
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ extraEnv:
|
|||||||
|
|
||||||
### 4) Ingress 설정
|
### 4) Ingress 설정
|
||||||
|
|
||||||
#### tls 시크릿 직접 생성
|
#### 4.1) tls 시크릿 직접 생성
|
||||||
|
|
||||||
|
|
||||||
- Rancher에서 ingress 사용을 위해서는 다음과 같이 설정할 수 있다.
|
- Rancher에서 ingress 사용을 위해서는 다음과 같이 설정할 수 있다.
|
||||||
@@ -60,6 +60,7 @@ extraEnv:
|
|||||||
nginx.ingress.kubernetes.io/proxy-body-size: 10m
|
nginx.ingress.kubernetes.io/proxy-body-size: 10m
|
||||||
|
|
||||||
# 사설인증서 사용시 true 설정
|
# 사설인증서 사용시 true 설정
|
||||||
|
## privateCA를 true로 설정
|
||||||
privateCA: true
|
privateCA: true
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -68,17 +69,16 @@ extraEnv:
|
|||||||
kubectl create secret tls rancher-tls-ingress --cert=<path-to-cert-file> --key=<path-to-key-file> -n <namespace>
|
kubectl create secret tls rancher-tls-ingress --cert=<path-to-cert-file> --key=<path-to-key-file> -n <namespace>
|
||||||
```
|
```
|
||||||
|
|
||||||
##### tls-ca 생성
|
|
||||||
- 사설 인증서 사용시에는 ca를 secret으로 생성해야 한다. 로컬 파일을 이용해 secret을 생성하는 방법은 다음과 같다. secret의 이름은 `tls-ca`로 생성해야 한다.
|
- 사설 인증서 사용시에는 ca를 secret으로 생성해야 한다. 로컬 파일을 이용해 secret을 생성하는 방법은 다음과 같다. secret의 이름은 `tls-ca`로 생성해야 한다.
|
||||||
``` sh
|
``` sh
|
||||||
kubectl create secret generic tls-ca --from-file=${CERT_FILE} -n ${NAMESPACE}
|
kubectl create secret generic tls-ca --from-file=${CERT_FILE} -n ${NAMESPACE}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
#### cert-manager를 이용한 자동 생성
|
#### 4.2) cert-manager를 이용한 자동 생성
|
||||||
|
|
||||||
|
|
||||||
- cert manager를 통해 자동생성 시 `custom-values.yaml` 수정. ingress annotaion에 추가한다.
|
- cert manager를 통해 인증서 자동 생성 시 `custom-values.yaml` 수정한다.
|
||||||
``` yaml
|
``` yaml
|
||||||
# ingress 배포 전 인증서 secret 배포 필요(secret 이름은 platform)
|
# ingress 배포 전 인증서 secret 배포 필요(secret 이름은 platform)
|
||||||
hostname: rancher.example.org
|
hostname: rancher.example.org
|
||||||
@@ -89,22 +89,11 @@ ingress:
|
|||||||
secretName: rancher-tls-secret
|
secretName: rancher-tls-secret
|
||||||
extraAnnotations:
|
extraAnnotations:
|
||||||
nginx.ingress.kubernetes.io/proxy-body-size: 10m
|
nginx.ingress.kubernetes.io/proxy-body-size: 10m
|
||||||
cert-manager.io/cluster-issuer: "selfsigned-issuer"
|
|
||||||
cert-manager.io/duration: 8760h
|
|
||||||
cert-manager.io/renew-before: 720h
|
|
||||||
|
|
||||||
|
|
||||||
# 사설인증서 사용시 true 설정
|
# 사설인증서 사용시 추가 설정
|
||||||
|
## privateCA를 true로 설정
|
||||||
privateCA: true
|
privateCA: true
|
||||||
|
## 사설인증서 사용을 위한 전처리 작업을 true로 설정
|
||||||
|
preinstallHook: true
|
||||||
```
|
```
|
||||||
|
|
||||||
##### tls-ca 생성
|
|
||||||
- `rke` namespace에 `rancher-tls-secret` secret이 생성된 후에 작업을 진행한다.
|
|
||||||
``` sh
|
|
||||||
kubectl get secret rancher-tls-secret
|
|
||||||
```
|
|
||||||
- 생성된 인증서 secret인 `rancher-tls-secret`에서 ca 추출하여 `tls-ca` secret 생성한다.
|
|
||||||
``` sh
|
|
||||||
kubectl get secret rancher-tls-secret -o jsonpath='{.data.tls\.crt}' -n rke | base64 -d > cacerts.pem
|
|
||||||
kubectl create secret generic tls-ca --from-file=cacerts.pem -n rke
|
|
||||||
```
|
|
||||||
Reference in New Issue
Block a user