Skip to content

Commit

Permalink
Issue#48 remove ingress externalport parameter (#53)
Browse files Browse the repository at this point in the history
* remove ingress.externalPort optional
  • Loading branch information
ridoo authored Aug 10, 2023
1 parent 45be145 commit f907a8a
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 18 deletions.
1 change: 0 additions & 1 deletion deployment/geonode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ Helm Chart for Geonode
| geonode.ingress.addNginxIngressAnnotation | bool | `false` | adds ingress annotations for nginx ingress class to increase uploadsize and timeout time |
| geonode.ingress.enabled | bool | `true` | enables external access |
| geonode.ingress.externalDomain | string | `"geonode"` | external ingress hostname |
| geonode.ingress.externalPort | int | `80` | external ingress port |
| geonode.ingress.externalScheme | string | `"http"` | external ingress schema. if set to https ingress tls is used. Loading tls certificate via tls-secret options Available options: (http|https) |
| geonode.ingress.ingressClassName | string | `nil` | define kubernetes ingress class for geonode ingress |
| geonode.ingress.tlsSecret | string | `"geonode-tls-secret"` | tls certificate for geonode ingress https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/ (for the use of cert-manager, configure the acme section properly). is used when geonode.ingress.externalScheme is set to https |
Expand Down
9 changes: 1 addition & 8 deletions deployment/geonode/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,8 @@ persistence
amqp://{{ .Values.rabbitmq.auth.username }}:{{ .Values.rabbitmq.auth.password }}@{{ include "rabbit_host" . }}/
{{- end -}}

{{- define "external_port" -}}
{{- if or (eq (toString .Values.geonode.ingress.externalPort) "80") (eq (toString .Values.geonode.ingress.externalPort) "443") -}}
{{- else -}}
:{{ .Values.geonode.ingress.externalPort}}
{{- end -}}
{{- end -}}

{{- define "public_url" -}}
{{ .Values.geonode.ingress.externalScheme }}://{{ .Values.geonode.ingress.externalDomain }}{{ include "external_port" . }}
{{ .Values.geonode.ingress.externalScheme }}://{{ .Values.geonode.ingress.externalDomain }}
{{- end -}}


Expand Down
1 change: 0 additions & 1 deletion deployment/geonode/templates/geonode/geonode-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ data:

GEONODE_INSTANCE_NAME: {{ .Release.Name }}
GEONODE_LB_HOST_IP: {{ .Values.geonode.ingress.externalDomain | quote }}
GEONODE_LB_PORT: {{ .Values.geonode.ingress.externalPort | quote }}
GEONODE_DB_CONN_MAX_AGE: '0'
GEONODE_DB_CONN_TOUT: '5'

Expand Down
2 changes: 0 additions & 2 deletions deployment/geonode/templates/geoserver/geoserver-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ metadata:
namespace: {{ .Release.Namespace }}
data:
GEONODE_LB_HOST_IP: {{ .Values.geonode.ingress.externalDomain | quote }}
GEONODE_LB_PORT: {{ .Values.geonode.ingress.externalPort | quote }}
GEONODE_HOST_IP: localhost

PUBLIC_PORT: {{ .Values.geonode.ingress.externalPort | quote }}
DJANGO_URL: http://{{ include "geonode_pod_name" .}}/
ENABLE_JSONP: 'true'
outFormat: text/javascript
Expand Down
8 changes: 5 additions & 3 deletions deployment/geonode/templates/nginx/nginx-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ spec:
image: "{{ .Values.nginx.image.name }}:{{ .Values.nginx.image.tag }}"

ports:
# TODO (mwall) may respect {{ .Values.geonode.ingress.externalPort | quote }}
- containerPort: 80
name: http
{{- if (eq .Values.geonode.ingress.externalScheme "https" )}}
- containerPort: 443
name: https
{{- else }}
- containerPort: 80
name: http
{{- end }}

volumeMounts:
- name: "{{ include "persistant_volume_name" . }}"
Expand Down
2 changes: 0 additions & 2 deletions deployment/geonode/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ geonode:
externalScheme: http
# -- external ingress hostname
externalDomain: geonode
# -- external ingress port
externalPort: 80
# -- tls certificate for geonode ingress https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/ (for the use of cert-manager, configure the acme section properly). is used when geonode.ingress.externalScheme is set to https
tlsSecret: geonode-tls-secret

Expand Down
1 change: 0 additions & 1 deletion minikube-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ geonode:
enabled: False
externalScheme: http
externalDomain: geonode
externalPort: 80

superUser:
password: geonode
Expand Down

0 comments on commit f907a8a

Please sign in to comment.