본문 바로가기

전체300

[Github Workflow API] id 조회 & 실행 (dispatch) # Github Action Workflow id 조회 curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token $GH_ACCESS_TOKEN" \ https://api.github.com/repos/$OWNER/$REPO/actions/workflows/$WORKFLOW_FILENAME ex) curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token $GH_ACCESS_TOKEN" \ https://api.github.com/repos/suminhong/terraform/actions/workflows/cicd.yaml output json.. 2024. 4. 19.
[external-dns/ingress-nginx] NodePort 타입 external LB를 external dns CNAME으로 등록되게 하기 # 상황 - ingress-nginx 를 LB타입으로 만들어 사용하다가, 일부 필수 옵션이 예상과 다르게 동작한 경우가 발생 > 하필 production이라 장애가 발생 - ingress-nginx chart의 service annotation만으로 중요 production LB들을 관리하기는 무리라고 판단. - stage / prod 인프라의 동일성을 보장하기 위해서라도 ingress-nginx 앞단의 LB를 별도 IaC로 관리하기로 결정. - IaC로 관리하는 별도 LB 를 사용하기 위해서는, ingress-nginx controller 자체는 NodePort로 오픈되어야만 한다. (ClusterIP는 클러스터 내부에서만 찌를 수 있고, LB는 별도 lb를 만들어버리고, ExternalName은..아.. 2024. 4. 18.
[GitLab/helm] Google OAuth 붙여서 띄우기 # 1. Google OAuth 2.0 Client 만들기 승인된 자바스크립트 원본 : GitLab 도메인 승인된 리디렉션 URI : - {gitlab 도메인}/users/auth/google_oauth2/callback - {gitlab 도메인}/-/google_api/auth/callback # 2. Google OAuth Secret 추가 아쉽게도(?) GitLab 공식 helm chart는 시크릿을 value에 박아 넣음으로써 연동되는 그런 허술한 보안을 제공하지 않는다. (내가 못찾은걸수도 있음) 그래서 따로 secret을 만들고, helm chart에선 해당 secret을 참조하도록 해줘야 한다. (참고로 나는 argocd multi source를 통해 같이 배포되도록 설정해 두었다) apiV.. 2024. 4. 15.
[DevOps] powerpipe 써보기 # powerpipe란? https://powerpipe.io/ Powerpipe | Dashboards for DevOps. Visualize cloud configurations. Assess security posture against a massive library of benchmarks. Build custom dashboards with code. powerpipe.io devops를 위한 dashboard 오픈소스라고 한다. aws같은 클라우드 서비스들 또는 쿠버네티스, 테라폼 등에 대한 보안 컴플라이언스/비용 매니징/여러 인사이트 등을 대시보드로 제공한다. 너무 좋아보여서 일단 해봤다. # 그 전에 steampipe부터 https://github.com/turbot/steampipe Gi.. 2024. 4. 14.
[AWS/EC2/Quota] You have requested more vCPU capacity than your current vCPU limit of 64 allows for the instance bucket that the specified instance type belongs to. p4d.24xlarge EC2를 만들 일이 있었는데, 아래와 같은 에러가 났다. Instance launch failed You have requested more vCPU capacity than your current vCPU limit of 64 allows for the instance bucket that the specified instance type belongs to. Please visit http://aws.amazon.com/contact-us/ec2-request to request an adjustment to this limit. Instance launch failed You have requested more vCPU capacity than your current vCPU.. 2024. 4. 11.
[Go/Homebrew] Go로 간단한 Homebrew 패키지 만들기 # 목표 1. Go 써보기 2. Homebrew 패키지 만들어보기 -> 매우 간단한 커맨드라인 툴 만들어서 homebrew에 올려보기 # 결과물 brew tap suminhong/tap brew install gohonglab gohonglab 그냥 내 블로그 주소들 보여주는 커맨드라인 툴이다. # 순서 1. go project 만들기 2. build파일 release에 올리기 3. Homebrew Fomula 작성 4. 테스트 # 해보자! 🚀 1. go project 만들기 참고 - https://github.com/suminhong/gohonglab 적절한 레포지토리를 만들고, 해당 폴더에 진입 후 아래 명령어로 go project 초기화를 시켜준다. (본인이 원하는 이름으로 초기화하면 됨) go m.. 2024. 4. 10.
[k8s/ingress-nginx/aws] Chart: Add a TargetGroupBinding 결론 : 너무 user specific하다고 close 됨. >> 내가 별도로 차트 올려둠 (ingress-nginx-4.10.0 기반, https://artifacthub.io/packages/helm/suminhong/ingress-nginx-external-lb) https://github.com/kubernetes/ingress-nginx/pull/11198 Chart: Add a TargetGroupBinding object to the ingress-nginx helm chart template. by suminhong · Pull Request #11198 · kubernet What this PR does / why we need it: Add a TargetGroupBinding obje.. 2024. 4. 4.
[Django] admin에 keycloak login 붙이기 # 이미 존재하는 것 장고 프로젝트 (with django-admin-interface) 연동할 키클락 # 원하는 것 장고 어드민의 기본 로그인 화면은 아래와 같다. (admin_interface를 사용하는 경우) LOG IN 버튼 밑에 Keycloak용 로그인 버튼을 만들고, 키클락 유저로 로그인 가능하도록 만들겠다. # 시작! 🚀 1) social auth 세팅 social-auth-app-django 설치 pip install social-auth-app-django settings.py에 social_django 추가 # settings.py INSTALLED_APPS = [ ... 'social_django', # 추가 ] migration 수행 python manage.py migrate 여기.. 2024. 3. 30.
[Grafana Mimir] Mimir Helm 설치/셋업 도중 트러블슈팅 # Ref https://wlsdn3004.tistory.com/50 Grafana Mimir란? 개념부터 설치까지 Prometheus는 쿠버네티스 환경에서 많이 사용하는 인기 있는 오픈소스 모니터링 도구이다. 하지만 몇 가지 치명적인 단점이 있다. 확장 및 고가용성 문제 프로메테우스는 단일 서버로 동작하게 구 wlsdn3004.tistory.com Mimir가 뭔지와 컴포넌트에 대한 자세한 설명은 위를 확인하자. 나는 Mimir를 설치하고, Prometheus 연동 중 트슛 과정만 설명한다. # 권한 설정 먼저 일단 mimir의 데이터는 s3에 담을 것이다. iam policy는 아래처럼 구성하면 된다. { "Statement": [ { "Action": [ "s3:ListBucket", "s3:Put.. 2024. 3. 28.
[EKS/Access Configuration] Managed Node Group > Karpenter Migration 시 aws-auth 문제 해결 # 이슈 발생 원래 Managed EC2 Node Group으로 EKS를 구성해 두었다가, Karpenter PoC를 마치고 모두 넘어가려고 준비중이었다. 따라서 Managed Node Group (이하 node group) & Karpenter가 모두 떠 있었고, node group은 노드를 0으로만 유지중이었다. 이제 모든 클러스터가 카펜터로 잘 동작중이기 때문에, node group은 이제 지워야지! 하고 dev 클러스터부터 전부 지움. 그러자 ... 갑자기 카펜터로 뜬 노드들이 전부 죽기 시작했다. # 뭔지 모르겠지만 일단 롤백 아무리 생각해도 node group이랑 카펜터에 연관 관계가 있을 것 같지 않았다. 근데 롤백하니까 (node group 살리니까) 카펜터 노드들도 다시 살아나기 시작했다.. 2024. 3. 28.