Skip to content

Commit

Permalink
deprecated된 kubectl 명령어 변경, slack slack notification 메시지 표시되도록, 환경 변수…
Browse files Browse the repository at this point in the history
… 조회 API 제거 (#29)

* add: cicd 개선

* add: 프로그램 버전 업

* up: 프로그램 버전 명

* del: 환경 변수 조회하는 컨트롤러 제거
  • Loading branch information
parkgang committed Dec 13, 2021
1 parent 508ccf4 commit e4d8d7f
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 86 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/aks-prod-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -64,3 +64,4 @@ jobs:
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: ${{ github.repository }}가 ${{ env.NAMESPACE }} 환경에 배포되었습니다 🚀
3 changes: 2 additions & 1 deletion .github/workflows/aks-qa-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -61,3 +61,4 @@ jobs:
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: ${{ github.repository }}가 ${{ env.NAMESPACE }} 환경에 배포되었습니다 🚀
3 changes: 2 additions & 1 deletion .github/workflows/aks-test-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -63,3 +63,4 @@ jobs:
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: ${{ github.repository }}가 ${{ env.NAMESPACE }} 환경에 배포되었습니다 🚀
26 changes: 0 additions & 26 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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의 헬스를 체크합니다.",
Expand Down
26 changes: 0 additions & 26 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -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의 헬스를 체크합니다.",
Expand Down
17 changes: 0 additions & 17 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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의 헬스를 체크합니다.
Expand Down
12 changes: 0 additions & 12 deletions internal/app/handlers/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package handlers

import (
"net/http"
"os"

"github.com/gin-gonic/gin"

Expand Down Expand Up @@ -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)
}
3 changes: 2 additions & 1 deletion internal/app/routers/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package project

const (
AppName string = "oauth-server"
AppVersion string = "0.5.0"
AppVersion string = "1.0.0"
)

0 comments on commit e4d8d7f

Please sign in to comment.