Skip to content

Commit

Permalink
Merge pull request #17 from magda-io/use-magda-common
Browse files Browse the repository at this point in the history
Use magda common
  • Loading branch information
t83714 committed Oct 11, 2021
2 parents 97b80fa + 81803e6 commit bb47898
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
node-version: 10
- run: yarn install
- run: yarn build

- name: helm-build-dependencies
run: yarn update-all-charts

- run: yarn helm-lint

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
node-version: 10
- run: yarn install
- run: yarn build


- name: helm-build-dependencies
run: yarn update-all-charts

- name: helm-check
run: yarn helm-lint
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ wwwroot/privateconfig.json
deploy/packages/
deploy/work/
packages/

deploy/**/charts
1 change: 1 addition & 0 deletions .helmdocsignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
deploy/helm/terria
deploy/helm/magda-preview-map/charts
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

> The repo was part of [magda main repo](https://github.com/magda-io/magda). For history before v0.0.58, please check [CHANGES.md of main repo](https://github.com/magda-io/magda/blob/master/CHANGES.md).
## 1.1.0
- Related to https://github.com/magda-io/magda/issues/3229, Use magda-common for docker image related logic
- Fixed: Should not set `replicas` when `autoscaler` is enabled

## 1.0.1
- improve ci scripts & setup helm-docs
- #12 make preview map support format string: "ESRI MapServer" & "ESRI FeatureServer"
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# magda-preview-map

![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square)
![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square)

A Helm chart for Magda Preview Map module - forked from Terria Map Repo

Expand All @@ -16,6 +16,10 @@ See the [TerriaJS README](https://github.com/TerriaJS/TerriaJS) or [TerriaMap Re

Kubernetes: `>= 1.14.0-0`

| Repository | Name | Version |
|------------|------|---------|
| https://charts.magda.io | magda-common | 1.0.0-alpha.4 |

## Values

| Key | Type | Default | Description |
Expand Down
6 changes: 6 additions & 0 deletions deploy/helm/magda-preview-map/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: magda-common
repository: https://charts.magda.io
version: 1.0.0-alpha.4
digest: sha256:a5dcf2df16ca5a3972f92d91434c2e78be0ce411994d2a3cb89c674a711ddc24
generated: "2021-10-11T19:45:18.475213+11:00"
6 changes: 5 additions & 1 deletion deploy/helm/magda-preview-map/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
apiVersion: v2
description: A Helm chart for Magda Preview Map module - forked from Terria Map Repo
name: magda-preview-map
version: 1.0.1
version: 1.1.0
kubeVersion: ">= 1.14.0-0"
home: "https://github.com/magda-io/magda-preview-map"
sources: [ "https://github.com/magda-io/magda-preview-map" ]
dependencies:
- name: magda-common
version: "1.0.0-alpha.4"
repository: "https://charts.magda.io"
12 changes: 4 additions & 8 deletions deploy/helm/magda-preview-map/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: preview-map
spec:
{{- if .Values.autoscaler.enabled }}
{{- if empty .Values.autoscaler.enabled }}
replicas: {{ .Values.replicas | default 1 }}
{{- end }}
strategy:
Expand All @@ -19,11 +19,7 @@ spec:
labels:
service: preview-map
spec:
{{- $imagePullSecret := (ne (.Values.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.image.imagePullSecret ( (ne (.Values.global.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.global.image.imagePullSecret .Values.defaultImage.imagePullSecret ) -}}
{{- if ne ($imagePullSecret | toString) "false" }}
imagePullSecrets:
- name: {{ $imagePullSecret }}
{{- end }}
{{- include "magda.imagePullSecrets" . | indent 6 }}
containers:
- name: preview-map
resources:
Expand All @@ -40,8 +36,8 @@ spec:
env:
- name: NODE_ENV
value: production
image: "{{ .Values.image.repository | default .Values.global.image.repository | default .Values.defaultImage.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Values.global.image.tag | default .Chart.Version }}"
imagePullPolicy: {{ .Values.image.pullPolicy | default .Values.global.image.pullPolicy }}
image: {{ include "magda.image" . | quote }}
imagePullPolicy: {{ include "magda.imagePullPolicy" . | quote }}
command:
- "node"
- "node_modules/terriajs-server/lib/app.js"
Expand Down
1 change: 0 additions & 1 deletion deploy/helm/magda-preview-map/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ global:

# image setting loadding order: (from higher priority to lower priority)
# - Values.image.x
# - Values.global.image.x
# - Values.defaultImage.x
# You can set `imagePullSecret` value to `false` (bool) to reset the value (see example below)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magda/preview-map",
"version": "1.0.1",
"version": "1.1.0",
"description": "Geospatial preview based on TerriaJS.",
"license": "Apache-2.0",
"engines": {
Expand Down

0 comments on commit bb47898

Please sign in to comment.