From e4d8d7f8f569707bd94a536a4393d98edcbebb6e Mon Sep 17 00:00:00 2001 From: Kyungeun Park <63892989+parkgang@users.noreply.github.com> Date: Mon, 13 Dec 2021 21:56:43 +0900 Subject: [PATCH] =?UTF-8?q?deprecated=EB=90=9C=20kubectl=20=EB=AA=85?= =?UTF-8?q?=EB=A0=B9=EC=96=B4=20=EB=B3=80=EA=B2=BD,=20slack=20slack=20noti?= =?UTF-8?q?fication=20=EB=A9=94=EC=8B=9C=EC=A7=80=20=ED=91=9C=EC=8B=9C?= =?UTF-8?q?=EB=90=98=EB=8F=84=EB=A1=9D,=20=ED=99=98=EA=B2=BD=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=20=EC=A1=B0=ED=9A=8C=20API=20=EC=A0=9C=EA=B1=B0=20(#2?= =?UTF-8?q?9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add: cicd 개선 * add: 프로그램 버전 업 * up: 프로그램 버전 명 * del: 환경 변수 조회하는 컨트롤러 제거 --- .github/workflows/aks-prod-deploy.yaml | 3 ++- .github/workflows/aks-qa-deploy.yaml | 3 ++- .github/workflows/aks-test-deploy.yaml | 3 ++- docs/docs.go | 26 -------------------------- docs/swagger.json | 26 -------------------------- docs/swagger.yaml | 17 ----------------- internal/app/handlers/api.go | 12 ------------ internal/app/routers/router.go | 3 ++- internal/pkg/project/project.go | 2 +- 9 files changed, 9 insertions(+), 86 deletions(-) diff --git a/.github/workflows/aks-prod-deploy.yaml b/.github/workflows/aks-prod-deploy.yaml index 0c34bee..a52615e 100644 --- a/.github/workflows/aks-prod-deploy.yaml +++ b/.github/workflows/aks-prod-deploy.yaml @@ -42,7 +42,7 @@ jobs: - name: create namespace run: | - kubectl create namespace ${{ env.NAMESPACE }} --dry-run -o json | kubectl apply -f - + kubectl create namespace ${{ env.NAMESPACE }} --dry-run=client -o json | kubectl apply -f - - name: aks apply object uses: Azure/k8s-deploy@v1.4 @@ -64,3 +64,4 @@ jobs: uses: rtCamp/action-slack-notify@v2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_MESSAGE: ${{ github.repository }}가 ${{ env.NAMESPACE }} 환경에 배포되었습니다 🚀 diff --git a/.github/workflows/aks-qa-deploy.yaml b/.github/workflows/aks-qa-deploy.yaml index 6e2b856..47f68e6 100644 --- a/.github/workflows/aks-qa-deploy.yaml +++ b/.github/workflows/aks-qa-deploy.yaml @@ -39,7 +39,7 @@ jobs: - name: create namespace run: | - kubectl create namespace ${{ env.NAMESPACE }} --dry-run -o json | kubectl apply -f - + kubectl create namespace ${{ env.NAMESPACE }} --dry-run=client -o json | kubectl apply -f - - name: aks apply object uses: Azure/k8s-deploy@v1.4 @@ -61,3 +61,4 @@ jobs: uses: rtCamp/action-slack-notify@v2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_MESSAGE: ${{ github.repository }}가 ${{ env.NAMESPACE }} 환경에 배포되었습니다 🚀 \ No newline at end of file diff --git a/.github/workflows/aks-test-deploy.yaml b/.github/workflows/aks-test-deploy.yaml index a64b05b..144f057 100644 --- a/.github/workflows/aks-test-deploy.yaml +++ b/.github/workflows/aks-test-deploy.yaml @@ -41,7 +41,7 @@ jobs: - name: create namespace run: | - kubectl create namespace ${{ env.NAMESPACE }} --dry-run -o json | kubectl apply -f - + kubectl create namespace ${{ env.NAMESPACE }} --dry-run=client -o json | kubectl apply -f - - name: aks apply object uses: Azure/k8s-deploy@v1.4 @@ -63,3 +63,4 @@ jobs: uses: rtCamp/action-slack-notify@v2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_MESSAGE: ${{ github.repository }}가 ${{ env.NAMESPACE }} 환경에 배포되었습니다 🚀 \ No newline at end of file diff --git a/docs/docs.go b/docs/docs.go index a7211e9..04eacfb 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -64,32 +64,6 @@ var doc = `{ } } }, - "/env": { - "get": { - "description": "앱의 환경변수를 응답합니다.", - "produces": [ - "application/json" - ], - "tags": [ - "App" - ], - "summary": "앱 환경 변수", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - } - }, "/ping": { "get": { "description": "server의 헬스를 체크합니다.", diff --git a/docs/swagger.json b/docs/swagger.json index b6c434e..f402c3d 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -44,32 +44,6 @@ } } }, - "/env": { - "get": { - "description": "앱의 환경변수를 응답합니다.", - "produces": [ - "application/json" - ], - "tags": [ - "App" - ], - "summary": "앱 환경 변수", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - } - }, "/ping": { "get": { "description": "server의 헬스를 체크합니다.", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 6e0b37d..d45bb1b 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -153,23 +153,6 @@ paths: summary: 구성 조회 tags: - App - /env: - get: - description: 앱의 환경변수를 응답합니다. - produces: - - application/json - responses: - "200": - description: OK - schema: - items: - items: - type: string - type: array - type: array - summary: 앱 환경 변수 - tags: - - App /ping: get: description: server의 헬스를 체크합니다. diff --git a/internal/app/handlers/api.go b/internal/app/handlers/api.go index 35f1401..51061f3 100644 --- a/internal/app/handlers/api.go +++ b/internal/app/handlers/api.go @@ -2,7 +2,6 @@ package handlers import ( "net/http" - "os" "github.com/gin-gonic/gin" @@ -37,14 +36,3 @@ func AppVersion(c *gin.Context) { resData := []byte(project.AppVersion) c.Data(http.StatusOK, "text/html; charset=utf-8", resData) } - -// @Summary 앱 환경 변수 -// @Description 앱의 환경변수를 응답합니다. -// @Tags App -// @Produce json -// @Success 200 {array} []string -// @Router /env [get] -func AppEnv(c *gin.Context) { - resData := os.Environ() - c.JSON(http.StatusOK, resData) -} diff --git a/internal/app/routers/router.go b/internal/app/routers/router.go index ca0e0e1..f69cf88 100644 --- a/internal/app/routers/router.go +++ b/internal/app/routers/router.go @@ -10,7 +10,7 @@ func Use(api *gin.RouterGroup) { api.GET("/", handlers.AppName) api.GET("/ping", handlers.Ping) api.GET("/version", handlers.AppVersion) - api.GET("/env", handlers.AppEnv) + users := api.Group("/users") { users.POST("/login", handlers.UserLogin) @@ -27,6 +27,7 @@ func Use(api *gin.RouterGroup) { users.POST("/avatar", middlewares.TokenAuthMiddleware(), handlers.UploadAvatar) users.DELETE("/avatar", middlewares.TokenAuthMiddleware(), handlers.DeleteAvatar) } + configs := api.Group("/configs") { configs.GET("", handlers.GetConfigs) diff --git a/internal/pkg/project/project.go b/internal/pkg/project/project.go index d22fa21..35222a8 100644 --- a/internal/pkg/project/project.go +++ b/internal/pkg/project/project.go @@ -2,5 +2,5 @@ package project const ( AppName string = "oauth-server" - AppVersion string = "0.5.0" + AppVersion string = "1.0.0" )