Skip to content

Commit ee750b0

Browse files
committed
Add huginn chart.
1 parent 52a3c53 commit ee750b0

16 files changed

+537
-1
lines changed

docs/huginn-1.0.0.tgz

36 KB
Binary file not shown.

docs/huginn.png

11.7 KB
Loading

docs/index.yaml

+44-1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,49 @@ entries:
9696
urls:
9797
- https://utkuozdemir.org/helm-charts/gohttpserver-0.1.0.tgz
9898
version: 0.1.0
99+
huginn:
100+
- annotations:
101+
artifacthub.io/changes: |
102+
- Initial release
103+
artifacthub.io/images: |
104+
- name: huginn/huginn
105+
image: docker.io/huginn/huginn-single-process:4d17829cf6b15b004ad3f4be196303dca4944810
106+
- name: bitnami/mysql
107+
image: docker.io/bitnami/mysql:8.0.23-debian-10-r28
108+
- name: bitnami/bitnami-shell
109+
image: docker.io/bitnami/bitnami-shell:10
110+
artifacthub.io/license: MIT
111+
apiVersion: v2
112+
appVersion: 4d17829cf6b15b004ad3f4be196303dca4944810
113+
created: "2021-03-07T00:09:47.657549+01:00"
114+
dependencies:
115+
- condition: mysql.install
116+
name: mysql
117+
repository: https://charts.bitnami.com/bitnami
118+
version: 8.4.4
119+
description: Huginn Helm chart based on its official Docker image
120+
digest: e11f6ab7767460c11af7a7901387b3d222e834c2a4780d53947936771a1cfe57
121+
home: https://github.com/huginn/huginn
122+
icon: https://utkuozdemir.org/helm-charts/huginn.png
123+
keywords:
124+
- huginn
125+
- scraper
126+
- agent
127+
- automation
128+
- webscraping
129+
- rss
130+
maintainers:
131+
132+
name: Utku Özdemir
133+
url: https://utkuozdemir.org
134+
name: huginn
135+
sources:
136+
- https://github.com/huginn/huginn
137+
- https://github.com/utkuozdemir/helm-charts
138+
type: application
139+
urls:
140+
- https://utkuozdemir.org/helm-charts/huginn-1.0.0.tgz
141+
version: 1.0.0
99142
jellyfin:
100143
- apiVersion: v2
101144
appVersion: 10.6.4-1-ls82
@@ -297,4 +340,4 @@ entries:
297340
urls:
298341
- https://utkuozdemir.org/helm-charts/transmission-openvpn-0.1.0.tgz
299342
version: 0.1.0
300-
generated: "2021-02-18T21:29:04.741449+01:00"
343+
generated: "2021-03-07T00:09:47.653369+01:00"

huginn/.helmignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

huginn/Chart.lock

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: mysql
3+
repository: https://charts.bitnami.com/bitnami
4+
version: 8.4.4
5+
digest: sha256:f0e62276d8b19e9d6cdcade2c3ab1fe9cd593c9d79de7a4150f7d95060e501e1
6+
generated: "2021-03-05T21:56:44.157066+01:00"

huginn/Chart.yaml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
apiVersion: v2
2+
name: huginn
3+
description: Huginn Helm chart based on its official Docker image
4+
type: application
5+
version: 1.0.0
6+
appVersion: 4d17829cf6b15b004ad3f4be196303dca4944810
7+
home: https://github.com/huginn/huginn
8+
keywords:
9+
- huginn
10+
- scraper
11+
- agent
12+
- automation
13+
- webscraping
14+
- rss
15+
sources:
16+
- https://github.com/huginn/huginn
17+
- https://github.com/utkuozdemir/helm-charts
18+
icon: https://utkuozdemir.org/helm-charts/huginn.png
19+
maintainers:
20+
- name: Utku Özdemir
21+
22+
url: https://utkuozdemir.org
23+
annotations:
24+
artifacthub.io/license: MIT
25+
artifacthub.io/changes: |
26+
- Initial release
27+
artifacthub.io/images: |
28+
- name: huginn/huginn
29+
image: docker.io/huginn/huginn-single-process:4d17829cf6b15b004ad3f4be196303dca4944810
30+
- name: bitnami/mysql
31+
image: docker.io/bitnami/mysql:8.0.23-debian-10-r28
32+
- name: bitnami/bitnami-shell
33+
image: docker.io/bitnami/bitnami-shell:10
34+
dependencies:
35+
- name: mysql
36+
repository: https://charts.bitnami.com/bitnami
37+
version: 8.4.4
38+
condition: mysql.install

huginn/templates/NOTES.txt

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
1. Get the application URL by running these commands:
2+
{{- if .Values.ingress.enabled }}
3+
{{- range $host := .Values.ingress.hosts }}
4+
{{- range .paths }}
5+
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
6+
{{- end }}
7+
{{- end }}
8+
{{- else if contains "NodePort" .Values.service.type }}
9+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "huginn.fullname" . }})
10+
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
11+
echo http://$NODE_IP:$NODE_PORT
12+
{{- else if contains "LoadBalancer" .Values.service.type }}
13+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
14+
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "huginn.fullname" . }}'
15+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "huginn.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
16+
echo http://$SERVICE_IP:{{ .Values.service.port }}
17+
{{- else if contains "ClusterIP" .Values.service.type }}
18+
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "huginn.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
19+
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
20+
echo "Visit http://127.0.0.1:8080 to use your application"
21+
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
22+
{{- end }}

huginn/templates/_helpers.tpl

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "huginn.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "huginn.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "huginn.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "huginn.labels" -}}
37+
helm.sh/chart: {{ include "huginn.chart" . }}
38+
{{ include "huginn.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "huginn.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "huginn.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "huginn.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "huginn.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}

huginn/templates/configmap.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ include "huginn.fullname" . }}
5+
labels:
6+
{{- include "huginn.labels" . | nindent 4 }}
7+
data:
8+
{{- if not .Values.seed.enabled }}
9+
DO_NOT_SEED: "true"
10+
{{- end }}
11+
HUGINN_DATABASE_ADAPTER: mysql2
12+
HUGINN_DATABASE_NAME: {{ .Values.mysql.auth.database | quote }}
13+
HUGINN_DATABASE_HOST: {{ include "huginn.fullname" . }}-mysql
14+
HUGINN_DATABASE_PORT: {{ .Values.mysql.primary.service.port | quote }}
15+
HUGINN_PORT: {{ .Values.web.port | quote }}

huginn/templates/deployment-web.yaml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "huginn.fullname" . }}-web
5+
labels:
6+
{{- include "huginn.labels" . | nindent 4 }}
7+
app.kubernetes.io/component: web
8+
spec:
9+
strategy:
10+
type: {{ .Values.web.updateStrategy }}
11+
replicas: {{ .Values.web.replicaCount }}
12+
selector:
13+
matchLabels:
14+
{{- include "huginn.selectorLabels" . | nindent 6 }}
15+
app.kubernetes.io/component: web
16+
template:
17+
metadata:
18+
annotations:
19+
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
20+
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
21+
{{- with .Values.web.podAnnotations }}
22+
{{- toYaml . | nindent 8 }}
23+
{{- end }}
24+
labels:
25+
{{- include "huginn.selectorLabels" . | nindent 8 }}
26+
app.kubernetes.io/component: web
27+
spec:
28+
{{- with .Values.imagePullSecrets }}
29+
imagePullSecrets:
30+
{{- toYaml . | nindent 8 }}
31+
{{- end }}
32+
serviceAccountName: {{ include "huginn.serviceAccountName" . }}
33+
securityContext:
34+
{{- toYaml .Values.web.podSecurityContext | nindent 8 }}
35+
containers:
36+
- name: {{ .Chart.Name }}-web
37+
securityContext:
38+
{{- toYaml .Values.web.securityContext | nindent 12 }}
39+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
40+
imagePullPolicy: {{ .Values.image.pullPolicy }}
41+
envFrom:
42+
- configMapRef:
43+
name: {{ include "huginn.fullname" . }}
44+
- secretRef:
45+
name: {{ include "huginn.fullname" . }}
46+
ports:
47+
- name: http
48+
containerPort: {{ .Values.web.port }}
49+
protocol: TCP
50+
livenessProbe:
51+
httpGet:
52+
path: /
53+
port: http
54+
readinessProbe:
55+
httpGet:
56+
path: /
57+
port: http
58+
resources:
59+
{{- toYaml .Values.web.resources | nindent 12 }}
60+
{{- with .Values.web.nodeSelector }}
61+
nodeSelector:
62+
{{- toYaml . | nindent 8 }}
63+
{{- end }}
64+
{{- with .Values.web.affinity }}
65+
affinity:
66+
{{- toYaml . | nindent 8 }}
67+
{{- end }}
68+
{{- with .Values.web.tolerations }}
69+
tolerations:
70+
{{- toYaml . | nindent 8 }}
71+
{{- end }}
+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "huginn.fullname" . }}-worker
5+
labels:
6+
{{- include "huginn.labels" . | nindent 4 }}
7+
app.kubernetes.io/component: worker
8+
spec:
9+
strategy:
10+
type: {{ .Values.worker.updateStrategy }}
11+
replicas: {{ .Values.worker.replicaCount }}
12+
selector:
13+
matchLabels:
14+
{{- include "huginn.selectorLabels" . | nindent 6 }}
15+
app.kubernetes.io/component: worker
16+
template:
17+
metadata:
18+
annotations:
19+
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
20+
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
21+
{{- with .Values.worker.podAnnotations }}
22+
{{- toYaml . | nindent 8 }}
23+
{{- end }}
24+
labels:
25+
{{- include "huginn.selectorLabels" . | nindent 8 }}
26+
app.kubernetes.io/component: worker
27+
spec:
28+
{{- with .Values.imagePullSecrets }}
29+
imagePullSecrets:
30+
{{- toYaml . | nindent 8 }}
31+
{{- end }}
32+
serviceAccountName: {{ include "huginn.serviceAccountName" . }}
33+
securityContext:
34+
{{- toYaml .Values.worker.podSecurityContext | nindent 8 }}
35+
containers:
36+
- name: {{ .Chart.Name }}-worker
37+
command:
38+
- /scripts/init
39+
- bin/threaded.rb
40+
securityContext:
41+
{{- toYaml .Values.worker.securityContext | nindent 12 }}
42+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
43+
imagePullPolicy: {{ .Values.image.pullPolicy }}
44+
envFrom:
45+
- configMapRef:
46+
name: {{ include "huginn.fullname" . }}
47+
- secretRef:
48+
name: {{ include "huginn.fullname" . }}
49+
resources:
50+
{{- toYaml .Values.worker.resources | nindent 12 }}
51+
{{- with .Values.worker.nodeSelector }}
52+
nodeSelector:
53+
{{- toYaml . | nindent 8 }}
54+
{{- end }}
55+
{{- with .Values.worker.affinity }}
56+
affinity:
57+
{{- toYaml . | nindent 8 }}
58+
{{- end }}
59+
{{- with .Values.worker.tolerations }}
60+
tolerations:
61+
{{- toYaml . | nindent 8 }}
62+
{{- end }}

0 commit comments

Comments
 (0)