Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pbd section on services to fix lint checking issues #235

Closed
wants to merge 1 commit into from

Conversation

jemacchi
Copy link
Member

@jemacchi jemacchi commented Aug 8, 2024

When applying a lint checker, then eventually you can get this error message.

Error: template: geoservercloud/charts/geoservercloud/charts/geoserver/templates/pdb.yaml:4:88: executing "geoservercloud/charts/geoservercloud/charts/geoserver/templates/pdb.yaml" at <$serviceDefinition.pdb>: wrong type for value; expected map[string]interface {}; got interface {}
helm.go:84: [debug] template: geoservercloud/charts/geoservercloud/charts/geoserver/templates/pdb.yaml:4:88: executing "geoservercloud/charts/geoservercloud/charts/geoserver/templates/pdb.yaml" at <$serviceDefinition.pdb>: wrong type for value; expected map[string]interface {}; got interface {}

it's not happening if your values.yaml file includes a pbd section, which is not empty. But if it's empty then the template fails to check when the value is not present.
https://github.com/camptocamp/helm-custom-pod/blob/master/templates/pdb.yaml

Adding the pdb section with enable:false values in the helm-geoserver-cloud values.yaml file fixed the situation.
Note: not sure if it should be considered into the helm-custom-pod repo as an expected behavior or not.

@jemacchi
Copy link
Member Author

hi @danduk82 @sbrunner could you please confirm if this PR is valid ?
If not explicitly added the mentioned section, then the pbd.yml template could trigger that failure (in a lint check).
If it's not something we should fix/add/consider in the template, then we can consider it as a problem on the lint side.
I would like to close this PR (with a confirmation of change or as invalid).

@sbrunner
Copy link
Member

If it's not something we should fix/add/consider in the template

At first look the linter is too bad, the expression is correct :-(

Personally, I didn't use this tools because he reports nearly only false positive :-(

In this case, the default value is true :-)

@danduk82
Copy link
Member

will not be applied, can be fixed in the value files

@danduk82 danduk82 closed this Sep 30, 2024
@danduk82 danduk82 deleted the fix-pdb-lint branch September 30, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants