-
Notifications
You must be signed in to change notification settings - Fork 639
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
Allow multiple ingress hosts to be defined when using ingress #1377
Conversation
Hi! |
@fosterseth i rebased and also push the fix for the molecule CI warnings and error. Can we rerun the CI ? |
@fosterseth i am not sure what the CI failure are about. The PR check https://github.com/ansible/awx-operator/actions/runs/4925590784/jobs/8831262726?pr=1377 just report This job failed with no log output and when i checked what it does, my PR does have New or Enhanced Feature in the issue type body of the PR. For the molecule timing out not sure why it timeout, I am checking the logs but for now I can not find anything |
Hi, could I get help to have this merged please ? |
Anything blocking the merge of this PR ? Can we run the CI again ? |
@fosterseth @rooftopcellist could I please get at least a new CI run on this MR ? Or any feedback on why it can not be merged ? |
when I tried your example, I got the following operator error
is tls_secret optional or required? |
@fosterseth it was supposed to be optional but it seems there was a mistake in my jinja. I fixed it just now (2331bbc) |
tested again, looks like it works correctly now |
@fosterseth any update ? I just rebased again |
checked for backward compatibility, which seems to work fine ---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx
spec:
service_type: nodeport
ingress_type: ingress
ingress_tls_secret: example-com-tls
hostname: awx-demo.example.com generated ingress spec:
rules:
- host: awx-demo.example.com
http:
paths:
- backend:
service:
name: awx-service
port:
number: 80
path: /
pathType: Prefix
tls:
- hosts:
- awx-demo.example.com
secretName: example-com-tls |
Can we really mark |
@rooftopcellist i do not see anything in |
@guillaumelfv Hey, thank you for following up on this. You are right, hostname is not referenced in Route, so it should be safe to deprecate. Thanks for pointing that out. Can you rebase one last time? Sorry for the churn. This is ready to merge, we just need to get CI passing. |
I looks like I was able to rebase via the UI, so we can just wait for CI now. |
could we please run the CI again ? I want to see the latest logs to see if i can debug why the molecule tests failed. |
@guillaumelfv Would you mind rebasing one more time for us? Once the conflicts are fixed we are happy to get this merged! |
@djyasin I rebased just now |
Thank you so much! I am running the CI checks now and as long as those are passing I will merge this in! |
@djyasin It timeout, same as any previous run before. According to the logs it silently fail for this task:
Then timeout. I can see the tasks use the following resource template. I will check further on my free time and run the molecule tests locally. Any help from the team, if possible, would be appreciated. |
@djyasin I just push the fix 72ff073. There was an issue when neither In this scenario the ingress rules would be invalid and the controller would throw:
The jinja template needed to be change from: {% if hostname and (not ingress_hosts) %}
- host: {{ hostname }}
http:
paths:
- path: '{{ ingress_path }}'
pathType: '{{ ingress_path_type }}'
backend:
service:
name: '{{ ansible_operator_meta.name }}-service'
port:
number: 80
... To: {% if not ingress_hosts %}
- http:
paths:
- path: '{{ ingress_path }}'
pathType: '{{ ingress_path_type }}'
backend:
service:
name: '{{ ansible_operator_meta.name }}-service'
port:
number: 80
{% if hostname %}
host: {{ hostname }}
{% endif %} I did test the fix locally and the molecule tests passed. Sorry it took me so long to fix this regression, once I fixed the molecule tests to pass on my laptop the issue was easy to spot. Just for future reference I face the following running the molecule tests:
And it was fix following this thread rails/rails#38560 and adding:
to my zshrc. @djyasin could you please trigger a new CI run ? |
@guillaumelfv thank you so much for making these additional changes! I am happy to run those checks again. |
SUMMARY
Deprecate
hostname
andingress_tls_secret
spec. Add a new specingress_hosts
which allow multiple ingress hosts to be defined when using ingress.ingress_hosts
default to empty and when definedhostname
is mandatory buttls_secret
is optional.ingress_hosts
has priority in case bothingress_hosts
andhostname
/ingress_tls_secret
are definedhostname
andingress_tls_secret
marked as deprecatedFor example the above
ingress_hosts
definition will be render as follow:fixes #897 #1318
ISSUE TYPE
ADDITIONAL INFORMATION
hostname
is marked as deprecated but still supportedingress_tls_secret
is marked as deprecated but still supportedThis change is backward compatible and priority are as follow based on the spec definition:
hosname
ingress_hosts
hostname
ingress_hosts
ingress_hosts