diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7f562d50..32044044 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -15,10 +15,10 @@ apps/feelin-dev/ @wafflestudio/music-sns apps/feelin-prod/ @wafflestudio/music-sns apps/siksha-dev/ @wafflestudio/siksha apps/siksha-prod/ @wafflestudio/siksha -apps/waffledotcom-dev/waffledotcom-server @wafflestudio/waffledotcom-backend -apps/waffledotcom-prod/waffledotcom-server @wafflestudio/waffledotcom-backend -apps/wacruit-dev @wafflestudio/waffledotcom-backend -apps/wacruit-prod @wafflestudio/waffledotcom-backend +apps/waffledotcom-dev/ @wafflestudio/waffledotcom-backend +apps/waffledotcom-prod/ @wafflestudio/waffledotcom-backend +apps/wacruit-dev/ @wafflestudio/waffledotcom-backend +apps/wacruit-prod/ @wafflestudio/waffledotcom-backend apps/pupuri-prod/ @woohm402 apps/ggzz-dev/ @wafflestudio/ggzz apps/k8s-monitoring/ @PFCJeong diff --git a/apps/sso-dev/kong-gateway/kong-config.yaml b/apps/sso-dev/kong-gateway/kong-config.yaml index 127d6f4a..a92f0696 100644 --- a/apps/sso-dev/kong-gateway/kong-config.yaml +++ b/apps/sso-dev/kong-gateway/kong-config.yaml @@ -14,3 +14,14 @@ services: - /api/account-service/ plugins: - name: waffle-jwt-authorizer + +- name: wacruit-service + url: http://wacruit-server.wacruit-dev.svc.cluster.local + routes: + - name: wacruit-service + hosts: + - wacruit-api-dev.wafflestudio.com + paths: + - /api/ + plugins: + - name: waffle-jwt-authorizer diff --git a/apps/sso-dev/kong-gateway/kong-gateway.yaml b/apps/sso-dev/kong-gateway/kong-gateway.yaml index ed4f7e4b..bba0d946 100644 --- a/apps/sso-dev/kong-gateway/kong-gateway.yaml +++ b/apps/sso-dev/kong-gateway/kong-gateway.yaml @@ -103,6 +103,7 @@ spec: hosts: - api-gateway-dev.wafflestudio.com - sso-dev.wafflestudio.com + - wacruit-api-dev.wafflestudio.com http: - route: - destination: diff --git a/apps/sso-prod/kong-gateway/kong-config.yaml b/apps/sso-prod/kong-gateway/kong-config.yaml index f56cd3e8..c382400b 100644 --- a/apps/sso-prod/kong-gateway/kong-config.yaml +++ b/apps/sso-prod/kong-gateway/kong-config.yaml @@ -26,3 +26,25 @@ services: strip_path: false plugins: - name: waffle-jwt-authorizer + +- name: wacruit-service + url: http://wacruit-server.wacruit-prod.svc.cluster.local + routes: + - name: wacruit-web-cf + hosts: + - wacruit.wafflestudio.com + paths: + - /api/ + plugins: + - name: waffle-jwt-authorizer + +- name: wacruit-service-dev + url: http://wacruit-server.wacruit-dev.svc.cluster.local + routes: + - name: wacruit-web-cf + hosts: + - wacruit-dev.wafflestudio.com + paths: + - /api/ + plugins: + - name: waffle-jwt-authorizer diff --git a/apps/sso-prod/kong-gateway/kong-gateway.yaml b/apps/sso-prod/kong-gateway/kong-gateway.yaml index e00bf6e7..fb17ab01 100644 --- a/apps/sso-prod/kong-gateway/kong-gateway.yaml +++ b/apps/sso-prod/kong-gateway/kong-gateway.yaml @@ -104,6 +104,8 @@ spec: - api-gateway.wafflestudio.com - sso.wafflestudio.com - truffle.wafflestudio.com + - wacruit.wafflestudio.com + - wacruit-dev.wafflestudio.com http: - route: - destination: diff --git a/apps/templates/wacruit-server-dev.yaml b/apps/templates/wacruit-server-dev.yaml new file mode 100644 index 00000000..753f3fd8 --- /dev/null +++ b/apps/templates/wacruit-server-dev.yaml @@ -0,0 +1,18 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + namespace: argocd + name: wacruit-server-dev + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: {{ .Values.spec.source.repoURL }} + targetRevision: HEAD + path: apps/wacruit-dev/wacruit-server + destination: + server: {{ .Values.spec.destination.server }} + namespace: argocd + syncPolicy: + {{- .Values.spec.syncPolicy | toYaml | nindent 4 }} diff --git a/apps/templates/wacruit-server.yaml b/apps/templates/wacruit-server.yaml new file mode 100644 index 00000000..171a893e --- /dev/null +++ b/apps/templates/wacruit-server.yaml @@ -0,0 +1,18 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + namespace: argocd + name: wacruit-server + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: {{ .Values.spec.source.repoURL }} + targetRevision: HEAD + path: apps/wacruit-prod/wacruit-server + destination: + server: {{ .Values.spec.destination.server }} + namespace: argocd + syncPolicy: + {{- .Values.spec.syncPolicy | toYaml | nindent 4 }} diff --git a/apps/wacruit-dev/wacruit-server/wacruit-server.yaml b/apps/wacruit-dev/wacruit-server/wacruit-server.yaml new file mode 100644 index 00000000..911421f2 --- /dev/null +++ b/apps/wacruit-dev/wacruit-server/wacruit-server.yaml @@ -0,0 +1,73 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wacruit-server + labels: + app: wacruit-server + namespace: wacruit-dev +spec: + replicas: 1 + selector: + matchLabels: + app: wacruit-server + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + revisionHistoryLimit: 4 + template: + metadata: + labels: + app: wacruit-server + spec: + serviceAccountName: wacruit-server + containers: + - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-server:5 + name: wacruit-server + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 100m + memory: 128Mi + ports: + - containerPort: 8080 +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: wacruit-server + namespace: wacruit-dev + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-dev-role +--- +apiVersion: v1 +kind: Service +metadata: + namespace: wacruit-dev + name: wacruit-server +spec: + type: ClusterIP + selector: + app: wacruit-server + ports: + - port: 80 + targetPort: 8080 +--- +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + namespace: wacruit-dev + name: wacruit-server +spec: + gateways: + - istio-ingress/waffle-ingressgateway + - mesh + hosts: + - wacruit-server.wacruit-dev.svc.cluster.local + http: + - route: + - destination: + host: wacruit-server diff --git a/apps/wacruit-prod/wacruit-server/wacruit-server.yaml b/apps/wacruit-prod/wacruit-server/wacruit-server.yaml new file mode 100644 index 00000000..d43b1d35 --- /dev/null +++ b/apps/wacruit-prod/wacruit-server/wacruit-server.yaml @@ -0,0 +1,73 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wacruit-server + labels: + app: wacruit-server + namespace: wacruit-prod +spec: + replicas: 0 + selector: + matchLabels: + app: wacruit-server + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + revisionHistoryLimit: 4 + template: + metadata: + labels: + app: wacruit-server + spec: + serviceAccountName: wacruit-server + containers: + - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-prod/wacruit-server:3 + name: wacruit-server + resources: + requests: + cpu: 200m + memory: 256Mi + limits: + cpu: 200m + memory: 256Mi + ports: + - containerPort: 8080 +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: wacruit-server + namespace: wacruit-prod + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-prod-role +--- +apiVersion: v1 +kind: Service +metadata: + namespace: wacruit-prod + name: wacruit-server +spec: + type: ClusterIP + selector: + app: wacruit-server + ports: + - port: 80 + targetPort: 8080 +--- +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + namespace: wacruit-prod + name: wacruit-server +spec: + gateways: + - istio-ingress/waffle-ingressgateway + - mesh + hosts: + - wacruit-server.wacruit-prod.svc.cluster.local + http: + - route: + - destination: + host: wacruit-server