diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b08bd0d1..b3ba3778 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -9,7 +9,6 @@ apps/snutt-prod/snutt-ev-web/ @wafflestudio/snutt-frontend apps/truffle-prod/ @davin111 @PFCJeong apps/sso-dev/ @wafflestudio/sso apps/sso-prod/ @wafflestudio/sso -apps/guam/ @wafflestudio/guam apps/seminar/ @wafflestudio/seminar apps/webgam-dev/ @wafflestudio/interactive-web apps/feelin-dev/ @wafflestudio/music-sns @@ -20,3 +19,4 @@ apps/waffledotcom-dev/waffledotcom-server @wafflestudio/waffledotcom-backend apps/waffledotcom-prod/waffledotcom-server @wafflestudio/waffledotcom-backend apps/pupuri-prod/ @woohm402 apps/ggzz-dev/ @wafflestudio/ggzz +apps/k8s-monitoring/ @PFCJeong diff --git a/apps/guam/argo-project.yaml b/apps/guam/argo-project.yaml deleted file mode 100644 index 07a0a22f..00000000 --- a/apps/guam/argo-project.yaml +++ /dev/null @@ -1,38 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: AppProject -metadata: - name: guam - namespace: argocd -spec: - description: Guam Project - sourceRepos: - - '*' - destinations: - - namespace: guam - server: https://kubernetes.default.svc - clusterResourceWhitelist: - - group: '' - kind: Namespace - namespaceResourceBlacklist: - - group: '' - kind: ResourceQuota - - group: '' - kind: LimitRange - - group: '' - kind: NetworkPolicy - - group: '' - kind: Service - orphanedResources: - warn: false - roles: - - name: admin - description: Admin for Team Guam - policies: - - p, proj:guam:admin, applications, *, guam/*, allow - - p, proj:guam:admin, clusters, get, *, allow - - p, proj:guam:admin, repositories, get, *, allow - - p, proj:guam:admin, repositories, create, *, allow - - p, proj:guam:admin, repositories, update, *, allow - - p, proj:guam:admin, repositories, delete, *, allow - groups: - - wafflestudio:Guam diff --git a/apps/guam/service.yaml b/apps/guam/service.yaml deleted file mode 100644 index fb4ad65b..00000000 --- a/apps/guam/service.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: user-api - namespace: guam -spec: - ports: - - name: http - port: 80 - targetPort: 8080 - selector: - app: user-api ---- -apiVersion: v1 -kind: Service -metadata: - name: favorite-api - namespace: guam -spec: - ports: - - name: http - port: 80 - targetPort: 8080 - selector: - app: favorite-api ---- -apiVersion: v1 -kind: Service -metadata: - name: community-api - namespace: guam -spec: - ports: - - name: http - port: 80 - targetPort: 8080 - selector: - app: community-api ---- - diff --git a/apps/k8s-monitoring/argo-application.yaml b/apps/k8s-monitoring/argo-application.yaml new file mode 100644 index 00000000..d183c122 --- /dev/null +++ b/apps/k8s-monitoring/argo-application.yaml @@ -0,0 +1,14 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: k8s-monitoring + namespace: argocd +spec: + project: default + source: + repoURL: https://github.com/wafflestudio/waffle-world.git + targetRevision: HEAD + path: apps/k8s-monitoring/k8s-monitoring-app + destination: + server: https://kubernetes.default.svc + namespace: k8s-monitoring diff --git a/apps/k8s-monitoring/k8s-monitoring-app/app.yaml b/apps/k8s-monitoring/k8s-monitoring-app/app.yaml new file mode 100644 index 00000000..247d8210 --- /dev/null +++ b/apps/k8s-monitoring/k8s-monitoring-app/app.yaml @@ -0,0 +1,83 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: app + labels: + app: app + namespace: k8s-monitoring +spec: + replicas: 1 + selector: + matchLabels: + app: app + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + revisionHistoryLimit: 4 + template: + metadata: + labels: + app: app + spec: + serviceAccountName: k8s-monitoring-sa + containers: + - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/k8s-monitoring:0.0.1 + imagePullPolicy: Always + name: app + envFrom: + - secretRef: + name: k8s-monitoring-secret + resources: + requests: + cpu: 100m + memory: 250Mi + limits: + cpu: 500m + memory: 250Mi +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: k8s-monitoring-sa + namespace: k8s-monitoring +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: k8s-monitoring-cluster-role +rules: + - apiGroups: + - "batch" + resources: + - jobs + - cronjobs + verbs: + - "*" + - apiGroups: + - "" + resources: + - nodes + verbs: + - "*" + - apiGroups: + - "" + resources: + - pods + - pods/log + verbs: + - "*" +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: k8s-monitoring-cluster-role-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: k8s-monitoring-cluster-role +subjects: + - kind: ServiceAccount + name: k8s-monitoring-sa + namespace: k8s-monitoring diff --git a/apps/k8s-monitoring/k8s-monitoring-app/secret.yaml b/apps/k8s-monitoring/k8s-monitoring-app/secret.yaml new file mode 100644 index 00000000..c8cf3465 --- /dev/null +++ b/apps/k8s-monitoring/k8s-monitoring-app/secret.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: k8s-monitoring-secret + namespace: k8s-monitoring +stringData: +# SLACK_TOKEN: diff --git a/apps/truffle-prod/truffle-consumer/secret.yaml b/apps/truffle-prod/truffle-consumer/secret.yaml index 862c3ba8..ec5ca09a 100644 --- a/apps/truffle-prod/truffle-consumer/secret.yaml +++ b/apps/truffle-prod/truffle-consumer/secret.yaml @@ -4,6 +4,7 @@ metadata: name: truffle-secret namespace: truffle-prod stringData: +# SECURITY_KEY: # SPRING_R2DBC_URL: # SPRING_R2DBC_USERNAME: # SPRING_R2DBC_PASSWORD: