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

fix(ci): use default chart-testing logic for different testcases #526

Closed
wants to merge 2 commits into from

Conversation

wrenix
Copy link
Collaborator

@wrenix wrenix commented Feb 5, 2024

Pull Request

Description of the change

first chart-testing values (without ServiceMonitor will be solved in #523 ).

Additional information

Checklist

@wrenix wrenix force-pushed the fix/ct-values-first branch 8 times, most recently from 48ba03a to b017908 Compare February 5, 2024 08:01
@wrenix
Copy link
Collaborator Author

wrenix commented Feb 5, 2024

This is a internal timeout error, i do not know what the exactly problem is

@wrenix wrenix marked this pull request as draft February 6, 2024 12:40
@wrenix wrenix force-pushed the fix/ct-values-first branch 2 times, most recently from 29b2eb5 to a323f84 Compare February 6, 2024 13:42
@jessebot
Copy link
Collaborator

In #598 we recently added more tests, but I do kind of like the idea of using values files instead of set args, but I'm not sure the order of prescience when using --helm-extra-args "--values charts/nextcloud/ci/ct-all-enabled-values.yaml" with ct, as in I'm not sure if it still processes the existing values.yaml and then merges the --values file on top of it, or if it ONLY processes the passed in --values file. The issue is that if it only uses the values file is passed in as an arg, and ignores the one sitting in the charts/nextcloud directory, we run the risk of any of our "special" test values files getting out of date and needing to be maintained along side the actual values.yaml.

That said, I do think it would be good to add a redis test to our set of tests we've defined here:

test_cases:
# test the plain helm chart with nothing changed
- name: 'Default - no custom values'
# test the helm chart with postgresql subchart enabled
- name: PostgreSQL Enabled
helm_args: '--helm-extra-set-args "--set=postgresql.enabled=true --set=postgresql.global.postgresql.auth.password=testing123456 --set=internalDatabase.enabled=false --set=externalDatabase.enabled=True --set=externalDatabase.type=postgresql --set=externalDatabase.password=testing12345"'
# test the helm chart with nginx container enabled
- name: Nginx Enabled
helm_args: '--helm-extra-set-args "--set=image.flavor=fpm --set=nginx.enabled=true"'
# test the helm chart with horizontal pod autoscaling enabled
- name: Horizontal Pod Autoscaling Enabled
helm_args: '--helm-extra-set-args "--set=hpa.enabled=true --set=hpa.minPods=2 --set=hpa.maxPods=3 --set=hpa.targetCPUUtilizationPercentage=75"'

@wrenix
Copy link
Collaborator Author

wrenix commented Aug 11, 2024

To answer your question.
It will use the default charts/nextcloud/values.yaml like on a normal helm install and patch the given ct-*values.yaml (thats the reason, why i use an ct-empty-values.yaml to have an testcase with no changes).

but yes the testcase i wrote are a little bit stange (instatt of an nginx or postgresql testcase itself).
(i just tried to reduce compute time) ....

so i will rewrite / move the new existing testcases into a chart-testing way.

@wrenix wrenix force-pushed the fix/ct-values-first branch from 8b469b4 to 5485a34 Compare August 11, 2024 19:46
@wrenix wrenix changed the title fix(ci): add value files for chart-testing fix(ci): use default chart-testing logic for different testcases Aug 11, 2024
@wrenix
Copy link
Collaborator Author

wrenix commented Aug 11, 2024

Hmm, i change the ci/ct-*values.yaml the way you created testcases on github matrix way .... so have not seen / review an early state of #598 was it that idea?


edit: there is still something wrong with the s3 upload (and test) - i am not sure if we:

  • should create for every testcase a complete new kind cluster (current setup) -> need a lot of compute time
  • minio test with fixed namespace vs. cleanup correct (sorry my brain is tiered to express myself)

another unvalided thought: maybe we should move the upload test into the helm-chart so that everybody could test it with an helm post-install/-upgrade hook)

@wrenix wrenix force-pushed the fix/ct-values-first branch 2 times, most recently from cee2f7f to 278f42d Compare August 11, 2024 20:07
@wrenix wrenix force-pushed the fix/ct-values-first branch from 278f42d to a6c3f91 Compare August 11, 2024 20:23
@jessebot
Copy link
Collaborator

Hmm, i change the ci/ct-*values.yaml the way you created testcases on github matrix way .... so have not seen / review an early state of #598 was it that idea?

Sorry, can you rephrase that a bit? I'm a little confused at what's being asked, but I want to help!

edit: there is still something wrong with the s3 upload (and test) - i am not sure if we:

* should create for every testcase a complete new kind cluster (current setup) -> need a lot of compute time

Yes, that's the issue with how I set it up currently: a lot of compute time. But we, kate and I, had earlier decided that was worth it, because it helped keep all the tests isolated.

* minio test with fixed namespace vs. cleanup correct (sorry my brain is tiered to express myself)

we could technically use different name spaces on the same cluster, and that would still keep the tests fairly isolated, yes, but we'd need still to clean up the old tests, as some of the things we test would still have similar names, so if we tested ingress, we couldn't have that be namespace specific, I think 🤔 @provokateurin do you want to chime in? @wrenix makes some valid points, but I'm not sure how much the nextcloud org is hurting for compute at this time.

another unvalided thought: maybe we should move the upload test into the helm-chart so that everybody could test it with an helm post-install/-upgrade hook)

that sounds like a kind thing to do :) do we want to include the vanilla minio chart as an optional subchart of our chart to facilitate that, or should we always require an external s3 server?

@provokateurin
Copy link
Member

I'm not sure how much the nextcloud org is hurting for compute at this time.

Should be fine, as long as we don't spawn 20+ very long running jobs ;)

@wrenix wrenix closed this Dec 19, 2024
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