Skip to content

Commit

Permalink
docs: add --chart documentation (#444)
Browse files Browse the repository at this point in the history
Co-authored-by: devthejo <[email protected]>
  • Loading branch information
Julien Bouquillon and devthejo authored Dec 9, 2023
1 parent 8059982 commit cf4a0c6
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,68 @@ oauth2-proxy:

[TODO]

## Trigger specific jobs or deployments

If you want to define some specific deployments, you can use the `--chart` option to target a specific chart. This is useful for example for manually triggering some specific jobs or deployments.

Example :

create a subchart of project, in `.kontinuous/charts/prod-dump/values.yaml` put:
```yaml
jobs-prod-dump:
~chart: project.fabrique.contrib.jobs
enabled: true
runs:
anonymise:
~needs: [pg-restore]
image: ghcr.io/socialgouv/docker/s3-client:1.2.0
entrypoint: ["/bin/bash"]
args:
- "-c"
- "echo 42"
envFrom:
- secretRef:
name: pg-restore-superuser
```
then, ensure it will not be triggered with the deployment:
- put in `.kontinuous/values.yaml`:
```yaml
prod-dump:
enabled: false
```
- put in `.kontinuous/Chart.yaml`:
```yaml
dependencies:
- name: prod-dump
repository: file://./charts/prod-dump
condition: prod-dump.enabled
```

then build your manifest:
```sh
kontinuous build --ignore-project-templates --chart prod-dump
```

or call via action:
```yaml
jobs:
deploy:
name: Custom Pipeline 🛸
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: socialgouv/kontinuous/.github/actions/deploy-via-github@v1
with:
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
chart: prod-dump
ignoreProjectTemplates: true
```

or use re-usable workflow like this one:
- https://github.com/SocialGouv/workflows/blob/master/.github/workflows/use-ks-gh-custom.yaml

## 🐰 Easter egg

– I heard about an easter egg hidden in the kontinuous cli, can you give me a clue ?
Expand Down

0 comments on commit cf4a0c6

Please sign in to comment.