Horizon: use endpoints section and lookups to set port

This PS moves horizon to use the endpoints section and lookups to
set the port it serves on.

Change-Id: Id413f05c3ab49d592d030916d7cffcdf256519fd
This commit is contained in:
portdirect 2018-03-04 17:42:14 -05:00
parent 16c6d31155
commit 3ee532e0ce
4 changed files with 12 additions and 12 deletions

View File

@ -64,12 +64,13 @@ spec:
- /tmp/horizon.sh
- stop
ports:
- containerPort: {{ .Values.network.port }}
- name: web
containerPort: {{ tuple "dashboard" "internal" "web" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
httpGet:
scheme: HTTP
path: /
port: {{ .Values.network.port }}
port: {{ tuple "dashboard" "internal" "web" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 15
periodSeconds: 10
volumeMounts:

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
Listen 0.0.0.0:{{ .Values.network.port}}
Listen 0.0.0.0:{{ tuple "dashboard" "internal" "web" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
@ -23,7 +23,7 @@ SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
CustomLog /dev/stdout combined env=!forwarded
CustomLog /dev/stdout proxy env=forwarded
<VirtualHost *:{{ .Values.network.port}}>
<VirtualHost *:{{ tuple "dashboard" "internal" "web" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}>
WSGIScriptReloading On
WSGIDaemonProcess horizon-http processes=5 threads=1 user=horizon group=horizon display-name=%{GROUP} python-path=/var/lib/kolla/venv/lib/python2.7/site-packages
WSGIProcessGroup horizon-http

View File

@ -24,16 +24,16 @@ metadata:
spec:
ports:
{{ if .Values.network.node_port.enabled }}
- name: http
- name: web
protocol: TCP
nodePort: {{ .Values.network.node_port.port }}
port: {{ .Values.network.port }}
protocol: TCP
targetPort: {{ .Values.network.port }}
port: {{ tuple "dashboard" "internal" "web" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
targetPort: {{ tuple "dashboard" "internal" "web" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{ else }}
- name: http
port: {{ .Values.network.port }}
- name: web
protocol: TCP
targetPort: {{ .Values.network.port }}
port: {{ tuple "dashboard" "internal" "web" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
targetPort: {{ tuple "dashboard" "internal" "web" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{ end }}
selector:
{{ tuple $envAll "horizon" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}

View File

@ -37,7 +37,6 @@ labels:
node_selector_value: enabled
network:
port: 80
dashboard:
ingress:
public: true