Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI/CD 구축 #3

Open
6 of 8 tasks
BaeKY opened this issue Jan 4, 2023 · 2 comments
Open
6 of 8 tasks

CI/CD 구축 #3

BaeKY opened this issue Jan 4, 2023 · 2 comments
Assignees

Comments

@BaeKY
Copy link
Owner

BaeKY commented Jan 4, 2023

Flow

cicd-flow

  1. 개발자가 Source Code commit & push
  2. Jenkins에서 Commit 감지 & Jenkinsfile에 정의된 Pipeline 시작
  3. Docker Image build & publish(-> Harbor)
  4. Github의 IaC Repository의 k8s manifest를 업데이트 한다.(deployment에 있는 image tag version 업데이트)
  5. ArgoCD에서 IaC Repository 업데이트 감지
  6. ArgoCD에서 IaC Repository와 현재 적용된 k8s Sync 맞춤

TODO

  • Add charts
    • ArgoCD
    • Harbor
    • Jenkins
    • Cert Manager - Docker Registry 구성하려면 TLS 인증이 필요할듯
  • Jenkins: Sample로 사용할 Application Repository 생성 & Jenkinsfile 작성
  • ArgoCD: Sample로 사용할 IaC Repository 생성 & ArgoCD 설정
  • Harbor: Docker Registry & Helm Repository 구축
BaeKY added a commit that referenced this issue Jan 4, 2023
@BaeKY
Copy link
Owner Author

BaeKY commented Jan 4, 2023

#2 덕분에 ingress에 host만 설정해도 local에서 잘 접근된다(ArgoCD UI)

image

@BaeKY BaeKY self-assigned this Jan 4, 2023
@BaeKY BaeKY added the enhancement New feature or request label Jan 4, 2023
BaeKY added a commit that referenced this issue Jan 4, 2023
BaeKY added a commit that referenced this issue Jan 4, 2023
BaeKY added a commit that referenced this issue Jan 4, 2023
BaeKY added a commit that referenced this issue Jan 4, 2023
BaeKY added a commit that referenced this issue Jan 4, 2023
@BaeKY BaeKY removed the enhancement New feature or request label Jan 5, 2023
BaeKY added a commit that referenced this issue Jan 6, 2023
BaeKY added a commit that referenced this issue Jan 6, 2023
@BaeKY
Copy link
Owner Author

BaeKY commented Jan 12, 2023

Certificate 생성시 CertificateRequest가 Pending에서 안넘어갈때

Overview

  • 내 MacBook에서 k8s 구동중. k8s에 CoreDNS를 올려 MacBook자체 DNS서버로 이용중
    $ nslookup argocd.lab9.cloud
    Server:		10.0.0.1
    Address:	10.0.0.1#53
    
    Name:	argocd.lab9.cloud
    Address: 10.0.0.1
  • cert-manager는 acme를 통해 ClusterIssuer를 생성해둔 상태
  • Split Horizon DNS 구성: letsencrypt 인증서를 MacBook의 K8S에서 사용함
  • 아래와 같은 설정으로 Certificate을 생성하면 계속 kube-system의 core-dns로 Request(생성된 Challenge가 하는 요청)가 감.
    apiVersion: cert-manager.io/v1
    kind: Certificate
    metadata:
      name: myapp-tls
      namespace: default
    spec:
      dnsNames:
        - myapp.lab9.cloud
      issuerRef:
        kind: ClusterIssuer
        name: acme-issuer
      secretName: myapp-tls

Solution

BaeKY added a commit that referenced this issue Jan 12, 2023
- Certificate생성시 k8s의 기본 coredns로 Chellenge 요청가던 이슈 해결
- #3
BaeKY added a commit that referenced this issue Jan 12, 2023
- cert-manager를 통한 tls생성 추가
- #3
BaeKY added a commit that referenced this issue Jan 12, 2023
BaeKY added a commit that referenced this issue Jan 12, 2023
BaeKY added a commit that referenced this issue Jan 12, 2023
BaeKY added a commit that referenced this issue Jan 12, 2023
BaeKY added a commit that referenced this issue Jan 12, 2023
BaeKY added a commit that referenced this issue Jan 12, 2023
BaeKY added a commit that referenced this issue Jan 16, 2023
* chore(chart): Add argocd chart

- #3

* chore(chart): Add harbor chart

- #3

* feat(package/helm-value-inferer): Add helm-chart version

- kube-ops/chart/src/index.ts에도 version 명시

* chore(package/k8s-generated): Add crd for helm chart

* fix(chart): Fix script for custom dns resolver on MacOS

* chore(chart): Add cert-manager chart

- #3

* chore(chart)!: Deprecate cdk8s-loader

* feat(chart): Add scripts/deploy-manifest.sh

- #4

* chore(chart): Add execute permission on scripts/*

- chmod +x ./scripts/*

* chore(chart): cert-manager

- Certificate생성시 k8s의 기본 coredns로 Chellenge 요청가던 이슈 해결
- #3

* chore(chart): argocd

- cert-manager를 통한 tls생성 추가
- #3

* chore(chart): harbor ingress tls

- #3

* chore(chart): coredns Corefile

- forward 추가
- #3

* chore(chart): Add jenkins

- #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant