-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(helm): initial datatlas helm config
* chore(helm): initial datatlas helm config * chore(helm): update readme with helm instruction * fix(helm): pgadmin permissions on container init * chore(lint): ignore Helm config files * chore: add helm folder to prettier ignore list * chore(cs): fix README format * fix(helm) Rename example.values.yml to example.values.yaml --------- Co-authored-by: Johan Dufour <[email protected]> Co-authored-by: lutangar <[email protected]>
- Loading branch information
1 parent
2add378
commit 9e21ab9
Showing
15 changed files
with
367 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
node_modules | ||
helm/**/*.yml | ||
helm/**/*.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,3 +43,7 @@ Thumbs.db | |
# Generated Docusaurus files | ||
.docusaurus/ | ||
.cache-loader/ | ||
|
||
|
||
# Helm Chart | ||
helm/values.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
coverage/ | ||
dist/ | ||
apps/frontend/public/mockServiceWorker.js | ||
helm/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 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 | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: v2 | ||
name: datatlas-chart | ||
description: A Helm chart for Datatlas | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "1.16.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
backend: | ||
container: | ||
name: frontend-container | ||
strategy: | ||
type: Recreate | ||
image: | ||
repository: erasme/datatlas-backend | ||
tag: dev | ||
pullPolicy: Always | ||
service: | ||
type: ClusterIP | ||
port: 3333 | ||
targetPort: 3333 | ||
env: | ||
POSTGRES_USER: docker | ||
POSTGRES_PASSWORD: mypassword | ||
POSTGRES_DATABASE: datatlas | ||
POSTGRES_HOST: postgis | ||
POSTGRES_PORT: "5432" | ||
PASSWORD_SALT: mypassword | ||
ADMIN_EMAIL: [email protected] | ||
ADMIN_PASSWORD: admin | ||
DUMMY_EDITOR_EMAIL: [email protected] | ||
DUMMY_EDITOR_PASSWORD: editor | ||
PAYLOAD_SIZE_LIMIT: 25mb | ||
|
||
frontend: | ||
container: | ||
name: frontend-container | ||
strategy: | ||
type: Recreate | ||
image: | ||
repository: erasme/datatlas-frontend | ||
tag: dev | ||
pullPolicy: Always | ||
service: | ||
type: ClusterIP | ||
port: 8080 | ||
targetPort: 8080 | ||
env: | ||
REACT_APP_DEFAULT_LOCALE: fr | ||
REACT_APP_MAPBOX_ACCESS_TOKEN: mapxbox-token | ||
REACT_APP_API_BASE_URL: https://mybackend/api | ||
REACT_APP_MATOMO_SITE_ID: "172" | ||
REACT_APP_MATOMO_TRACKER_URL: "//trackinginfo/" | ||
REACT_APP_CONTACT_EMAIL: [email protected] | ||
REACT_APP_MAX_TOOLIP_FIELDS: "3" | ||
|
||
postgisPgadmin: | ||
strategy: | ||
type: Recreate | ||
replicaCount: 1 | ||
postgis: | ||
image: kartoza/postgis:15-3.3 | ||
env: | ||
POSTGRES_DB: postgres | ||
POSTGRES_USER: docker | ||
POSTGRES_PASS: mypassword | ||
volumeMounts: | ||
- mountPath: /var/lib/postgresql | ||
subPath: postgis | ||
pgadmin: | ||
image: dpage/pgadmin4 | ||
env: | ||
PGADMIN_DEFAULT_EMAIL: [email protected] | ||
PGADMIN_DEFAULT_PASSWORD: mypassword | ||
volumeMounts: | ||
- mountPath: /var/lib/pgadmin | ||
subPath: pgadmin | ||
debian: | ||
image: debian | ||
command: ["tail", "-f", "/dev/null"] | ||
volumeMounts: | ||
- mountPath: /var/lib/pgadmin | ||
volume: | ||
name: datatlas-dev | ||
persistentVolumeClaim: | ||
claimName: datatlas-dev | ||
|
||
postgisService: | ||
type: ClusterIP | ||
port: 5432 | ||
targetPort: 5432 | ||
|
||
pgadminService: | ||
type: ClusterIP | ||
port: 80 | ||
targetPort: 80 | ||
|
||
pvc: | ||
datatlasDev: | ||
name: datatlas-dev | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
# Uncomment and modify the following line if you need to specify a StorageClass | ||
storageClassName: "scw-bssd" | ||
#storageClassName: "local-path" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Values.backend.name | default "backend" }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
workload.user.cattle.io/workloadselector: apps.deployment-{{ .Release.Namespace }}-backend | ||
spec: | ||
replicas: {{ .Values.backend.replicas | default 1 }} | ||
selector: | ||
matchLabels: | ||
workload.user.cattle.io/workloadselector: apps.deployment-{{ .Release.Namespace }}-backend | ||
strategy: | ||
type: {{ .Values.backend.strategy.type | default "Recreate" }} | ||
template: | ||
metadata: | ||
labels: | ||
workload.user.cattle.io/workloadselector: apps.deployment-{{ .Release.Namespace }}-backend | ||
spec: | ||
containers: | ||
- name: {{ .Values.backend.container.name | default "backend" }} | ||
image: "{{ .Values.backend.image.repository }}:{{ .Values.backend.image.tag | default "dev" }}" | ||
imagePullPolicy: {{ .Values.backend.image.pullPolicy | default "Always" }} | ||
env: | ||
{{- range $key, $value := .Values.backend.env }} | ||
- name: {{ $key }} | ||
value: {{ $value | quote }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Values.frontend.name | default "frontend" }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
workload.user.cattle.io/workloadselector: apps.deployment-{{ .Release.Namespace }}-frontend | ||
spec: | ||
replicas: {{ .Values.frontend.replicas | default 1 }} | ||
selector: | ||
matchLabels: | ||
workload.user.cattle.io/workloadselector: apps.deployment-{{ .Release.Namespace }}-frontend | ||
strategy: | ||
type: {{ .Values.frontend.strategy.type | default "Recreate" }} | ||
template: | ||
metadata: | ||
labels: | ||
workload.user.cattle.io/workloadselector: apps.deployment-{{ .Release.Namespace }}-frontend | ||
spec: | ||
containers: | ||
- name: {{ .Values.frontend.container.name | default "frontend" }} | ||
image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag | default "dev" }}" | ||
imagePullPolicy: {{ .Values.frontend.image.pullPolicy | default "Always" }} | ||
env: | ||
{{- range $key, $value := .Values.frontend.env }} | ||
- name: {{ $key }} | ||
value: {{ $value | quote }} | ||
{{- end }} |
61 changes: 61 additions & 0 deletions
61
helm/templates/deployments/postgis-pgadmin-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: postgis-pgadmin | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
workload.user.cattle.io/workloadselector: apps.deployment-{{ .Release.Namespace }}-postgis-pgadmin | ||
spec: | ||
replicas: {{ .Values.postgisPgadmin.replicaCount }} | ||
selector: | ||
matchLabels: | ||
workload.user.cattle.io/workloadselector: apps.deployment-{{ .Release.Namespace }}-postgis-pgadmin | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
workload.user.cattle.io/workloadselector: apps.deployment-{{ .Release.Namespace }}-postgis-pgadmin | ||
spec: | ||
initContainers: | ||
- name: debian-setup | ||
image: "{{ .Values.postgisPgadmin.debian.image }}" | ||
command: ["sh", "-c", "chown -R 5050:5050 /var/lib/pgadmin"] | ||
volumeMounts: | ||
{{- range .Values.postgisPgadmin.debian.volumeMounts }} | ||
- mountPath: {{ .mountPath }} | ||
name: {{ $.Values.postgisPgadmin.volume.name }} | ||
{{- end }} | ||
containers: | ||
- name: postgis | ||
image: "{{ .Values.postgisPgadmin.postgis.image }}" | ||
env: | ||
- name: POSTGRES_DB | ||
value: "{{ .Values.postgisPgadmin.postgis.env.POSTGRES_DB }}" | ||
- name: POSTGRES_USER | ||
value: "{{ .Values.postgisPgadmin.postgis.env.POSTGRES_USER }}" | ||
- name: POSTGRES_PASS | ||
value: "{{ .Values.postgisPgadmin.postgis.env.POSTGRES_PASS }}" | ||
volumeMounts: | ||
{{- range .Values.postgisPgadmin.postgis.volumeMounts }} | ||
- mountPath: {{ .mountPath }} | ||
name: {{ $.Values.postgisPgadmin.volume.name }} | ||
subPath: {{ .subPath }} | ||
{{- end }} | ||
- name: pgadmin | ||
image: "{{ .Values.postgisPgadmin.pgadmin.image }}" | ||
env: | ||
- name: PGADMIN_DEFAULT_EMAIL | ||
value: "{{ .Values.postgisPgadmin.pgadmin.env.PGADMIN_DEFAULT_EMAIL }}" | ||
- name: PGADMIN_DEFAULT_PASSWORD | ||
value: "{{ .Values.postgisPgadmin.pgadmin.env.PGADMIN_DEFAULT_PASSWORD }}" | ||
volumeMounts: | ||
{{- range .Values.postgisPgadmin.pgadmin.volumeMounts }} | ||
- mountPath: {{ .mountPath }} | ||
name: {{ $.Values.postgisPgadmin.volume.name }} | ||
subPath: {{ .subPath }} | ||
{{- end }} | ||
volumes: | ||
- name: {{ .Values.postgisPgadmin.volume.name }} | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.postgisPgadmin.volume.persistentVolumeClaim.claimName }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: {{ .Values.pvc.datatlasDev.name }} | ||
spec: | ||
accessModes: {{ toYaml .Values.pvc.datatlasDev.accessModes | nindent 4 }} | ||
resources: | ||
requests: | ||
storage: {{ .Values.pvc.datatlasDev.resources.requests.storage }} | ||
# Uncomment the following line if you're specifying a StorageClass | ||
storageClassName: {{ .Values.pvc.datatlasDev.storageClassName | quote }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
name: {{ .Values.frontend.name | default "frontend" }} | ||
metadata: | ||
name: {{ .Values.backend.name | default "backend" }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
clusterIP: None | ||
type: {{ .Values.backend.service.type }} | ||
ports: | ||
- name: http | ||
port: {{ .Values.backend.service.port }} | ||
targetPort: {{ .Values.backend.service.targetPort }} | ||
protocol: TCP | ||
selector: | ||
workload.user.cattle.io/workloadselector: apps.deployment-{{ .Release.Namespace }}-backend | ||
strategy: | ||
type: {{ .Values.frontend.strategy.type | default "Recreate" }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
name: {{ .Values.frontend.name | default "frontend" }} | ||
metadata: | ||
name: {{ .Values.frontend.name | default "frontend" }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
clusterIP: None | ||
type: {{ .Values.frontend.service.type }} | ||
ports: | ||
- name: http | ||
port: {{ .Values.frontend.service.port }} | ||
targetPort: {{ .Values.frontend.service.targetPort }} | ||
protocol: TCP | ||
selector: | ||
workload.user.cattle.io/workloadselector: apps.deployment-{{ .Release.Namespace }}-frontend | ||
strategy: | ||
type: {{ .Values.frontend.strategy.type | default "Recreate" }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: pgadmin | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
clusterIP: None | ||
type: {{ .Values.postgisPgadmin.pgadminService.type }} | ||
ports: | ||
- name: http | ||
port: {{ .Values.postgisPgadmin.pgadminService.port }} | ||
targetPort: {{ .Values.postgisPgadmin.pgadminService.targetPort }} | ||
protocol: TCP | ||
selector: | ||
workload.user.cattle.io/workloadselector: apps.deployment-{{ .Release.Namespace }}-postgis-pgadmin | ||
strategy: | ||
type: {{ .Values.frontend.strategy.type | default "Recreate" }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: postgis | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
clusterIP: None | ||
type: {{ .Values.postgisPgadmin.postgisService.type }} | ||
ports: | ||
- name: postgis | ||
port: {{ .Values.postgisPgadmin.postgisService.port }} | ||
targetPort: {{ .Values.postgisPgadmin.postgisService.targetPort }} | ||
protocol: TCP | ||
selector: | ||
workload.user.cattle.io/workloadselector: apps.deployment-{{ .Release.Namespace }}-postgis-pgadmin | ||
strategy: | ||
type: {{ .Values.frontend.strategy.type | default "Recreate" }} |