Add annotation for cert-manager
This commit is contained in:
@@ -61,8 +61,10 @@
|
||||
|
||||
## 3. Ingress 설정
|
||||
|
||||
|
||||
- gitea에서 ingress 사용을 위해서는 다음과 같이 설정할 수 있다.
|
||||
|
||||
### 1) tls 시크릿 직접 생성
|
||||
|
||||
``` yaml
|
||||
# ingress 배포 전 인증서 secret 배포 필요(secret 이름은 platform)
|
||||
@@ -88,6 +90,39 @@ ingress:
|
||||
kubectl create secret tls platform --cert=<path-to-cert-file> --key=<path-to-key-file> -n <namespace>
|
||||
```
|
||||
|
||||
### 2) cert-manager 사용방법
|
||||
|
||||
- 해당 방법은 클러스터에 cert-manager가 배포되어 있을 때 사용할 수 있다.
|
||||
- `clusterIssuer` 배포
|
||||
``` yaml
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: selfsigned-issuer
|
||||
spec:
|
||||
selfSigned: {}
|
||||
```
|
||||
|
||||
- custom-values.yaml 정의
|
||||
``` yaml
|
||||
ingress:
|
||||
enabled: true
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: 200m
|
||||
cert-manager.io/cluster-issuer: "selfsigned-issuer" # 생성한 cluster issuer 설정
|
||||
cert-manager.io/duration: 8760h # 인증서 유효기간 설정
|
||||
cert-manager.io/renew-before: 720h # 자동 갱신 설정. 만료되기 전 갱신 시간 설정
|
||||
hosts:
|
||||
- host: gitea.example.org
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- hosts:
|
||||
host: gitea.example.org # 도메인 수정 필요
|
||||
secretName: gitea-tls-secret
|
||||
```
|
||||
|
||||
## 4. lifecycleHook을 이용한 Keycloak SSO 연동
|
||||
|
||||
@@ -102,7 +137,10 @@ ingress:
|
||||
extraVolumes:
|
||||
- name: gitea-tls
|
||||
secret:
|
||||
## 직접 생성 시
|
||||
secretName: platform
|
||||
## cert-manganager 사용시
|
||||
# secretName: gitea-tls-secret
|
||||
|
||||
extraContainerVolumeMounts:
|
||||
- name: gitea-tls
|
||||
|
||||
@@ -1,12 +1,37 @@
|
||||
global:
|
||||
imageRegistry: ""
|
||||
|
||||
# # ingress 배포 전 인증서 secret 배포 필요(secret 이름은 platform)
|
||||
# ingress:
|
||||
# enabled: true
|
||||
# annotations:
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# nginx.ingress.kubernetes.io/proxy-body-size: 200m
|
||||
# hosts:
|
||||
# - host: gitea.example.org
|
||||
# paths:
|
||||
# - path: /
|
||||
# pathType: Prefix
|
||||
# tls:
|
||||
# - hosts:
|
||||
# host: gitea.example.org
|
||||
# secretName: platform
|
||||
|
||||
# # 사설 인증서를 사용 시 아래 내용 추가
|
||||
# extraVolumes:
|
||||
# - name: gitea-tls
|
||||
# secret:
|
||||
# secretName: platform
|
||||
|
||||
# ingress 배포 전 인증서 secret 배포 필요(secret 이름은 platform)
|
||||
ingress:
|
||||
enabled: true
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: 200m
|
||||
cert-manager.io/cluster-issuer: "selfsigned-issuer"
|
||||
cert-manager.io/duration: 8760h
|
||||
cert-manager.io/renew-before: 720h
|
||||
hosts:
|
||||
- host: gitea.example.org
|
||||
paths:
|
||||
@@ -15,13 +40,14 @@ ingress:
|
||||
tls:
|
||||
- hosts:
|
||||
host: gitea.example.org
|
||||
secretName: platform
|
||||
secretName: gitea-tls-secret
|
||||
|
||||
# 사설 인증서를 사용 시 아래 내용 추가
|
||||
extraVolumes:
|
||||
- name: gitea-tls
|
||||
secret:
|
||||
secretName: platform
|
||||
secretName: gitea-tls-secret
|
||||
|
||||
|
||||
extraContainerVolumeMounts:
|
||||
- name: gitea-tls
|
||||
|
||||
Reference in New Issue
Block a user