Skip to content

Commit

Permalink
docs: github build with private-repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
itnpeople committed Dec 7, 2023
1 parent 2356c5f commit cc03f53
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
37 changes: 37 additions & 0 deletions _posts/tip/0000-01-03-git.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ description: "Development Tips - Git"
* [Github Workflow](#github-workflow)
* [GitHub 멀티계정 사용](#github-멀티계정-사용)
* [Github Badges](#github-badges)
* [go-lang 빌드 Action 에서 private-repository 연동 방법](#go-lang-빌드-action-에서-private-repository-연동-방법)


* [기타](#기타)
* [Git 그래프](#git-그래프)
* [Git-Flow](#git-flow)
Expand Down Expand Up @@ -728,6 +731,40 @@ Host github.aconsoftlab
`![fork](https://img.shields.io/github/forks/:user/:repository?style=social)`


### go-lang 빌드 Action 에서 private-repository 연동 방법

* TOKEN 생성
* https://github.com/settings/tokens
* 권한 필요

* Secret 등록
* https://github.com/kore3lab/cubeutils/settings/secrets/actions
* 예: ITNPEOPLE_TOKEN


* Action yaml 에서 아래와 같이 환경변수로 secret값을 넘겨준다.
* 예 : "GITHUB_TOKEN"

```
- name: Packaging cubeutils
env:
GITHUB_TOKEN: ${{ secrets.ITNPEOPLE_TOKEN }}
run: |
for OSEXT in "linux" "darwin" ; do
for ARCH in "amd64" ; do
cat pack | OSEXT=${OSEXT} ARCH=${ARCH} sh -
done
done
```

* 빌드스크립트에서 다음과 같이 정의
* 예: pack

```
git config --global url."https://itnpeople:${GITHUB_TOKEN}@github.com/kore3lab".insteadOf "https://github.com/kore3lab"
go env -w GOPRIVATE=github.com/kore3lab
```


## 기타

Expand Down
10 changes: 9 additions & 1 deletion _posts/tip/0000-02-01-kubectl.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ EOF

### 해결

* 강제 삭제 명령
* Namespace 강제 삭제 명령

```
▒ kubectl proxy
Expand All @@ -267,6 +267,14 @@ EOF
▒ rm -f temp.json
```

또는

```
▒ NAMESPACE=tigera-operator
▒ kubectl proxy & kubectl get namespace $NAMESPACE -o json |jq '.spec = {"finalizers":[]}' >temp.json
▒ curl -k -H "Content-Type: application/json" -X PUT --data-binary @temp.json 127.0.0.1:8001/api/v1/namespaces/$NAMESPACE/finalize
```

### Kubectl x509 Unable to Connect

#### 현상
Expand Down

0 comments on commit cc03f53

Please sign in to comment.