Skip to content
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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

add geoserver helm chart #17

wants to merge 8 commits into from

Conversation

tremolo
Copy link
Contributor

@tremolo tremolo commented Sep 4, 2018

No description provided.

@tremolo tremolo requested a review from MrPink September 4, 2018 10:30
@MrPink MrPink requested a review from tooxie September 4, 2018 14:13
@@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
-->
Copy link
Contributor

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?

Copy link
Contributor Author

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/templates/deployment.yaml Show resolved Hide resolved
@@ -0,0 +1,68 @@
# Default values for geoserver.
Copy link
Contributor

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:
Copy link
Contributor

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

instance:


resources: {}
Copy link
Contributor

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 }}"
Copy link
Contributor

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

MrPink
MrPink previously approved these changes Sep 4, 2018
# 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
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

appVersion: "2.13.0"
description: A Helm chart for Kubernetes
name: geoserver
version: 0.1.0
Copy link
Contributor

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?

Copy link
Contributor Author

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

@@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "2.13.0"
description: A Helm chart for Kubernetes
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

{{- 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
Copy link
Contributor

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?

Copy link
Contributor Author

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

@@ -0,0 +1,34 @@
{{- $serviceName := include "geoserver.name" . -}}
{{- $servicePort := .Values.service.externalPort -}}
Copy link
Contributor

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?

Copy link
Contributor Author

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 }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{{- else }}

Copy link
Contributor Author

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 }}
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor Author

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" . -}}
Copy link
Contributor

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 }}
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adapted to other charts

data_mount: /opt/geoserver/data_dir

geoserver:
repository: kartoza/geoserver
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor Author

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

# Declare variables to be passed into your templates.

replicaCount: 1
application:
Copy link
Contributor

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
Copy link
Contributor

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.

type: ClusterIP
externalPort: 8080
internalPort: 8080
port: 8080
Copy link
Contributor

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.

Copy link
Contributor Author

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 }}
Copy link
Contributor

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 }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants