Using kubectl ouput
This commit is contained in:
parent
c1933f5a8d
commit
84e24b2a84
18
README.md
18
README.md
@ -39,6 +39,22 @@ To use kubectl put this step into your workflow:
|
|||||||
args: get pods
|
args: get pods
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Using kubectl ouput:
|
||||||
|
```yaml
|
||||||
|
- name: 🛂 Check namespace exists
|
||||||
|
uses: actions-hub/kubectl@master
|
||||||
|
with:
|
||||||
|
redirect-to: NAMESPACE_EXIST
|
||||||
|
args: get namespace ${{ env.EXPECTED_NAMESPACE }} --ignore-not-found
|
||||||
|
|
||||||
|
- name: 🛡️ Preserve secret FRONT_TLS
|
||||||
|
if: env.NAMESPACE_EXIST == ${{ env.EXPECTED_NAMESPACE }}
|
||||||
|
uses: actions-hub/kubectl@master
|
||||||
|
with:
|
||||||
|
redirect-to: WEBAPP_TLS
|
||||||
|
args: get secret webapp-tls -n ${{ env.EXPECTED_NAMESPACE }} -o yaml
|
||||||
|
```
|
||||||
|
|
||||||
## Environment variables
|
## Environment variables
|
||||||
All these variables need to authorize to kubernetes cluster.
|
All these variables need to authorize to kubernetes cluster.
|
||||||
I recommend using secrets for this.
|
I recommend using secrets for this.
|
||||||
@ -125,4 +141,4 @@ To use a specific version of kubectl use:
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Licence
|
## Licence
|
||||||
[MIT License](https://github.com/actions-hub/kubectl/blob/master/LICENSE)
|
[MIT License](https://github.com/actions-hub/kubectl/blob/master/LICENSE)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user