Compare commits
75 Commits
4.2.x
...
contributi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab8b150739 | ||
|
|
b4d3eb0da3 | ||
|
|
d09bcffdd8 | ||
|
|
c64a5917fe | ||
|
|
cc550b5476 | ||
|
|
20608cb79f | ||
|
|
7fa693cf7a | ||
|
|
53eef65e2f | ||
|
|
4935214321 | ||
|
|
a6ee514cd4 | ||
|
|
0823147573 | ||
|
|
729f3bfaf4 | ||
|
|
fbe5cd8521 | ||
|
|
26fbd581da | ||
|
|
edb712aec5 | ||
|
|
b2f3854ad3 | ||
|
|
43f0351bda | ||
|
|
772870c618 | ||
|
|
60413ff330 | ||
|
|
90aad445eb | ||
|
|
57eae5a411 | ||
|
|
a2bb69217c | ||
|
|
a12cdaa798 | ||
|
|
25ab6a7140 | ||
|
|
cb776dc0ab | ||
|
|
7b7dd253e9 | ||
|
|
7fa8db7334 | ||
|
|
2ecdb074cd | ||
|
|
7b155b3c0b | ||
|
|
0a48c563c6 | ||
|
|
b6c2872ac8 | ||
|
|
bf5494cffe | ||
|
|
ae418ce420 | ||
|
|
7dad5c8742 | ||
|
|
ed5671189c | ||
|
|
c0981885e0 | ||
|
|
27200749eb | ||
|
|
0550fe4965 | ||
|
|
510089fdf7 | ||
|
|
f72d8542dd | ||
|
|
9086c60482 | ||
|
|
6ac1790f2f | ||
|
|
b2b23f7b5e | ||
|
|
96098869a8 | ||
|
|
3af8a46d83 | ||
|
|
b2adbc1079 | ||
|
|
81c6c93d2a | ||
|
|
0fb4003417 | ||
|
|
d2875cfacb | ||
|
|
50d19be98f | ||
|
|
342b66cfca | ||
|
|
dcbe48d308 | ||
|
|
f9ca7b8905 | ||
|
|
4cbecb2686 | ||
|
|
9f7a53a860 | ||
|
|
fb2434a25b | ||
|
|
0febd840b2 | ||
|
|
3f04f5f07d | ||
|
|
d4e159b1dd | ||
|
|
5e16e6cdc8 | ||
|
|
97a717796d | ||
|
|
181057d1fe | ||
|
|
18ad94ec8a | ||
|
|
8c1401b6c0 | ||
|
|
c6d961992d | ||
|
|
5d50f46bc5 | ||
|
|
43682454e5 | ||
|
|
4cec70760e | ||
|
|
491f0cdaec | ||
|
|
e9326f2eb2 | ||
|
|
5a0005c291 | ||
|
|
aae34bb339 | ||
|
|
83f1c1047b | ||
|
|
d230341909 | ||
|
|
832e63ed3d |
35
.github/ISSUE_TEMPLATE/amendment_request.yml
vendored
35
.github/ISSUE_TEMPLATE/amendment_request.yml
vendored
@@ -1,35 +0,0 @@
|
|||||||
name: 개발가이드 수정 요청 Requesting changes to the development guide
|
|
||||||
description: 개발가이드 수정 요청하는 템플릿입니다. Template for requesting changes to the dev guide.
|
|
||||||
title: "[Guide]: "
|
|
||||||
labels: ["guide"]
|
|
||||||
assignees:
|
|
||||||
- overpassion
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
시간을 내어 개발가이드 수정 요청을 작성해 주셔서 감사합니다. Thank you for taking the time to fill out a DevGuide correction request. (공유하고 싶은 기술문서나 노하우는 github wiki에 남겨 주세요. If you have any documentation or know-how you'd like to share, please leave it on our github wiki.)
|
|
||||||
- type: input
|
|
||||||
id: url
|
|
||||||
attributes:
|
|
||||||
label: 개발가이드 URL Dev Guide URL
|
|
||||||
description: 수정해야할 개발가이드 URL을 적어 주세요. Please write down the dev guide URL that needs to be modified.
|
|
||||||
placeholder: Example) https://www.egovframe.go.kr/wiki/doku.php?id=egovframework:rte4.1:fdl:aop:aspectj
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: where-to-amend
|
|
||||||
attributes:
|
|
||||||
label: 수정 대상 내용 What to fix
|
|
||||||
description: 수정해야할 대상 내용을 기입해 주세요. Fill in what you need to fix.
|
|
||||||
placeholder: 수정해야할 대상은 다음과 같습니다. Here's what you'll need to modify
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: amendment
|
|
||||||
attributes:
|
|
||||||
label: 수정 문구 Corrective Wording
|
|
||||||
description: 어떻게 수정되어야 하는지 적어주세요. Please write down how it should be fixed.
|
|
||||||
placeholder: 다음과 같이 수정되어야 합니다. It should be modified as follows
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -3,7 +3,7 @@ description: 오류 내용을 이슈로 등록하는 템플릿입니다. Templat
|
|||||||
title: "[Bug]: "
|
title: "[Bug]: "
|
||||||
labels: ["bug", "triage"]
|
labels: ["bug", "triage"]
|
||||||
assignees:
|
assignees:
|
||||||
- overpassion
|
- rukegithub
|
||||||
body:
|
body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
6
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
6
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -1,9 +1,9 @@
|
|||||||
name: 기능 요구 및 의견 Feature Request
|
name: 기능 요구 Feature Request
|
||||||
description: 기능 요구나 기타 의견을 이슈로 등록하는 템플릿입니다. Suggest an idea for improving eGovFrame.
|
description: 기능 요구를 이슈로 등록하는 템플릿입니다. Suggest a new feature for improving eGovFrame.
|
||||||
title: "[기능요구(Feature)]: "
|
title: "[기능요구(Feature)]: "
|
||||||
labels: ["feature"]
|
labels: ["feature"]
|
||||||
assignees:
|
assignees:
|
||||||
- overpassion
|
- rukegithub
|
||||||
body:
|
body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
55
.github/ISSUE_TEMPLATE/improvement_plan.yml
vendored
Normal file
55
.github/ISSUE_TEMPLATE/improvement_plan.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
name: 발전 방안 제안 Improvement Plan
|
||||||
|
description: 발전 방안을 이슈로 등록하는 템플릿입니다. Suggest a new plan for improving eGovFrame.
|
||||||
|
title: "[발전 방안 제안(Improvement Plan)]: "
|
||||||
|
labels: ["Improvement"]
|
||||||
|
assignees:
|
||||||
|
- yongfire38
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
시간을 내어 의견을 작성해 주셔서 감사합니다. Thank you for taking the time to fill out a request.
|
||||||
|
- type: input
|
||||||
|
id: idea-name
|
||||||
|
attributes:
|
||||||
|
label: 아이디어명 Idea Name
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: idea-summary
|
||||||
|
attributes:
|
||||||
|
label: 아이디어 요약 Idea Summary
|
||||||
|
description: 과제 내용을 300자 이내로 간결하게 요약 및 정의해 주세요 Please summarize and define your content in 300 characters or less
|
||||||
|
placeholder: 예) 게시판 첨부기능 추가 Example) Adding a bulletin board attachment
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: suggestion-background
|
||||||
|
attributes:
|
||||||
|
label: 제안배경 Suggestion Background
|
||||||
|
description: 아이디어를 제안하게 된 배경 및 필요성을 기술해 주세요. Please describe the background and need for the idea.
|
||||||
|
placeholder: 아이디어를 제안하게 된 배경은 다음과 같습니다. The background to suggesting the idea is as follows.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: expectations
|
||||||
|
attributes:
|
||||||
|
label: 기대효과 Expectations
|
||||||
|
description: 아이디어의 실현 가능성과 예상되는 기대효과를 제시하여 주세요. Please describe the expected impact and outcome of the idea.
|
||||||
|
placeholder: 해당 아이디어의 기대효과는 다음과 같습니다. Here are the expected effects of this idea.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: free-writing
|
||||||
|
attributes:
|
||||||
|
label: 자유기술 Free Writing
|
||||||
|
description: 추가 기재하고 싶은 항목 및 내용을 자유롭게 기재하여 주세요. Please feel free to add anything else you'd like to include.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: reference
|
||||||
|
attributes:
|
||||||
|
label: 참고문헌 Reference
|
||||||
|
description: 참고문헌이 있는 경우 작성하여 주세요. If you have references, please include them.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
@@ -3,7 +3,6 @@ package org.egovframe.cloud.apigateway.api;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.context.MessageSource;
|
import org.springframework.context.MessageSource;
|
||||||
import org.springframework.context.i18n.LocaleContextHolder;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@@ -25,6 +24,7 @@ import java.util.Locale;
|
|||||||
* 수정일 수정자 수정내용
|
* 수정일 수정자 수정내용
|
||||||
* ---------- -------- ---------------------------
|
* ---------- -------- ---------------------------
|
||||||
* 2021/08/10 jaeyeolkim 최초 생성
|
* 2021/08/10 jaeyeolkim 최초 생성
|
||||||
|
* 2024/09/24 이백행 컨트리뷰션 이클립스 문제(Problems) 해결
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ import org.springframework.boot.web.error.ErrorAttributeOptions;
|
|||||||
import org.springframework.boot.web.reactive.error.DefaultErrorAttributes;
|
import org.springframework.boot.web.reactive.error.DefaultErrorAttributes;
|
||||||
import org.springframework.boot.web.reactive.error.ErrorAttributes;
|
import org.springframework.boot.web.reactive.error.ErrorAttributes;
|
||||||
import org.springframework.context.MessageSource;
|
import org.springframework.context.MessageSource;
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.context.i18n.LocaleContextHolder;
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
import org.springframework.web.reactive.function.server.ServerRequest;
|
import org.springframework.web.reactive.function.server.ServerRequest;
|
||||||
|
|
||||||
@@ -31,6 +29,7 @@ import java.util.Map;
|
|||||||
* 수정일 수정자 수정내용
|
* 수정일 수정자 수정내용
|
||||||
* ---------- -------- ---------------------------
|
* ---------- -------- ---------------------------
|
||||||
* 2021/07/16 jaeyeolkim 최초 생성
|
* 2021/07/16 jaeyeolkim 최초 생성
|
||||||
|
* 2024/09/24 이백행 컨트리뷰션 이클립스 문제(Problems) 해결
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|||||||
@@ -1,76 +1,76 @@
|
|||||||
server:
|
server:
|
||||||
port: 8000
|
port: 8000
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: apigateway
|
name: apigateway
|
||||||
cloud:
|
cloud:
|
||||||
gateway:
|
gateway:
|
||||||
routes:
|
routes:
|
||||||
- id: user-service
|
- id: user-service
|
||||||
uri: lb://USER-SERVICE
|
uri: lb://USER-SERVICE
|
||||||
predicates:
|
predicates:
|
||||||
- Path=/user-service/**
|
- Path=/user-service/**
|
||||||
filters:
|
filters:
|
||||||
- RemoveRequestHeader=Cookie
|
- RemoveRequestHeader=Cookie
|
||||||
- RewritePath=/user-service/(?<segment>.*), /$\{segment}
|
- RewritePath=/user-service/(?<segment>.*), /$\{segment}
|
||||||
- id: portal-service
|
- id: portal-service
|
||||||
uri: lb://PORTAL-SERVICE
|
uri: lb://PORTAL-SERVICE
|
||||||
predicates:
|
predicates:
|
||||||
- Path=/portal-service/**
|
- Path=/portal-service/**
|
||||||
filters:
|
filters:
|
||||||
- RewritePath=/portal-service/(?<segment>.*), /$\{segment}
|
- RewritePath=/portal-service/(?<segment>.*), /$\{segment}
|
||||||
- id: board-service
|
- id: board-service
|
||||||
uri: lb://BOARD-SERVICE
|
uri: lb://BOARD-SERVICE
|
||||||
predicates:
|
predicates:
|
||||||
- Path=/board-service/**
|
- Path=/board-service/**
|
||||||
filters:
|
filters:
|
||||||
- RewritePath=/board-service/(?<segment>.*), /$\{segment}
|
- RewritePath=/board-service/(?<segment>.*), /$\{segment}
|
||||||
- id: reserve-item-service
|
- id: reserve-item-service
|
||||||
uri: lb://RESERVE-ITEM-SERVICE
|
uri: lb://RESERVE-ITEM-SERVICE
|
||||||
predicates:
|
predicates:
|
||||||
- Path=/reserve-item-service/**
|
- Path=/reserve-item-service/**
|
||||||
filters:
|
filters:
|
||||||
- RewritePath=/reserve-item-service/(?<segment>.*), /$\{segment}
|
- RewritePath=/reserve-item-service/(?<segment>.*), /$\{segment}
|
||||||
- id: reserve-check-service
|
- id: reserve-check-service
|
||||||
uri: lb://RESERVE-CHECK-SERVICE
|
uri: lb://RESERVE-CHECK-SERVICE
|
||||||
predicates:
|
predicates:
|
||||||
- Path=/reserve-check-service/**
|
- Path=/reserve-check-service/**
|
||||||
filters:
|
filters:
|
||||||
- RewritePath=/reserve-check-service/(?<segment>.*), /$\{segment}
|
- RewritePath=/reserve-check-service/(?<segment>.*), /$\{segment}
|
||||||
- id: reserve-request-service
|
- id: reserve-request-service
|
||||||
uri: lb://RESERVE-REQUEST-SERVICE
|
uri: lb://RESERVE-REQUEST-SERVICE
|
||||||
predicates:
|
predicates:
|
||||||
- Path=/reserve-request-service/**
|
- Path=/reserve-request-service/**
|
||||||
filters:
|
filters:
|
||||||
- RewritePath=/reserve-request-service/(?<segment>.*), /$\{segment}
|
- RewritePath=/reserve-request-service/(?<segment>.*), /$\{segment}
|
||||||
- id: openapi
|
- id: openapi
|
||||||
uri: http://localhost:${server.port}
|
uri: http://localhost:${server.port}
|
||||||
predicates:
|
predicates:
|
||||||
- Path=/v3/api-docs/**
|
- Path=/v3/api-docs/**
|
||||||
filters:
|
filters:
|
||||||
- RewritePath=/v3/api-docs/(?<segment>.*), /$\{segment}/v3/api-docs
|
- RewritePath=/v3/api-docs/(?<segment>.*), /$\{segment}/v3/api-docs
|
||||||
default-filters:
|
default-filters:
|
||||||
- name: GlobalFilter
|
- name: GlobalFilter
|
||||||
args:
|
args:
|
||||||
preLogger: true
|
preLogger: true
|
||||||
postLogger: true
|
postLogger: true
|
||||||
discovery:
|
discovery:
|
||||||
locator:
|
locator:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
# config server actuator
|
# config server actuator
|
||||||
management:
|
management:
|
||||||
endpoints:
|
endpoints:
|
||||||
web:
|
web:
|
||||||
exposure:
|
exposure:
|
||||||
include: refresh, health, beans, info
|
include: refresh, health, beans, info
|
||||||
|
|
||||||
info:
|
info:
|
||||||
app:
|
app:
|
||||||
name: Spring Cloud Gateway
|
name: Spring Cloud Gateway
|
||||||
description: API 라우팅 및 보안, 모니터링/메트릭 등의 기능을 간단하고 효과적인 방법으로 제공
|
description: API 라우팅 및 보안, 모니터링/메트릭 등의 기능을 간단하고 효과적인 방법으로 제공
|
||||||
swagger-ui: http://localhost:8000/webjars/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config
|
swagger-ui: http://localhost:8000/webjars/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config
|
||||||
|
|
||||||
messages:
|
messages:
|
||||||
directory: ${user.dir}/msa-attach-volume/messages
|
directory: ${user.dir}/msa-attach-volume/messages
|
||||||
|
|||||||
@@ -1,33 +1,33 @@
|
|||||||
server:
|
server:
|
||||||
port: 0 # random port
|
port: 0 # random port
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: board-service
|
name: board-service
|
||||||
jpa:
|
jpa:
|
||||||
hibernate:
|
hibernate:
|
||||||
ddl-auto: none
|
ddl-auto: none
|
||||||
properties:
|
properties:
|
||||||
hibernate:
|
hibernate:
|
||||||
dialect: org.hibernate.dialect.MySQL57Dialect
|
dialect: org.hibernate.dialect.MySQL57Dialect
|
||||||
storage_engine: innodb
|
storage_engine: innodb
|
||||||
format_sql: true
|
format_sql: true
|
||||||
default_batch_fetch_size: 1000
|
default_batch_fetch_size: 1000
|
||||||
show-sql: true
|
show-sql: true
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
enabled: true
|
enabled: true
|
||||||
max-file-size: 10MB
|
max-file-size: 10MB
|
||||||
max-request-size: 50MB
|
max-request-size: 50MB
|
||||||
|
|
||||||
# config server actuator
|
# config server actuator
|
||||||
management:
|
management:
|
||||||
endpoints:
|
endpoints:
|
||||||
web:
|
web:
|
||||||
exposure:
|
exposure:
|
||||||
include: refresh, health, beans, info
|
include: refresh, health, beans, info
|
||||||
|
|
||||||
info:
|
info:
|
||||||
app:
|
app:
|
||||||
name: Board Service
|
name: Board Service
|
||||||
description: 게시판관리, 게시물관리, 첨부파일관리 기능을 제공
|
description: 게시판관리, 게시물관리, 첨부파일관리 기능을 제공
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
# 2시간(7,200,000), 1일(86,400,000) jwt token
|
|
||||||
token:
|
|
||||||
expiration_time: 7200000
|
|
||||||
refresh_time: 86400000
|
|
||||||
secret: 'token_secret'
|
|
||||||
|
|
||||||
eureka:
|
|
||||||
instance:
|
|
||||||
instance-id: ${spring.application.name}:${spring.application.instance_id:${random.value}} # random port 사용시 eureka server에 인스턴스가 각각 표시되지 않는다
|
|
||||||
preferIpAddress: true # 서비스간 통신 시 hostname 보다 ip 를 우선
|
|
||||||
client:
|
|
||||||
register-with-eureka: true # eureka 서버에 등록
|
|
||||||
fetch-registry: true # 외부 검색 가능
|
|
||||||
service-url:
|
|
||||||
defaultZone: http://admin:admin@${eureka.instance.hostname:localhost}:8761/eureka
|
|
||||||
|
|
||||||
# file attach location - messages{lang}.properties 도 이 경로에 위치한다.
|
|
||||||
file:
|
|
||||||
directory: ${app.home:${user.home}}/msa-attach-volume # url 사용시에는 사용되지 않는다
|
|
||||||
url: http://${file.hostname:localhost}:8080 # nginx 로 파일 다운로드 처리
|
|
||||||
messages:
|
|
||||||
directory: ${file.directory}/messages
|
|
||||||
|
|
||||||
apigateway:
|
|
||||||
host: http://${apigateway.hostname:localhost}:${server.port}
|
|
||||||
|
|
||||||
# rabbitmq server
|
|
||||||
spring:
|
|
||||||
rabbitmq:
|
|
||||||
host: ${rabbitmq.hostname:localhost}
|
|
||||||
port: 5672
|
|
||||||
username: guest
|
|
||||||
password: guest
|
|
||||||
zipkin:
|
|
||||||
base-url: http://${zipkin.hostname:localhost}:${zipkin.port:9411}
|
|
||||||
|
|
||||||
egov:
|
|
||||||
message: hello
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
spring:
|
|
||||||
application:
|
|
||||||
name: board-service
|
|
||||||
|
|
||||||
datasource:
|
|
||||||
url: jdbc:h2:mem:testdb;MODE=MYSQL;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false
|
|
||||||
username: sa
|
|
||||||
password:
|
|
||||||
driver-class-name: org.h2.Driver
|
|
||||||
jpa:
|
|
||||||
# database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
|
|
||||||
hibernate:
|
|
||||||
generate-ddl: true
|
|
||||||
ddl-auto: create-drop
|
|
||||||
# dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
|
||||||
properties:
|
|
||||||
hibernate:
|
|
||||||
format_sql: true
|
|
||||||
default_batch_fetch_size: 1000 # 1:N 관계를 해결하기 위해 필요
|
|
||||||
show-sql: true
|
|
||||||
h2:
|
|
||||||
console:
|
|
||||||
enabled: true
|
|
||||||
path: /h2
|
|
||||||
|
|
||||||
logging.level:
|
|
||||||
org.hibernate.SQL: debug
|
|
||||||
|
|
||||||
file:
|
|
||||||
directory: ${user.home}/msa-attach-volume
|
|
||||||
messages:
|
|
||||||
directory: ${file.directory}/messages
|
|
||||||
|
|
||||||
# jwt token
|
|
||||||
token:
|
|
||||||
secret: egovframe_user_token
|
|
||||||
|
|
||||||
# ftp server
|
|
||||||
ftp:
|
|
||||||
enabled: false # ftp 사용 여부, FTP 서버에 최상위 디렉토리 자동 생성 및 구현체를 결정하게 된다.
|
|
||||||
|
|
||||||
# eureka 가 포함되면 eureka server 도 등록되므로 해제한다.
|
|
||||||
eureka:
|
|
||||||
client:
|
|
||||||
register-with-eureka: false
|
|
||||||
fetch-registry: false
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
database:
|
|
||||||
url: jdbc:mysql://${mysql.hostname:localhost}:3306/msaportal
|
|
||||||
|
|
||||||
spring:
|
|
||||||
datasource:
|
|
||||||
url: ${database.url}?serverTimezone=Asia/Seoul
|
|
||||||
username: msaportal
|
|
||||||
password: msaportal
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
cloud:
|
|
||||||
stream:
|
|
||||||
bindings:
|
|
||||||
attachmentEntity-out-0: # 첨부파일 entity 정보 업데이트 하기 위한 이벤트
|
|
||||||
destination: attachment-entity.topic # queue name
|
|
||||||
group: attachment
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
spring:
|
|
||||||
application:
|
|
||||||
name: portal-service
|
|
||||||
|
|
||||||
datasource:
|
|
||||||
url: jdbc:h2:mem:testdb;MODE=MYSQL;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false
|
|
||||||
username: sa
|
|
||||||
password:
|
|
||||||
driver-class-name: org.h2.Driver
|
|
||||||
jpa:
|
|
||||||
hibernate:
|
|
||||||
generate-ddl: true
|
|
||||||
ddl-auto: create-drop
|
|
||||||
properties:
|
|
||||||
hibernate:
|
|
||||||
format_sql: true
|
|
||||||
default_batch_fetch_size: 1000 # 1:N 관계를 해결하기 위해 필요
|
|
||||||
show-sql: true
|
|
||||||
h2:
|
|
||||||
console:
|
|
||||||
enabled: true
|
|
||||||
path: /h2
|
|
||||||
|
|
||||||
logging.level:
|
|
||||||
org.hibernate.SQL: debug
|
|
||||||
|
|
||||||
file:
|
|
||||||
directory: ${user.home}/msa-attach-volume
|
|
||||||
messages:
|
|
||||||
directory: ${file.directory}/messages
|
|
||||||
|
|
||||||
# jwt token
|
|
||||||
token:
|
|
||||||
secret: egovframe_user_token
|
|
||||||
|
|
||||||
# ftp server
|
|
||||||
ftp:
|
|
||||||
enabled: false # ftp 사용 여부, FTP 서버에 최상위 디렉토리 자동 생성 및 구현체를 결정하게 된다.
|
|
||||||
|
|
||||||
# eureka 가 포함되면 eureka server 도 등록되므로 해제한다.
|
|
||||||
eureka:
|
|
||||||
client:
|
|
||||||
register-with-eureka: false
|
|
||||||
fetch-registry: false
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
database:
|
|
||||||
url: jdbc:mysql://${mysql.hostname:localhost}:3306/msaportal
|
|
||||||
|
|
||||||
spring:
|
|
||||||
datasource:
|
|
||||||
url: ${database.url}?serverTimezone=Asia/Seoul
|
|
||||||
username: msaportal
|
|
||||||
password: msaportal
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
cloud:
|
|
||||||
bus:
|
|
||||||
destination: springCloudBus
|
|
||||||
stream:
|
|
||||||
function:
|
|
||||||
definition: attachmentEntity;busConsumer # 첨부파일 entity 정보 업데이트 하기 위한 이벤트에 대한 consumer function & springcloudbus consumer function
|
|
||||||
bindings:
|
|
||||||
busConsumer-in-0:
|
|
||||||
destination: ${spring.cloud.bus.destination}
|
|
||||||
attachmentEntity-in-0: # 첨부파일 entity 정보 업데이트 하기 위한 이벤트
|
|
||||||
destination: attachment-entity.topic # queue name
|
|
||||||
group: attachment
|
|
||||||
attachmentEntity-out-0: # 첨부파일 entity 정보 업데이트 하기 위한 이벤트
|
|
||||||
destination: attachment-entity.topic # queue name
|
|
||||||
group: attachment
|
|
||||||
|
|
||||||
# ftp server
|
|
||||||
ftp:
|
|
||||||
hostname: 'ftp_server_hostname'
|
|
||||||
username: 'ftp_server_username'
|
|
||||||
password: 'ftp_server_password'
|
|
||||||
port: 21
|
|
||||||
directory: /mnt
|
|
||||||
enabled: false # ftp 사용 여부, FTP 서버에 최상위 디렉토리 자동 생성 및 구현체를 결정하게 된다.
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
spring:
|
|
||||||
application:
|
|
||||||
name: reserve-check-service
|
|
||||||
|
|
||||||
datasource:
|
|
||||||
url: jdbc:h2:mem:testdb;MODE=MYSQL;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false
|
|
||||||
username: sa
|
|
||||||
password:
|
|
||||||
driver-class-name: org.h2.Driver
|
|
||||||
jpa:
|
|
||||||
# database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
|
|
||||||
hibernate:
|
|
||||||
generate-ddl: true
|
|
||||||
ddl-auto: create-drop
|
|
||||||
# dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
|
||||||
properties:
|
|
||||||
hibernate:
|
|
||||||
format_sql: true
|
|
||||||
default_batch_fetch_size: 1000 # 1:N 관계를 해결하기 위해 필요
|
|
||||||
show-sql: true
|
|
||||||
h2:
|
|
||||||
console:
|
|
||||||
enabled: true
|
|
||||||
path: /h2
|
|
||||||
|
|
||||||
logging.level:
|
|
||||||
org.hibernate.SQL: debug
|
|
||||||
|
|
||||||
file:
|
|
||||||
directory: ${user.home}/msa-attach-volume
|
|
||||||
messages:
|
|
||||||
directory: ${file.directory}/messages
|
|
||||||
|
|
||||||
# jwt token
|
|
||||||
token:
|
|
||||||
secret: egovframe_user_token
|
|
||||||
|
|
||||||
# ftp server
|
|
||||||
ftp:
|
|
||||||
enabled: false # ftp 사용 여부, FTP 서버에 최상위 디렉토리 자동 생성 및 구현체를 결정하게 된다.
|
|
||||||
|
|
||||||
# eureka 가 포함되면 eureka server 도 등록되므로 해제한다.
|
|
||||||
eureka:
|
|
||||||
client:
|
|
||||||
register-with-eureka: false
|
|
||||||
fetch-registry: false
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
spring:
|
|
||||||
r2dbc:
|
|
||||||
url: r2dbc:mysql://${mysql.hostname:localhost}:3306/reservation?serverTimezone=Asia/Seoul
|
|
||||||
username: msaportal
|
|
||||||
password: msaportal
|
|
||||||
cloud:
|
|
||||||
stream:
|
|
||||||
bindings:
|
|
||||||
attachmentEntity-out-0: # 첨부파일 entity 정보 업데이트 하기 위한 이벤트
|
|
||||||
destination: attachment-entity.topic # queue name
|
|
||||||
group: attachment
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
spring:
|
|
||||||
application:
|
|
||||||
name: reserve-item-service
|
|
||||||
|
|
||||||
datasource:
|
|
||||||
url: jdbc:h2:mem:testdb;MODE=MYSQL;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false
|
|
||||||
username: sa
|
|
||||||
password:
|
|
||||||
driver-class-name: org.h2.Driver
|
|
||||||
jpa:
|
|
||||||
# database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
|
|
||||||
hibernate:
|
|
||||||
generate-ddl: true
|
|
||||||
ddl-auto: create-drop
|
|
||||||
# dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
|
||||||
properties:
|
|
||||||
hibernate:
|
|
||||||
format_sql: true
|
|
||||||
default_batch_fetch_size: 1000 # 1:N 관계를 해결하기 위해 필요
|
|
||||||
show-sql: true
|
|
||||||
h2:
|
|
||||||
console:
|
|
||||||
enabled: true
|
|
||||||
path: /h2
|
|
||||||
|
|
||||||
logging.level:
|
|
||||||
org.hibernate.SQL: debug
|
|
||||||
|
|
||||||
file:
|
|
||||||
directory: ${user.home}/msa-attach-volume
|
|
||||||
messages:
|
|
||||||
directory: ${file.directory}/messages
|
|
||||||
|
|
||||||
# jwt token
|
|
||||||
token:
|
|
||||||
secret: egovframe_user_token
|
|
||||||
|
|
||||||
# ftp server
|
|
||||||
ftp:
|
|
||||||
enabled: false # ftp 사용 여부, FTP 서버에 최상위 디렉토리 자동 생성 및 구현체를 결정하게 된다.
|
|
||||||
|
|
||||||
# eureka 가 포함되면 eureka server 도 등록되므로 해제한다.
|
|
||||||
eureka:
|
|
||||||
client:
|
|
||||||
register-with-eureka: false
|
|
||||||
fetch-registry: false
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
spring:
|
|
||||||
r2dbc:
|
|
||||||
url: r2dbc:mysql://${mysql.hostname:localhost}:3306/msaportal?serverTimezone=Asia/Seoul
|
|
||||||
username: msaportal
|
|
||||||
password: msaportal
|
|
||||||
cloud:
|
|
||||||
bus:
|
|
||||||
destination: springCloudBus
|
|
||||||
stream:
|
|
||||||
function:
|
|
||||||
definition: reserveRequest;busConsumer # 예약 요청후 물품 재고업데이트 이벤트에 대한 consumer function & springcloudbus consumer function
|
|
||||||
bindings:
|
|
||||||
busConsumer-in-0:
|
|
||||||
destination: ${spring.cloud.bus.destination}
|
|
||||||
reserveRequest-in-0: # 예약 요청후 물품 재고업데이트 이벤트에 대한 consumer binding
|
|
||||||
destination: reserve-request.topic # queue name
|
|
||||||
group: reserved
|
|
||||||
inventoryUpdated-out-0: # 예약 요청후 물품 재고업데이트 결과에 이벤트에 대한 supplier binding
|
|
||||||
destination: inventory-updated.topic # queue name
|
|
||||||
group: reserved
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
spring:
|
|
||||||
application:
|
|
||||||
name: reserve-request-service
|
|
||||||
|
|
||||||
datasource:
|
|
||||||
url: jdbc:h2:mem:testdb;MODE=MYSQL;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false
|
|
||||||
username: sa
|
|
||||||
password:
|
|
||||||
driver-class-name: org.h2.Driver
|
|
||||||
jpa:
|
|
||||||
# database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
|
|
||||||
hibernate:
|
|
||||||
generate-ddl: true
|
|
||||||
ddl-auto: create-drop
|
|
||||||
# dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
|
||||||
properties:
|
|
||||||
hibernate:
|
|
||||||
format_sql: true
|
|
||||||
default_batch_fetch_size: 1000 # 1:N 관계를 해결하기 위해 필요
|
|
||||||
show-sql: true
|
|
||||||
h2:
|
|
||||||
console:
|
|
||||||
enabled: true
|
|
||||||
path: /h2
|
|
||||||
|
|
||||||
logging.level:
|
|
||||||
org.hibernate.SQL: debug
|
|
||||||
|
|
||||||
file:
|
|
||||||
directory: ${user.home}/msa-attach-volume
|
|
||||||
messages:
|
|
||||||
directory: ${file.directory}/messages
|
|
||||||
|
|
||||||
# jwt token
|
|
||||||
token:
|
|
||||||
secret: egovframe_user_token
|
|
||||||
|
|
||||||
# ftp server
|
|
||||||
ftp:
|
|
||||||
enabled: false # ftp 사용 여부, FTP 서버에 최상위 디렉토리 자동 생성 및 구현체를 결정하게 된다.
|
|
||||||
|
|
||||||
# eureka 가 포함되면 eureka server 도 등록되므로 해제한다.
|
|
||||||
eureka:
|
|
||||||
client:
|
|
||||||
register-with-eureka: false
|
|
||||||
fetch-registry: false
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
spring:
|
|
||||||
r2dbc:
|
|
||||||
url: r2dbc:mysql://${mysql.hostname:localhost}:3306/reservation?serverTimezone=Asia/Seoul
|
|
||||||
username: msaportal
|
|
||||||
password: msaportal
|
|
||||||
cloud:
|
|
||||||
bus:
|
|
||||||
destination: springCloudBus
|
|
||||||
stream:
|
|
||||||
function:
|
|
||||||
definition: inventoryUpdated;busConsumer # 예약 요청후 물품 재고업데이트 결과에 이벤트에 대한 consumer function & springcloudbus consumer function
|
|
||||||
bindings:
|
|
||||||
busConsumer-in-0:
|
|
||||||
destination: ${spring.cloud.bus.destination}
|
|
||||||
reserveRequest-out-0: # 예약 요청후 물품 재고업데이트 이벤트에 대한 supplier binding
|
|
||||||
destination: reserve-request.topic # queue name
|
|
||||||
group: reserved
|
|
||||||
inventoryUpdated-in-0: # 예약 요청후 물품 재고업데이트 결과에 이벤트에 대한 consumer binding
|
|
||||||
destination: inventory-updated.topic # queue name
|
|
||||||
group: reserved
|
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
spring:
|
|
||||||
application:
|
|
||||||
name: user-service
|
|
||||||
|
|
||||||
datasource:
|
|
||||||
url: jdbc:h2:mem:testdb;MODE=MYSQL;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false
|
|
||||||
username: sa
|
|
||||||
password:
|
|
||||||
driver-class-name: org.h2.Driver
|
|
||||||
initialization-mode: always
|
|
||||||
# schema: classpath:h2/schema.sql
|
|
||||||
data: classpath:h2/data.sql
|
|
||||||
jpa:
|
|
||||||
hibernate:
|
|
||||||
generate-ddl: true
|
|
||||||
ddl-auto: create-drop
|
|
||||||
dialect: org.hibernate.dialect.MySQL5Dialect
|
|
||||||
properties:
|
|
||||||
hibernate:
|
|
||||||
format_sql: true
|
|
||||||
default_batch_fetch_size: 1000 # 1:N 관계를 해결하기 위해 필요
|
|
||||||
show-sql: true
|
|
||||||
h2:
|
|
||||||
console:
|
|
||||||
enabled: true
|
|
||||||
path: /h2
|
|
||||||
cache:
|
|
||||||
jcache:
|
|
||||||
config: classpath:ehcache.xml
|
|
||||||
mail: # 비밀번호 변경 이메일 발송
|
|
||||||
host: smtp.gmail.com # smtp host
|
|
||||||
port: 587 # smtp port
|
|
||||||
username: email_username # 계정
|
|
||||||
password: 'email_password' # 비밀번호 - 구글 보안 2단계 인증 해제, 보안 수준이 낮은 앱의 액세스 허용(https://myaccount.google.com/lesssecureapps)
|
|
||||||
properties:
|
|
||||||
mail:
|
|
||||||
smtp:
|
|
||||||
auth: true
|
|
||||||
starttls:
|
|
||||||
enable: true
|
|
||||||
required: true
|
|
||||||
security:
|
|
||||||
# oauth2 를 사용하려면 아래 google, naver, kakao 의 client-id, client-secret 을 발급받아야 한다.
|
|
||||||
oauth2:
|
|
||||||
client:
|
|
||||||
registration:
|
|
||||||
# /oauth2/authorization/google
|
|
||||||
google:
|
|
||||||
client-id: google_client_id # TODO
|
|
||||||
client-secret: google_client_secret # TODO
|
|
||||||
scope: profile,email
|
|
||||||
# 네이버는 Spring Security를 공식 지원하지 않기 때문에 CommonOAuth2Provider 에서 해주는 값들을 수동으로 입력한다.
|
|
||||||
# /oauth2/authorization/naver
|
|
||||||
naver:
|
|
||||||
client-id: naver_client_id # TODO
|
|
||||||
client-secret: naver_client_secret # TODO
|
|
||||||
redirect_uri: "{baseUrl}/{action}/oauth2/code/{registrationId}"
|
|
||||||
authorization_grant_type: authorization_code
|
|
||||||
scope: name,email,profile_image
|
|
||||||
client-name: Naver
|
|
||||||
# /oauth2/authorization/kakao
|
|
||||||
kakao:
|
|
||||||
client-id: kakao_client_id # TODO
|
|
||||||
client-secret: kakao_client_secret # TODO
|
|
||||||
redirect-uri: "{baseUrl}/{action}/oauth2/code/{registrationId}"
|
|
||||||
client-authentication-method: POST
|
|
||||||
authorization-grant-type: authorization_code
|
|
||||||
scope: profile_nickname, account_email
|
|
||||||
client-name: Kakao
|
|
||||||
provider:
|
|
||||||
naver:
|
|
||||||
authorization_uri: https://nid.naver.com/oauth2.0/authorize
|
|
||||||
token_uri: https://nid.naver.com/oauth2.0/token
|
|
||||||
user-info-uri: https://openapi.naver.com/v1/nid/me
|
|
||||||
# 기준이 되는 user_name 의 이름을 네이버에서는 response로 지정해야한다. (네이버 회원 조회시 반환되는 JSON 형태 때문이다)
|
|
||||||
# response를 user_name으로 지정하고 이후 자바 코드로 response의 id를 user_name으로 지정한다. (스프링 시큐리티에서 하위 필드를 명시할 수 없기 때문)
|
|
||||||
user_name_attribute: response
|
|
||||||
kakao:
|
|
||||||
authorization_uri: https://kauth.kakao.com/oauth/authorize
|
|
||||||
token_uri: https://kauth.kakao.com/oauth/token
|
|
||||||
user-info-uri: https://kapi.kakao.com/v2/user/me
|
|
||||||
user_name_attribute: id
|
|
||||||
|
|
||||||
logging.level:
|
|
||||||
org.hibernate.SQL: debug
|
|
||||||
org.hibernate.type: trace
|
|
||||||
|
|
||||||
file:
|
|
||||||
directory: ${user.home}/msa-attach-volume
|
|
||||||
messages:
|
|
||||||
directory: ${file.directory}/messages
|
|
||||||
|
|
||||||
# jwt token
|
|
||||||
token:
|
|
||||||
expiration_time: 7200000
|
|
||||||
refresh_time: 86400000
|
|
||||||
secret: egovframe_token_secret
|
|
||||||
|
|
||||||
# ftp server
|
|
||||||
ftp:
|
|
||||||
enabled: false # ftp 사용 여부, FTP 서버에 최상위 디렉토리 자동 생성 및 구현체를 결정하게 된다.
|
|
||||||
|
|
||||||
# eureka 가 포함되면 eureka server 도 등록되므로 해제한다.
|
|
||||||
eureka:
|
|
||||||
client:
|
|
||||||
register-with-eureka: false
|
|
||||||
fetch-registry: false
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
database:
|
|
||||||
url: jdbc:mysql://${mysql.hostname:localhost}:3306/msaportal
|
|
||||||
|
|
||||||
spring:
|
|
||||||
datasource:
|
|
||||||
url: ${database.url}?serverTimezone=Asia/Seoul
|
|
||||||
username: msaportal
|
|
||||||
password: msaportal
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
mail: # 비밀번호 변경 이메일 발송
|
|
||||||
host: smtp.gmail.com # smtp host
|
|
||||||
port: 587 # smtp port
|
|
||||||
username: email_username # 계정
|
|
||||||
password: 'email_password' # 비밀번호 - 구글 보안 2단계 인증 해제, 보안 수준이 낮은 앱의 액세스 허용(https://myaccount.google.com/lesssecureapps)
|
|
||||||
properties:
|
|
||||||
mail:
|
|
||||||
smtp:
|
|
||||||
auth: true
|
|
||||||
starttls:
|
|
||||||
enable: true
|
|
||||||
required: true
|
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
package org.egovframe.cloud.discovery;
|
package org.egovframe.cloud.discovery;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
import org.springframework.security.web.SecurityFilterChain;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* org.egovframe.cloud.discovery.SecurityConfig
|
* org.egovframe.cloud.discovery.SecurityConfig
|
||||||
@@ -20,10 +21,11 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
|
|||||||
* 수정일 수정자 수정내용
|
* 수정일 수정자 수정내용
|
||||||
* ---------- -------- ---------------------------
|
* ---------- -------- ---------------------------
|
||||||
* 2021/06/30 jaeyeolkim 최초 생성
|
* 2021/06/30 jaeyeolkim 최초 생성
|
||||||
|
* 2024/09/23 이백행 컨트리뷰션 이클립스 문제(Problems) 해결
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
@EnableWebSecurity // Spring Security 설정들을 활성화시켜 준다
|
@EnableWebSecurity // Spring Security 설정들을 활성화시켜 준다
|
||||||
public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
public class SecurityConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 스프링 시큐리티 설정
|
* 스프링 시큐리티 설정
|
||||||
@@ -31,8 +33,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
* @param http
|
* @param http
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@Override
|
@Bean
|
||||||
protected void configure(HttpSecurity http) throws Exception {
|
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
|
||||||
http
|
http
|
||||||
.csrf().disable()
|
.csrf().disable()
|
||||||
.headers().frameOptions().disable()
|
.headers().frameOptions().disable()
|
||||||
@@ -42,6 +44,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
.and()
|
.and()
|
||||||
.httpBasic();
|
.httpBasic();
|
||||||
|
return http.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: reserve-check-service
|
name: reserve-check-service
|
||||||
|
|
||||||
server:
|
server:
|
||||||
port: 0
|
port: 0
|
||||||
|
|
||||||
# config server actuator
|
# config server actuator
|
||||||
management:
|
management:
|
||||||
endpoints:
|
endpoints:
|
||||||
web:
|
web:
|
||||||
exposure:
|
exposure:
|
||||||
include: refresh, health, beans, info
|
include: refresh, health, beans, info
|
||||||
|
|
||||||
info:
|
info:
|
||||||
app:
|
app:
|
||||||
name: Reserve Check Service
|
name: Reserve Check Service
|
||||||
description: 예약시스템 기능 중 예약확인, 예약승인/취소 기능을 제공
|
description: 예약시스템 기능 중 예약확인, 예약승인/취소 기능을 제공
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: reserve-item-service
|
name: reserve-item-service
|
||||||
|
|
||||||
server:
|
server:
|
||||||
port: 0
|
port: 0
|
||||||
|
|
||||||
# config server actuator
|
# config server actuator
|
||||||
management:
|
management:
|
||||||
endpoints:
|
endpoints:
|
||||||
web:
|
web:
|
||||||
exposure:
|
exposure:
|
||||||
include: refresh, health, beans, info
|
include: refresh, health, beans, info
|
||||||
|
|
||||||
info:
|
info:
|
||||||
app:
|
app:
|
||||||
name: Reserve Item Service
|
name: Reserve Item Service
|
||||||
description: 예약시스템 기능 중 예약지역, 예약물품 관리 기능을 제공
|
description: 예약시스템 기능 중 예약지역, 예약물품 관리 기능을 제공
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: reserve-request-service
|
name: reserve-request-service
|
||||||
|
|
||||||
server:
|
server:
|
||||||
port: 0
|
port: 0
|
||||||
|
|
||||||
# config server actuator
|
# config server actuator
|
||||||
management:
|
management:
|
||||||
endpoints:
|
endpoints:
|
||||||
web:
|
web:
|
||||||
exposure:
|
exposure:
|
||||||
include: refresh, health, beans, info
|
include: refresh, health, beans, info
|
||||||
|
|
||||||
info:
|
info:
|
||||||
app:
|
app:
|
||||||
name: Reserve Request Service
|
name: Reserve Request Service
|
||||||
description: 예약시스템 기능 중 예약신청 기능을 제공
|
description: 예약시스템 기능 중 예약신청 기능을 제공
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import java.util.Collections;
|
|||||||
* 수정일 수정자 수정내용
|
* 수정일 수정자 수정내용
|
||||||
* ---------- -------- ---------------------------
|
* ---------- -------- ---------------------------
|
||||||
* 2021/06/30 jaeyeolkim 최초 생성
|
* 2021/06/30 jaeyeolkim 최초 생성
|
||||||
|
* 2024/09/25 이백행 컨트리뷰션 이클립스 문제(Problems) 해결
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@@ -47,7 +48,8 @@ public class CustomOAuth2UserService implements OAuth2UserService<OAuth2UserRequ
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2AuthenticationException {
|
public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2AuthenticationException {
|
||||||
OAuth2UserService delegate = new DefaultOAuth2UserService();
|
// OAuth2UserService delegate = new DefaultOAuth2UserService();
|
||||||
|
OAuth2UserService<OAuth2UserRequest, OAuth2User> delegate = new DefaultOAuth2UserService();
|
||||||
OAuth2User oAuth2User = delegate.loadUser(userRequest);
|
OAuth2User oAuth2User = delegate.loadUser(userRequest);
|
||||||
|
|
||||||
// 현재 로그인 진행 중인 서비스를 구분하는 코드(구글 or 네이버..)
|
// 현재 로그인 진행 중인 서비스를 구분하는 코드(구글 or 네이버..)
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
public class SessionUser implements Serializable {
|
public class SessionUser implements Serializable {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -6319235143325686744L;
|
||||||
private String userName;
|
private String userName;
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,9 @@ public class AuthorizationService extends AbstractService {
|
|||||||
* @return Page<AuthorizationListResponseDto> 페이지 인가 목록 응답 DTO
|
* @return Page<AuthorizationListResponseDto> 페이지 인가 목록 응답 DTO
|
||||||
*/
|
*/
|
||||||
public Page<AuthorizationListResponseDto> findPage(RequestDto requestDto, Pageable pageable) {
|
public Page<AuthorizationListResponseDto> findPage(RequestDto requestDto, Pageable pageable) {
|
||||||
|
if (log.isDebugEnabled()) {
|
||||||
|
log.debug("requestDto={}", requestDto);
|
||||||
|
}
|
||||||
return authorizationRepository.findPage(requestDto, pageable);
|
return authorizationRepository.findPage(requestDto, pageable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -807,51 +807,51 @@ public class UserService extends AbstractService implements UserDetailsService {
|
|||||||
return user.orElse(null);
|
return user.orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 소셜 사용자 엔티티 조회
|
// * 소셜 사용자 엔티티 조회
|
||||||
* 등록되어 있지 않은 경우 사용자 등록
|
// * 등록되어 있지 않은 경우 사용자 등록
|
||||||
*
|
// *
|
||||||
* @param providerCode 공급자 코드
|
// * @param providerCode 공급자 코드
|
||||||
* @param providerId 공급자 id
|
// * @param providerId 공급자 id
|
||||||
* @param email 이메일
|
// * @param email 이메일
|
||||||
* @param userName 사용자 명
|
// * @param userName 사용자 명
|
||||||
* @return UserLoginRequestDto 사용자 로그인 요청 DTO
|
// * @return UserLoginRequestDto 사용자 로그인 요청 DTO
|
||||||
*/
|
// */
|
||||||
private UserResponseDto getAndSaveSocialUser(String providerCode, String providerId, String email, String userName) {
|
// private UserResponseDto getAndSaveSocialUser(String providerCode, String providerId, String email, String userName) {
|
||||||
User user = findSocialUser(providerCode, providerId);
|
// User user = findSocialUser(providerCode, providerId);
|
||||||
|
//
|
||||||
// 이메일로 조회
|
// // 이메일로 조회
|
||||||
// 공급자에서 동일한 이메일을 사용할 수 있고
|
// // 공급자에서 동일한 이메일을 사용할 수 있고
|
||||||
// 현재 시스템 구조 상 이메일을 사용자 식별키로 사용하고 있어서 이메일로 사용자를 한번 더 검색한다.
|
// // 현재 시스템 구조 상 이메일을 사용자 식별키로 사용하고 있어서 이메일로 사용자를 한번 더 검색한다.
|
||||||
if (user == null) {
|
// if (user == null) {
|
||||||
user = userRepository.findByEmail(email).orElse(null);
|
// user = userRepository.findByEmail(email).orElse(null);
|
||||||
|
//
|
||||||
// 공급자 id로 조회되지 않지만 이메일로 조회되는 경우 공급자 id 등록
|
// // 공급자 id로 조회되지 않지만 이메일로 조회되는 경우 공급자 id 등록
|
||||||
if (user != null) {
|
// if (user != null) {
|
||||||
user.setSocial(providerCode, providerId);
|
// user.setSocial(providerCode, providerId);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (user == null) {
|
// if (user == null) {
|
||||||
// 사용자 등록
|
// // 사용자 등록
|
||||||
final String userId = UUID.randomUUID().toString();
|
// final String userId = UUID.randomUUID().toString();
|
||||||
//final String password = makeRandomPassword(); // 임의 비밀번호 생성 시 복호화 불가능
|
// //final String password = makeRandomPassword(); // 임의 비밀번호 생성 시 복호화 불가능
|
||||||
|
//
|
||||||
user = User.builder()
|
// user = User.builder()
|
||||||
.email(email) // 100byte
|
// .email(email) // 100byte
|
||||||
//.encryptedPassword(passwordEncoder.encode(password)) // 100 byte
|
// //.encryptedPassword(passwordEncoder.encode(password)) // 100 byte
|
||||||
.userName(userName)
|
// .userName(userName)
|
||||||
.userId(userId)
|
// .userId(userId)
|
||||||
.role(Role.USER)
|
// .role(Role.USER)
|
||||||
.userStateCode(UserStateCode.NORMAL.getKey())
|
// .userStateCode(UserStateCode.NORMAL.getKey())
|
||||||
.build();
|
// .build();
|
||||||
user.setSocial(providerCode, providerId);
|
// user.setSocial(providerCode, providerId);
|
||||||
|
//
|
||||||
user = userRepository.save(user);
|
// user = userRepository.save(user);
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return new UserResponseDto(user);
|
// return new UserResponseDto(user);
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package org.egovframe.cloud.userservice.api.role;
|
package org.egovframe.cloud.userservice.api.role;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import org.egovframe.cloud.userservice.api.role.dto.AuthorizationUpdateRequestDto;
|
import org.egovframe.cloud.userservice.api.role.dto.AuthorizationUpdateRequestDto;
|
||||||
import org.egovframe.cloud.userservice.domain.role.Authorization;
|
import org.egovframe.cloud.userservice.domain.role.Authorization;
|
||||||
|
|||||||
@@ -5,14 +5,11 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||||
import org.springframework.context.MessageSource;
|
|
||||||
|
|
||||||
import java.util.Locale;
|
|
||||||
import org.springframework.test.context.ActiveProfiles;
|
import org.springframework.test.context.ActiveProfiles;
|
||||||
import org.springframework.test.context.TestPropertySource;
|
import org.springframework.test.context.TestPropertySource;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
|
|
||||||
|
|
||||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||||
@EnableConfigurationProperties
|
@EnableConfigurationProperties
|
||||||
|
|||||||
@@ -30,6 +30,11 @@ import java.util.List;
|
|||||||
public class RestResponsePage<T> extends PageImpl<T> {
|
public class RestResponsePage<T> extends PageImpl<T> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -5737360124251098346L;
|
||||||
|
|
||||||
|
/**
|
||||||
* Rest 응답 페이지 생성자
|
* Rest 응답 페이지 생성자
|
||||||
*
|
*
|
||||||
* @param content 목록
|
* @param content 목록
|
||||||
|
|||||||
77
k8s/README-en.md
Normal file
77
k8s/README-en.md
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
# Deploy services on Kubernetes
|
||||||
|
|
||||||
|
In Kubernetes, the service consists of two components,
|
||||||
|
|
||||||
|
1. Environments
|
||||||
|
2. Applications
|
||||||
|
|
||||||
|
And you can choose the storage in the application either NFS or Cinder provided by Openstack(used by [Pasta](http://paas-ta.kr))
|
||||||
|
|
||||||
|
# Prerequisites
|
||||||
|
|
||||||
|
## Install kustomize
|
||||||
|
|
||||||
|
If you are using kubectl 1.14 or later, it embeded kustomize. So please ignore this section.
|
||||||
|
I recommend that you install the latest version of [kubectl](https://kubectl.docs.kubernetes.io/installation/kubectl/) for your cluster instead of installing kustomize.
|
||||||
|
Even so, if you want to use kustomize, refer to [official kustomize doc](https://kustomize.io/).
|
||||||
|
|
||||||
|
# Deploy service
|
||||||
|
|
||||||
|
You must follow deployment order.
|
||||||
|
|
||||||
|
## Deploy environments
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ kustomize build k8s/environments | kubectl apply -f -
|
||||||
|
```
|
||||||
|
or if you are using the kubectl only,
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ kubectl apply -k k8s/environments
|
||||||
|
```
|
||||||
|
|
||||||
|
## Deploy applications
|
||||||
|
|
||||||
|
If you want to use NFS as a main storage,
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ kustomize build k8s/stoage/nfs | kubectl apply -f -
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ kubectl apply -k k8s/stoage/nfs
|
||||||
|
```
|
||||||
|
|
||||||
|
In case of using Openstack storage(CINDER) as a main storage,
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ kustomize build k8s/stoage/openstack | kubectl apply -f -
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ kubectl apply -k k8s/stoage/openstack
|
||||||
|
```
|
||||||
|
|
||||||
|
# Shutdown service
|
||||||
|
|
||||||
|
Simply apply deployment in reverse order.
|
||||||
|
|
||||||
|
If you are using nfs,
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ kustomize build k8s/environments | kubectl delete -f -
|
||||||
|
$ kustomize build k8s/stoage/nfs | kubectl delete -f - --wait
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ kubectl delete -k k8s/environments
|
||||||
|
$ kubectl delete -k k8s/stoage/nfs --wait
|
||||||
|
```
|
||||||
|
|
||||||
|
The case of openstack is similar, so it is omitted.
|
||||||
@@ -1,77 +1,77 @@
|
|||||||
# Deploy services on Kubernetes
|
# Kubernetes에서 서비스 배포
|
||||||
|
|
||||||
In Kubernetes, the service consists of two components,
|
Kubernetes에서 서비스는 두 가지 구성 요소로 이루어져 있습니다.
|
||||||
|
|
||||||
1. Environments
|
1. 환경 (Environments)
|
||||||
2. Applications
|
2. 애플리케이션 (Applications)
|
||||||
|
|
||||||
And you can choose the storage in the application either NFS or Cinder provided by Openstack(used by [Pasta](http://paas-ta.kr))
|
그리고 애플리케이션에서 사용할 스토리지를 선택할 수 있으며, NFS 또는 Openstack이 제공하는 Cinder를 사용할 수 있습니다(이 경우 [PaaS-TA](http://paas-ta.kr)를 사용).
|
||||||
|
|
||||||
# Prerequisites
|
# 사전 준비 {#prerequisites}
|
||||||
|
|
||||||
## Install kustomize
|
## kustomize 설치 {#install-kustomize}
|
||||||
|
|
||||||
If you are using kubectl 1.14 or later, it embeded kustomize. So please ignore this section.
|
kubectl 1.14 이상을 사용하고 있다면, kustomize가 내장되어 있으므로 이 섹션을 무시해도 됩니다.
|
||||||
I recommend that you install the latest version of [kubectl](https://kubectl.docs.kubernetes.io/installation/kubectl/) for your cluster instead of installing kustomize.
|
대신 클러스터에서 최신 버전의 [kubectl](https://kubectl.docs.kubernetes.io/installation/kubectl/)을 설치하는 것을 권장합니다.
|
||||||
Even so, if you want to use kustomize, refer to [official kustomize doc](https://kustomize.io/).
|
그럼에도 불구하고 kustomize를 사용하고 싶다면, [공식 kustomize 문서](https://kustomize.io/)를 참고하세요.
|
||||||
|
|
||||||
# Deploy service
|
# 서비스 배포 {#deploy-service}
|
||||||
|
|
||||||
You must follow deployment order.
|
배포 순서를 따라야 합니다.
|
||||||
|
|
||||||
## Deployenvironments
|
## 환경 배포 {#deploy-environments}
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ kustomize build k8s/environments | kubectl apply -f -
|
$ kustomize build k8s/environments | kubectl apply -f -
|
||||||
```
|
```
|
||||||
or if you are using the kubectl only,
|
혹은 kubectl만 사용하는 경우,
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ kubectl apply -k k8s/environments
|
$ kubectl apply -k k8s/environments
|
||||||
```
|
```
|
||||||
|
|
||||||
## Deploy applications
|
## 애플리케이션 배포 {#deploy-applications}
|
||||||
|
|
||||||
If you want to use NFS as a main storage,
|
NFS를 메인 스토리지로 사용하려면,
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ kustomize build k8s/stoage/nfs | kubectl apply -f -
|
$ kustomize build k8s/stoage/nfs | kubectl apply -f -
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
혹은
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ kubectl apply -k k8s/stoage/nfs
|
$ kubectl apply -k k8s/stoage/nfs
|
||||||
```
|
```
|
||||||
|
|
||||||
In case of using Openstack storage(CINDER) as a main storage,
|
Openstack의 스토리지(CINDER)를 메인 스토리지로 사용하는 경우,
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ kustomize build k8s/stoage/openstack | kubectl apply -f -
|
$ kustomize build k8s/stoage/openstack | kubectl apply -f -
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
혹은
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ kubectl apply -k k8s/stoage/openstack
|
$ kubectl apply -k k8s/stoage/openstack
|
||||||
```
|
```
|
||||||
|
|
||||||
# Shutdown service
|
## 서비스 종료 {#shutdown-service}
|
||||||
|
|
||||||
Simply apply deployment in reverse order.
|
단순히 배포 순서를 반대로 적용하면 됩니다.
|
||||||
|
|
||||||
If you are using nfs,
|
NFS를 사용하는 경우,
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ kustomize build k8s/environments | kubectl delete -f -
|
$ kustomize build k8s/environments | kubectl delete -f -
|
||||||
$ kustomize build k8s/stoage/nfs | kubectl delete -f - --wait
|
$ kustomize build k8s/stoage/nfs | kubectl delete -f - --wait
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
혹은
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ kubectl delete -k k8s/environments
|
$ kubectl delete -k k8s/environments
|
||||||
$ kubectl delete -k k8s/stoage/nfs --wait
|
$ kubectl delete -k k8s/stoage/nfs --wait
|
||||||
```
|
```
|
||||||
|
|
||||||
The case of openstack is similar, so it is omitted.
|
Openstack의 경우도 비슷하므로 생략합니다.
|
||||||
|
|||||||
19
k8s/environments/databases/mysql/pv.yaml
Normal file
19
k8s/environments/databases/mysql/pv.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: mysql-pv
|
||||||
|
labels:
|
||||||
|
env: production
|
||||||
|
tier: database
|
||||||
|
app: mysql
|
||||||
|
name: mysql-pv
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 5Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
storageClassName: nfs
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
nfs:
|
||||||
|
path: /srv/nfs
|
||||||
|
server: 192.168.56.21
|
||||||
@@ -32,7 +32,7 @@ spec:
|
|||||||
- "-c"
|
- "-c"
|
||||||
- |
|
- |
|
||||||
set -ex
|
set -ex
|
||||||
[[ `hostname` =~ -([0-9]+)$ ]] || exit 1
|
[[ $HOSTNAME =~ -([0-9]+)$ ]] || exit 1
|
||||||
ordinal=${BASH_REMATCH[1]}
|
ordinal=${BASH_REMATCH[1]}
|
||||||
echo [mysqld] > /mnt/conf.d/server-id.cnf
|
echo [mysqld] > /mnt/conf.d/server-id.cnf
|
||||||
echo server-id=$((100 + $ordinal)) >> /mnt/conf.d/server-id.cnf
|
echo server-id=$((100 + $ordinal)) >> /mnt/conf.d/server-id.cnf
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
apiVersion: networking.k8s.io/v1beta1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: jenkins-ingress
|
|
||||||
labels:
|
|
||||||
env: production
|
|
||||||
tier: cicd
|
|
||||||
app: jenkins
|
|
||||||
name: jenkins-ingress
|
|
||||||
spec:
|
|
||||||
rules:
|
|
||||||
- host: <젠킨스 도메인> # TODO
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
backend:
|
|
||||||
serviceName: jenkins
|
|
||||||
servicePort: 8080
|
|
||||||
20
k8s/environments/jenkins/ingress/ingress.yaml
Normal file
20
k8s/environments/jenkins/ingress/ingress.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: jenkins-ingress
|
||||||
|
labels:
|
||||||
|
env: production
|
||||||
|
tier: cicd
|
||||||
|
app: jenkins
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: <Jenkins 도메인> # TODO
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: jenkins
|
||||||
|
port:
|
||||||
|
number: 8080
|
||||||
4
k8s/environments/jenkins/namespace.yaml
Normal file
4
k8s/environments/jenkins/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: jenkins
|
||||||
19
k8s/environments/jenkins/pv.yaml
Normal file
19
k8s/environments/jenkins/pv.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: jenkins-pv
|
||||||
|
labels:
|
||||||
|
env: production
|
||||||
|
tier: cicd
|
||||||
|
app: jenkins
|
||||||
|
name: jenkins-pv
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 5Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
storageClassName: nfs
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
nfs:
|
||||||
|
path: /srv/nfs
|
||||||
|
server: 192.168.56.21
|
||||||
15
k8s/environments/jenkins/role.yaml
Normal file
15
k8s/environments/jenkins/role.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
namespace: jenkins
|
||||||
|
name: jenkins-role
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["networking.k8s.io"]
|
||||||
|
resources: ["ingresses"]
|
||||||
|
verbs: ["get", "create", "update", "delete"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["services"]
|
||||||
|
verbs: ["get", "create", "update", "delete"]
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["deployments"]
|
||||||
|
verbs: ["get", "create", "update", "delete", "patch"]
|
||||||
13
k8s/environments/jenkins/rolebinding.yaml
Normal file
13
k8s/environments/jenkins/rolebinding.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
namespace: jenkins
|
||||||
|
name: jenkins-rolebinding
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: jenkins
|
||||||
|
namespace: default
|
||||||
|
roleRef:
|
||||||
|
kind: Role
|
||||||
|
name: jenkins-role
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: networking.k8s.io/v1beta1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: kibana-ingress
|
name: kibana-ingress
|
||||||
@@ -6,13 +6,15 @@ metadata:
|
|||||||
env: production
|
env: production
|
||||||
tier: logging
|
tier: logging
|
||||||
app: kibana
|
app: kibana
|
||||||
name: kibana-ingress
|
|
||||||
spec:
|
spec:
|
||||||
rules:
|
rules:
|
||||||
- host: <ELK Kibana 도메인> # TODO
|
- host: <ELK Kibana 도메인> # TODO
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
serviceName: kibana
|
service:
|
||||||
servicePort: 5601
|
name: kibana
|
||||||
|
port:
|
||||||
|
number: 5601
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: networking.k8s.io/v1beta1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: rabbitmq-ingress
|
name: rabbitmq-ingress
|
||||||
@@ -6,13 +6,15 @@ metadata:
|
|||||||
env: production
|
env: production
|
||||||
tier: backend
|
tier: backend
|
||||||
app: rabbitmq
|
app: rabbitmq
|
||||||
name: rabbitmq-ingress
|
|
||||||
spec:
|
spec:
|
||||||
rules:
|
rules:
|
||||||
- host: <RabbitMQ 도메인> # TODO
|
- host: <RabbitMQ 도메인> # TODO
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
serviceName: rabbitmq
|
service:
|
||||||
servicePort: 15672
|
name: rabbitmq
|
||||||
|
port:
|
||||||
|
number: 15672
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: backend-pvc
|
|
||||||
labels:
|
|
||||||
env: production
|
|
||||||
tier: backend
|
|
||||||
app: pvc
|
|
||||||
name: backend-pvc
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 5Gi
|
|
||||||
storageClassName: cinder
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: backend-pvc
|
|
||||||
labels:
|
|
||||||
env: production
|
|
||||||
tier: backend
|
|
||||||
app: pvc
|
|
||||||
name: backend-pvc
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteMany
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 5Gi
|
|
||||||
storageClassName: nfs
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: zipkin-ingress
|
name: zipkin-ingress
|
||||||
@@ -6,13 +6,16 @@ metadata:
|
|||||||
env: production
|
env: production
|
||||||
tier: backend
|
tier: backend
|
||||||
app: zipkin
|
app: zipkin
|
||||||
name: zipkin-ingress
|
|
||||||
spec:
|
spec:
|
||||||
rules:
|
rules:
|
||||||
- host: <Zipkin 도메인> # TODO
|
- host: <Zipkin 도메인> # TODO
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
serviceName: zipkin
|
service:
|
||||||
servicePort: 9411
|
name: zipkin
|
||||||
|
port:
|
||||||
|
number: 9411
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user