-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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: Fixing Helm chart flower ingress service reference #41179
Conversation
Can someone help my why this test failing? |
fc6bfe7
to
8efbcef
Compare
rebase solved it 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add tests for your change?
Hi @romsharon98 I'm happy to add helm test for the modified ingress object, however the helm test framework is fully missing from the helm chart and we need to add the automated test runs to the CI/CD pipelines as well. Helm testing documentation, |
You can add your tests here |
Hi @romsharon98 Sorry for the late reply I was on extended vacation. I have run into to a problem when I added the Here are my tests def test_backend_service_name(self):
docs = render_chart(
values={"ingress": {"web": {"enabled": True}}},
show_only=["templates/webserver/webserver-ingress.yaml"],
)
assert "release-name-webserver" == jmespath.search("spec.rules[0].http.paths[0].backend.service.name", docs[0])
def test_backend_service_name_with_fullname_override(self):
docs = render_chart(
values={"fullnameOverride": "test-basic",
"ingress": {"web": {"enabled": True}}},
show_only=["templates/webserver/webserver-ingress.yaml"],
)
assert "test-basic-webserver" == jmespath.search("spec.rules[0].http.paths[0].backend.service.name", docs[0])
def test_backend_service_name(self):
docs = render_chart(
values={"ingress": {"enabled": True}, "flower": {"enabled": True}},
show_only=["templates/flower/flower-ingress.yaml"],
)
assert "release-name-flower" == jmespath.search("spec.rules[0].http.paths[0].backend.service.name", docs[0])
def test_backend_service_name_with_fullname_override(self):
docs = render_chart(
values={"fullnameOverride": "test-basic",
"ingress": {"enabled": True}, "flower": {"enabled": True}},
show_only=["templates/flower/flower-ingress.yaml"],
)
assert "test-basic-flower" == jmespath.search("spec.rules[0].http.paths[0].backend.service.name", docs[0]) I run the test using the following command breeze testing helm-tests --helm-test-package webserver FAILED helm_tests/webserver/test_ingress_flower.py::TestIngressFlower::test_backend_service_name_with_fullname_override - AssertionError: assert equals failed
'test-basic-flower' 'release-name-flower'
FAILED helm_tests/webserver/test_ingress_web.py::TestIngressWeb::test_backend_service_name_with_fullname_override - AssertionError: assert equals failed
'test-basic-webserver' 'release-name-webserver'
|
for this to be applied you need to set |
Hi @romsharon98 Thank you so much the help. Now my tests are passing. Thanks, |
You have static checks fail. You can see how to install it here |
Hi @romsharon98 Thanks, |
03c4318
to
d0279ce
Compare
Hi @romsharon98 When is the helm chart 1.16.0 scheduled for release? Thanks, |
I think @jedcunningham will know better |
* fix: Fixing Helm chart flower ingress service reference * fix: Fixing Helm chart flower ingress service reference * feat: Add helm unit test for the ingress backend service name * feat: Add helm unit test for the ingress backend service name * fix: Run linter for new files --------- Co-authored-by: Andor Markus (AllCloud) <andor.rudolf-markus@glassbox.com>
* fix: Fixing Helm chart flower ingress service reference * fix: Fixing Helm chart flower ingress service reference * feat: Add helm unit test for the ingress backend service name * feat: Add helm unit test for the ingress backend service name * fix: Run linter for new files --------- Co-authored-by: Andor Markus (AllCloud) <andor.rudolf-markus@glassbox.com>
closes #41175
What happened
We are sub charting the official airflow chart and for this reason we need to use
fullnameOverride: "airflow"
settings to achieve the desired k8s resource names. However when we are using it the flower ingress becomes invalid because it want's to connect to non existing service name. Root cause are in the ingress.yaml. The webserver ingress can handle it with no problem.Incorrect code section
flower-ingress.yaml
- code sectionWhile in the correct code section
webserver-ingress.yaml
- code sectionTo overcome this issue we need to run this command on every deployment
What you think should happen instead
The following code should be updated to match how webserver ingress works
flower-ingress.yaml
- code section