-
Notifications
You must be signed in to change notification settings - Fork 56
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
Harmonize default value for REANA_HOSTNAME #867
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #867 +/- ##
==========================================
- Coverage 31.07% 31.04% -0.04%
==========================================
Files 26 26
Lines 2491 2500 +9
==========================================
+ Hits 774 776 +2
- Misses 1717 1724 +7
|
…#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
97a6a01
to
54ec108
Compare
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
54ec108
to
db4c4ae
Compare
…#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
…#717) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-workflow-controller#630 Closes reanahub/reana#865
helm/reana/templates/cronjobs.yaml
Outdated
@@ -166,7 +166,7 @@ spec: | |||
value: "true" | |||
{{- if .Values.reana_hostname }} | |||
- name: REANA_HOSTNAME | |||
value: {{ .Values.reana_hostname }} | |||
value: {{ .Values.reana_hostname | default "localhost:30443" }} |
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.
Note that if we make reana_hostname
to be mandatory and to have a nice default value in the Helm chart, then these conditional default strings would not be needed everywhere.
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.
We may have a problem with the treatment of port numbers.
(1) With the current PR and using:
reana_hostname: localhost
I'm getting missing port numbers in the Dask service URL:
reana=# select * from __reana.service ;
id_ | name | uri | status | owner_id | type_
--------------------------------------+-----------------------+-------------------------------------------------------------------------+---------+----------+-------
f910b6ef-7fc6-434f-8d56-3bc4c22890fd | dask-service-cb18c6cd | https://localhost/cb18c6cd-2cc2-44ea-8f0f-2addec5722ec/dashboard/status | running | | dask
(1 row)
(The real URL should be https://localhost:30443/cb18c6cd-2cc2-44ea-8f0f-2addec5722ec/dashboard/status.)
(2) And, if someone would like to customise Helm chart to use hostname including port number:
reana_hostname: localhost:30443
then this would lead to an installation error:
Error: INSTALLATION FAILED: 1 error occurred:
* Ingress.networking.k8s.io "reana-ingress" is invalid: spec.rules[0].host: Invalid value: "localhost:30443": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
We may perhaps need to introduce another Helm chart value concerning port information, or subtract the port information from reana_hostname
when constructing ingress values.
I guess it may be better to have a new variable about port, and set it by default to 30443, and people could customise it to whatever they wish. (Could be handy if you'd like to run two REANA deployments on the same machine, e.g. for testing purposes.)
(3) Similarly, we may want to beware about HTTP vs HTTPS ports, because some installations terminate SSL early via say HAProxy, and comunicate using HTTP with REANA infrastructure afterwards, as desrcibed in https://docs.reana.io/administration/configuration/configuring-cluster-ingress/#using-reverse-proxy)
helm/reana/templates/secrets.yaml
Outdated
@@ -95,7 +95,7 @@ metadata: | |||
"helm.sh/resource-policy": keep | |||
type: kubernetes.io/tls | |||
data: | |||
{{- $cert := genSelfSignedCert (.Values.reana_hostname | default "localhost") nil nil 90 }} | |||
{{- $cert := genSelfSignedCert (.Values.reana_hostname | default "localhost:30443") nil nil 90 }} |
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.
For certificate purposes, I think one does not use the port information.
…#717) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-workflow-controller#630 Closes reanahub/reana#865
…#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
…#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
db4c4ae
to
b2074bc
Compare
…#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
a256dc4
to
c0d777b
Compare
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
c0d777b
to
ff95a22
Compare
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
ff95a22
to
e0eb2bc
Compare
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
35b0d25
to
7a8906d
Compare
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
7a8906d
to
9d2af59
Compare
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
9d2af59
to
063b416
Compare
…b#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
…b#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
063b416
to
0d654fa
Compare
…b#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
…b#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
0d654fa
to
e705cd3
Compare
reana/reana_dev/cluster.py
Outdated
@@ -283,6 +302,12 @@ def cluster_build( | |||
callback=validate_mode_option, | |||
help="In which mode to run REANA cluster? (releasehelm,releasepypi,latest,debug) [default=latest]", | |||
) | |||
@click.option( | |||
"--port", |
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.
suggestion: Might be good to call the variable --hostport
for full compatibility with the Helm chart value naming.
helm/reana/values.yaml
Outdated
# production deployments to be secure. The default `localhost` value is used | ||
# in local deployment scenarios. | ||
|
||
reana_hostport: 30444 |
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.
todo: Shouldbe 443 by default.
helm/reana/values.yaml
Outdated
# in local deployment scenarios. | ||
|
||
reana_hostport: 30444 | ||
# `reana_hostport` should be set to same port you expose in your ingress controller. |
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.
suggestion: You can rather explain that "... should be set to the port number where the REANA service will be exposed for incoming SSL connections." (Kind of using outward user-oriented language, not inward ingress-oriented language.)
helm/reana/values.yaml
Outdated
@@ -170,7 +174,7 @@ traefik: | |||
web: | |||
nodePort: 30080 | |||
websecure: | |||
nodePort: 30443 | |||
nodePort: 30444 |
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.
todo: You should revert back to 30443 after testing is done.
reana/reana_dev/cluster.py
Outdated
@@ -86,6 +92,7 @@ def cluster_create( | |||
$ reana-dev cluster-create -m /var/reana:/var/reana | |||
-m /usr/share/local/mydata:/mydata | |||
--mode debug | |||
--extra-ports 30080 30443 5000 |
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.
todo: I'm note sure port 5000 would work, Kind/K8s may need ports above 30000. You can use a realistic exampe of 30444 for running a second REANA instance in the documentation pages.
{"containerPort": 30080, "hostPort": 30080, "protocol": "TCP"}, # HTTP | ||
{"containerPort": 30443, "hostPort": 30443, "protocol": "TCP"}, # HTTPS | ||
], | ||
"extraPortMappings": extra_port_mappings, # Only user-specified ports |
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.
question: Before, 30080 and 30443 were automatically added. Now, they would not be, so developers would have to pass `--extra-ports 30080 30443 manually. Perhaps you can check the argument, and if nothing was specified, fall back to 30080 and 30443, so that old behaviour would work out of the box?
reana/reana_dev/run.py
Outdated
@@ -288,6 +294,7 @@ def run_ci( | |||
-c r-d-helloworld | |||
--exclude-components=r-ui,r-a-krb5,r-a-rucio,r-a-vomsproxy | |||
--mode debug | |||
--port 30500 |
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.
todo: Please use realistic examples, i.e. 30443 default value. The help would be more easily copy-pasteable.
scripts/create-admin-user.sh
Outdated
@@ -42,7 +43,7 @@ kubectl -n "${kubernetes_namespace}" create secret generic "${instance_name}"-ad | |||
# Success! | |||
echo "Success! You may now set the following environment variables:" | |||
echo "" | |||
echo " $ export REANA_SERVER_URL=https://localhost:30443 # or use your URL" | |||
echo " $ export REANA_SERVER_URL=https://localhost:${reana_hostport} # or use your URL" |
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.
suggestion: localhost
still stays hard-coded here. If we want to pass the host port, we should probably pass the host name too, for consistency. Alternatively, let's just keep the old content, i.e. not introduce any new argument, since the localhost:30443 part is only printed out as a help. I guess I would prefer the latter, so that we don't change the number of arguments to this script. (It does not seem necessary to know the port number when creating an admin user...)
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
aabf388
to
28bf617
Compare
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
28bf617
to
94b7ef6
Compare
…b#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
…b#867) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
94b7ef6
to
e3caee4
Compare
…b#867) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reanahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
e3caee4
to
8acfb28
Compare
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below.
reanahub/reana-server#717
reanahub/reana-workflow-controller#630
Closes #865