chore(actions): check actions is not configured (#849)
This is @ChristopherHX's PR
### Description of the change
Do not silently ignore actions.enabled set by user.
### Benefits
Everybody who has enabled actions act_runner do not silently end up without runners, but directly see an actionable error message.
### Possible drawbacks
You need to remove the actions section from your own values.yml to upgrade/install this chart.
The Migration Guide has not been written yet, I consider this issue as a community wiki where other maintainers are free to edit my initial post.
### Applicable issues
N/A
### Additional information
I couldn't add helm-gitea as a dependency, because of
- conflict with a7035ca4e5/templates/_helpers.tpl (L223-L230)
with one difference helm-actions did not have the referenced values and failed to render
- after resolving the above by either renaming in the helm-actions chart or removal of this leftover code in helm-gitea
- helm does not allow me to derive dynamic default values for the `actions` section for the subchart
- using yaml anchors only provided default values into helm-actions, without respecting user changes
- I only found a feature request
- It is not feasible for me in short term to add support of this section back using helm-actions
### Checklist
- [X] Helm templating unittests are added (required when changing anything in `templates` folder)
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Reviewed-on: https://gitea.com/gitea/helm-gitea/pulls/849
Reviewed-by: pat-s <pat-s@noreply.gitea.com>
Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-committed-by: techknowlogick <techknowlogick@noreply.gitea.com>
This commit is contained in:
parent
5b247ea860
commit
3b32a04b9c
3
templates/gitea/check-actions-not-present.yaml
Normal file
3
templates/gitea/check-actions-not-present.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
{{- if .Values.actions -}}
|
||||
{{- fail "The actions sub-chart has been outsourced to a dedicated chart available at https://gitea.com/gitea/helm-actions. For assistance with the migration process, check https://gitea.com/gitea/helm-actions/issues/9." -}}
|
||||
{{- end -}}
|
12
unittests/helm/check-actions-not-present.yaml
Normal file
12
unittests/helm/check-actions-not-present.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
suite: Check if actions raises an error
|
||||
release:
|
||||
name: gitea-unittests
|
||||
namespace: testing
|
||||
tests:
|
||||
- it: fails when trying to configure actions due to removal
|
||||
set:
|
||||
actions:
|
||||
enabled: true
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: The actions sub-chart has been outsourced to a dedicated chart available at https://gitea.com/gitea/helm-actions. For assistance with the migration process, check https://gitea.com/gitea/helm-actions/issues/9.
|
Loading…
x
Reference in New Issue
Block a user