Skip to content

Commit

Permalink
feat: override kubeconfig #19
Browse files Browse the repository at this point in the history
feat: override kubeconfig
  • Loading branch information
devthejo authored Jun 26, 2023
2 parents 31b3e55 + 556797f commit c0ef756
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/use-ks-gh-custom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ on:
inlineSet:
required: false
type: string
kubeconfig:
required: false
type: string
secrets:
KUBECONFIG:
required: true
Expand All @@ -34,7 +37,7 @@ jobs:

- uses: socialgouv/kontinuous/.github/actions/deploy-via-github@v1
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
chart: ${{ inputs.chart }}
ignoreProjectTemplates: ${{ inputs.ignoreProjectTemplates }}
environment: ${{ inputs.environment }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/use-ks-gh-deactivate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
inlineSet:
required: false
type: string
kubeconfig:
required: false
type: string
secrets:
KUBECONFIG:
required: true
Expand All @@ -31,7 +34,7 @@ jobs:
id: deployment
continue-on-error: true
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
chart: deactivate
ignoreProjectTemplates: ${{ inputs.ignoreProjectTemplates }}
inlineValues: ${{ inputs.inlineValues }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/use-ks-gh-manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ on:
inlineSet:
required: false
type: string
kubeconfig:
required: false
type: string
secrets:
KUBECONFIG:
required: true
Expand All @@ -34,7 +37,7 @@ jobs:

- uses: socialgouv/kontinuous/.github/actions/deploy-via-github@v1
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
chart: ${{ inputs.chart }}
ignoreProjectTemplates: ${{ inputs.ignoreProjectTemplates }}
environment: ${{ inputs.environment }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/use-ks-gh-preproduction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
required: false
KS_NOTIFY_MATTERMOST_WEBHOOK_URL:
required: false
inputs:
kubeconfig:
required: false
type: string


jobs:
deploy:
Expand All @@ -30,7 +35,7 @@ jobs:
id: deployment
continue-on-error: true
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
environment: preprod
deployWriteOutputFile: "true"
sentryDSN: ${{ secrets.KS_SENTRY_DSN }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/use-ks-gh-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
required: false
KS_NOTIFY_MATTERMOST_WEBHOOK_URL:
required: false
inputs:
kubeconfig:
required: false
type: string

jobs:
deploy:
Expand All @@ -30,7 +34,7 @@ jobs:
id: deployment
continue-on-error: true
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
environment: prod
deployWriteOutputFile: "true"
sentryDSN: ${{ secrets.KS_SENTRY_DSN }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/use-ks-gh-review-auto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
required: false
KS_NOTIFY_MATTERMOST_WEBHOOK_URL:
required: false
inputs:
kubeconfig:
required: false
type: string

jobs:
deploy:
Expand All @@ -30,7 +34,7 @@ jobs:
id: deployment
continue-on-error: true
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
environment: dev
deployWriteOutputFile: "true"
sentryDSN: ${{ secrets.KS_SENTRY_DSN }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/use-ks-gh-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
required: false
KS_NOTIFY_MATTERMOST_WEBHOOK_URL:
required: false
inputs:
kubeconfig:
required: false
type: string

jobs:
deploy:
Expand All @@ -30,7 +34,7 @@ jobs:
id: deployment
continue-on-error: true
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
kubeconfig: ${{ inputs.kubeconfig || secrets.KUBECONFIG }}
environment: dev
deployWriteOutputFile: "true"
sentryDSN: ${{ secrets.KS_SENTRY_DSN }}
Expand Down

0 comments on commit c0ef756

Please sign in to comment.