-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
huanying liu
committed
Sep 20, 2024
1 parent
ebe92dd
commit 17f8f8c
Showing
4 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
icon: folder | ||
index: false | ||
title: Helm | ||
--- | ||
|
||
<Catalog /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: command | ||
icon: file | ||
--- | ||
|
||
|
||
## install helm | ||
|
||
```bash | ||
MIRROR="files." | ||
VERSION=v3.13.3 | ||
ARCH=$(uname -m) | ||
if [ "${ARCH}" = "x86_64" ]; then | ||
ARCH_IN_FILE_NAME=linux-amd64 | ||
elif [ "${ARCH}" = "aarch64" ]; then | ||
ARCH_IN_FILE_NAME=linux-arm64 | ||
else | ||
echo "NOT SUPPORT: ${ARCH}" | ||
fi | ||
FILE_NAME=helm-${VERSION}-${ARCH_IN_FILE_NAME}.tar.gz | ||
curl -sSLo ${FILE_NAME} "https://${MIRROR}get.helm.sh/${FILE_NAME}" | ||
tar zxf ${FILE_NAME} | ||
mkdir -p ${HOME}/bin | ||
mv -f ${ARCH_IN_FILE_NAME}/helm ${HOME}/bin | ||
rm -rf ./${FILE_NAME} | ||
rm -rf ./${ARCH_IN_FILE_NAME} | ||
chmod u+x ${HOME}/bin/helm | ||
|
||
``` | ||
|
||
## Push a helm chart to a registry | ||
|
||
```bash | ||
helm plugin install https://github.com/chartmuseum/helm-push | ||
``` | ||
|
||
```bash | ||
helm cm-push \ | ||
$CHART_CODE_RELATIVE_PATH \ | ||
$CHART_MUSEUM_URL \ | ||
--username=$CHART_MUSEUM_USERNAME \ | ||
--password=$CHART_MUSEUM_PASSWORD \ | ||
--context-path=$CHART_MUSEUM_CONTEXT_PATH \ | ||
--force | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Shell | ||
icon: folder | ||
index: false | ||
--- | ||
|
||
<Catalog /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
title: command | ||
icon: file | ||
--- | ||
## Set input style | ||
|
||
::: tabs | ||
@tab vim | ||
|
||
```shell | ||
set -o vi | ||
``` | ||
|
||
@tab emacs | ||
|
||
```shell | ||
set -o emacs | ||
``` | ||
|
||
::: | ||
|
||
## Change User Group | ||
|
||
```shell | ||
sudo chown -R $USER:$GROUP . | ||
``` | ||
|
||
::: note | ||
-R: Recursively change the owner and group of all files in the current directory. | ||
::: | ||
|
||
## Change Permissions | ||
|
||
a directory must have execute permission to list its contents. | ||
|
||
::: tabs | ||
@tab use numbers | ||
|
||
```shell | ||
chmod 755 file | ||
``` | ||
|
||
::: note | ||
|
||
- 7: rwx | ||
- 6: rw | ||
- 5: rx | ||
- 4: r | ||
- 3: wx | ||
- 2: w | ||
- 1: x | ||
- 0: None | ||
|
||
@tab use symbols | ||
|
||
```shell | ||
chmod u+x file | ||
``` | ||
|
||
::: note | ||
|
||
- u: User | ||
- g: Group | ||
- o: Others | ||
- a: All | ||
- +: Add | ||
- -: Remove | ||
- x: Execute | ||
- r: Read | ||
- w: Write | ||
::: |