Skip to content

Commit

Permalink
Related to magda-io/magda#3229, Use magda-common for docker image rel…
Browse files Browse the repository at this point in the history
…ated logic
  • Loading branch information
t83714 committed Oct 12, 2021
1 parent 977fff6 commit 063bccc
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ magda-tenant-api/lib/

#typescript
tsconfig.tsbuildinfo

deploy/*/charts
1 change: 1 addition & 0 deletions .helmdocsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deploy/*/charts
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,28 @@ Docker image releases can be found from Docker Hub:
https://hub.docker.com/r/data61/magda-minion-visualization/

Development releases (per commit) are also available from [GitHub Registry](https://github.com/magda-io/magda-minion-visualization/packages) and accessible with access token.

## Requirements

Kubernetes: `>= 1.14.0-0`

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

## Values

| Key | Type | Default | Description |
| ---------------------------- | ------ | ---------------------------------------- | ----------- |
| defaultAdminUserId | string | `"00000000-0000-4000-8000-000000000000"` | |
| defaultImage.imagePullSecret | bool | `false` | |
| defaultImage.pullPolicy | string | `"IfNotPresent"` | |
| defaultImage.repository | string | `"docker.io/data61"` | |
| defaultImage.tag | string | `"0.0.57-0"` | |
| global.image | object | `{}` | |
| global.minions.image | object | `{}` | |
| global.rollingUpdate | object | `{}` | |
| image.name | string | `"magda-minion-visualization"` | |
| resources.limits.cpu | string | `"100m"` | |
| resources.requests.cpu | string | `"50m"` | |
| resources.requests.memory | string | `"200Mi"` | |
39 changes: 39 additions & 0 deletions README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## Magda Visualization Minion

![CI Workflow](https://github.com/magda-io/magda-minion-visualization/workflows/Main%20CI%20Workflow/badge.svg?branch=master) [![Release](https://img.shields.io/github/release/magda-io/magda-minion-visualization.svg)](https://github.com/magda-io/magda-minion-visualization/releases)

A [Magda](https://github.com/magda-io/magda) minion is a service that listens for new records or changes to existing records, performs some kind of operation and then writes the result back to the registry. For instance, we have a broken link minion that listens for changes to distributions, retrieves the URLs described, records whether they were able to be accessed successfully and then writes that back to the registry in its own aspect.

Other aspects exist that are written to by many minions - for instance, we have a "quality" aspect that contains a number of different quality ratings from different sources, which are averaged out and used by search.

This magda minion looks into CSV data files and generates useful information for presenting data with charts (e.g. column data type).

### Helm Chart

It's recommanded to deploy minions with as [dependencies](https://helm.sh/docs/topics/chart_best_practices/dependencies/) of a Magda helm deployment. Example can be found from [here](https://github.com/magda-io/magda-config).

- Magda Helm Charts Repository Url: https://charts.magda.io

The [helm chart](https://helm.sh/docs/topics/charts/) for this minion is auto released when a [Github Release](https://help.github.com/en/github/administering-a-repository/creating-releases) is created for this repo.

- Add repository to helm:

```bash
helm repo add magda-io https://charts.magda.io
```

### Docker Image

Docker image releases can be found from Docker Hub:

https://hub.docker.com/r/data61/magda-minion-visualization/

Development releases (per commit) are also available from [GitHub Registry](https://github.com/magda-io/magda-minion-visualization/packages) and accessible with access token.

{{ template "chart.maintainersSection" . }}

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesHeader" . }}

{{ template "chart.valuesTable" . }}
6 changes: 6 additions & 0 deletions deploy/magda-minion-visualization/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-12T15:55:03.187009+11:00"
7 changes: 6 additions & 1 deletion deploy/magda-minion-visualization/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ version: "0.0.57-0"
kubeVersion: ">= 1.14.0-0"
home: "https://github.com/magda-io/magda-minion-visualization"
sources: ["https://github.com/magda-io/magda-minion-visualization"]

annotations:
magdaModuleType: "minio"
dependencies:
- name: magda-common
version: "1.0.0-alpha.4"
repository: "https://charts.magda.io"
13 changes: 3 additions & 10 deletions deploy/magda-minion-visualization/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,11 @@ spec:
labels:
service: minion-visualization
spec:
{{- /*
See chart value file for details of the logic used to generate this setting value below.!!!
*/}}
{{- $imagePullSecret := (ne (.Values.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.image.imagePullSecret ( (ne (.Values.global.minions.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.global.minions.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: minion-visualization
image: "{{ .Values.image.repository | default .Values.global.minions.image.repository | default .Values.global.image.repository | default .Values.defaultImage.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Values.global.minions.image.tag | default .Values.global.image.tag | default .Values.defaultImage.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | default .Values.global.minions.image.pullPolicy | default .Values.global.image.pullPolicy | default .Values.defaultImage.pullPolicy }}
image: {{ include "magda.image" . | quote }}
imagePullPolicy: {{ include "magda.imagePullPolicy" . | quote }}
{{- if .Values.global.enableLivenessProbes }}
livenessProbe:
httpGet:
Expand Down
2 changes: 0 additions & 2 deletions deploy/magda-minion-visualization/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ global:
image:
name: "magda-minion-visualization"
# repository:
# tag:
# pullPolicy:
# imagePullSecret:

defaultImage:
repository: docker.io/data61
tag: 0.0.57-0
pullPolicy: IfNotPresent
imagePullSecret: false

Expand Down

0 comments on commit 063bccc

Please sign in to comment.