-
Notifications
You must be signed in to change notification settings - Fork 2
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
add geoserver helm chart #17
base: master
Are you sure you want to change the base?
Conversation
src/geoserver/Chart.yaml
Outdated
@@ -0,0 +1,5 @@ | |||
apiVersion: v1 | |||
appVersion: "1.0" |
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.
is this the GeoServer version?
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.
no geoserver version is specified here:
https://github.com/eHealthAfrica/solution-deployment/blob/gcp_deployment/Kaduna/prod/geoserver/geoserver.yaml#L3
This was generated by helm
set: | ||
curl -v -u admin:geoserver -XPUT -H "Content-type: text/xml" -d @masterpassword.xml masterpassword.xml \ | ||
https://geoserver-kaduna.ehealthafrica.org/geoserver/rest/security/masterpw.xml | ||
--> |
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.
what is this file do?
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.
oops not supposed to be here. it was a the way how to change the default admin and masterpassword
src/geoserver/values.yaml
Outdated
@@ -0,0 +1,68 @@ | |||
# Default values for geoserver. |
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 strip out the ehealth
and nginx
specific info please, I'll put that in the project override
|
||
|
||
|
||
database: |
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.
you can remove this too
src/geoserver/values.yaml
Outdated
instance: | ||
|
||
|
||
resources: {} |
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.
and everything below here
readOnly: true | ||
{{ end }} | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" |
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 please do something like image: "{{ .Values.geoserver.repository }}:{{ .Values.geoserver.tag | default .Chart.AppVersion }}"
(making sure the AppVersion
is corect
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store |
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.
I would remove all these extensions and leave only the ones that apply to our project.
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.
this was generated by helm, i removed some of the unused stuff..
index.yaml
Outdated
digest: 49fbc81f02a96a449dba13e701d819cdcec952305660d5080167f3d5cd8aec18 | ||
name: kernel | ||
urls: | ||
- https://ehealthafrica.github.io/helm-charts/charts/kernel-0.9.0.tgz |
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.
This seems to be adding charts to the index that don't exist. Please remove all the charts that are not strictly the geoserver, if we have to revert this commit we don't want to discard unrelated charts as well.
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.
this file is regenerated every time we publish, so it is not required to track this.
src/geoserver/Chart.yaml
Outdated
appVersion: "2.13.0" | ||
description: A Helm chart for Kubernetes | ||
name: geoserver | ||
version: 0.1.0 |
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.
Is there a reason why we don't start at 0.0.1
?
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.
switched to 0.0.1 for consistency with the other modules
src/geoserver/Chart.yaml
Outdated
@@ -0,0 +1,5 @@ | |||
apiVersion: v1 | |||
appVersion: "2.13.0" | |||
description: A Helm chart for Kubernetes |
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.
Please update the description, this will be visible for users who want to install the chart.
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.
updated
src/geoserver/templates/NOTES.txt
Outdated
{{- else if contains "ClusterIP" .Values.service.type }} | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "geoserver.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") | ||
echo "Visit http://127.0.0.1:8080 to use your application" | ||
kubectl port-forward $POD_NAME 8080:80 |
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.
Are these instructions accurate? Can I access the app if I follow these steps?
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.
update the target port for port-forward
src/geoserver/templates/ingress.yaml
Outdated
@@ -0,0 +1,34 @@ | |||
{{- $serviceName := include "geoserver.name" . -}} | |||
{{- $servicePort := .Values.service.externalPort -}} |
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.
Why add the indirection of a variable for a simple value? If servicePort
is a better name than externalPort
then we should change the value name instead. And why is it only renamed here and not in service.yaml
?
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.
if this is used directly the templating fails, because {{ .Values.service.externalPort }}
can not be resolved inside the loop
# chmod -R 775 /media | ||
# chown -R 1000:101 /media | ||
|
||
{{ else }} |
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.
{{- else }}
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.
removing whitespace here does not make things better but instead can give problems
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ .Chart.Name }} |
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.
In the other charts we added the suffix -pvc
to the claims, so that when in the logs we see the {{ .Chart.Name }}
we know immediately what we are talking about.
containers: | ||
{{ if .Values.provider.gcp }} | ||
- name: cloudsql-proxy | ||
image: gcr.io/cloudsql-docker/gce-proxy:1.11 |
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.
It's useful to have a pullPolicy
for every image, in case we need to force a re-download.
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.
this is unlikely to happen for a 3rd party image, the default of IfNotPresent
should be ok
@@ -0,0 +1,34 @@ | |||
{{- $serviceName := include "geoserver.name" . -}} |
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.
What's the difference between include
and template
? Why do we have a variable for one but not for the other?
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
- name: DEBUG | ||
value: {{ quote .Values.debug }} |
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.
This is inconsistent with how the other charts handle the DEBUG
value. Is this because of an app constraint?
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.
adapted to other charts
src/geoserver/values.yaml
Outdated
data_mount: /opt/geoserver/data_dir | ||
|
||
geoserver: | ||
repository: kartoza/geoserver |
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.
IIRC we call that image
in the other charts.
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.
rearranged structure to match other charts
tag: 2.13.0 | ||
|
||
image: | ||
pullPolicy: IfNotPresent |
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.
Why is this under image
while the image we apply it to under geoserver
? I would move it to geoserver
.
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.
rearranged structure to match other charts
src/geoserver/values.yaml
Outdated
# Declare variables to be passed into your templates. | ||
|
||
replicaCount: 1 | ||
application: |
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 call this app
in the other charts.
periodSeconds: 10 | ||
httpGet: | ||
path: / | ||
port: 8080 |
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.
All these port numbers should use the values defined in the values file.
src/geoserver/values.yaml
Outdated
type: ClusterIP | ||
externalPort: 8080 | ||
internalPort: 8080 | ||
port: 8080 |
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.
Are these 4 values going to change? Do we want to make them configurable? We removed them from the other charts.
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.
port has been unified and updated in all referenced locations
type: {{ .Values.service.type }} | ||
ports: | ||
- port: {{ .Values.service.port }} | ||
targetPort: {{ .Values.service.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.
should be {{ .Values.app.port }}
No description provided.