Skip to content

Commit 8ce11a9

Browse files
authored
Merge pull request #135 from holaplex/mpw/update-analytics-chart
Mpw/update analytics chart
2 parents f827e0d + 4ec264e commit 8ce11a9

File tree

12 files changed

+144
-81
lines changed

12 files changed

+144
-81
lines changed

.github/workflows/linters/ct.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ chart-repos:
99
- ory=https://k8s.ory.sh/helm/charts
1010
- bitnami=https://charts.bitnami.com/bitnami
1111
- influxdata=https://helm.influxdata.com
12+
- cube=https://gadsme.github.io/charts
1213
helm-extra-args: --timeout 600s
1314
validate-maintainers: false
1415
excluded-charts:

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
helm repo add ory https://k8s.ory.sh/helm/charts
3838
helm repo add bitnami https://charts.bitnami.com/bitnami
3939
helm repo add influxdata https://helm.influxdata.com/
40+
helm repo add cube https://gadsme.github.io/charts
4041
4142
- name: Run chart-releaser
4243
uses: helm/[email protected]

charts/hub-analytics/Chart.lock

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
dependencies:
2-
- name: influxdb2
3-
repository: https://helm.influxdata.com
4-
version: 2.1.1
5-
digest: sha256:0761db11171266c6d37183004b4932b0d83c3af0a617b96b2cf8c56ac32d1347
6-
generated: "2023-03-22T21:44:30.561775-03:00"
2+
- name: cube
3+
repository: https://gadsme.github.io/charts
4+
version: 2.0.1
5+
- name: cubestore
6+
repository: https://gadsme.github.io/charts
7+
version: 0.9.2
8+
digest: sha256:4285f807a53ad6982fbe62d072ee6876cf9702b9f8acd7a3eaca22c00c0afd6d
9+
generated: "2023-08-05T10:56:25.86116-03:00"

charts/hub-analytics/Chart.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type: application
1919
# to the chart and its templates, including the app version.
2020
# Versions are expected to follow Semantic Versioning (https://semver.org/)
2121

22-
version: "0.1.0"
22+
version: 0.2.0
2323

2424
# This is the version number of the application being deployed. This version number should be
2525
# incremented each time you make changes to the application. Versions are not expected to
@@ -28,9 +28,12 @@ version: "0.1.0"
2828
appVersion: "0.1"
2929
sources:
3030
- https://github.com/holaplex/helm-charts
31-
3231
dependencies:
33-
- name: influxdb2
34-
condition: influxdb2.enabled
35-
version: 2.1.1
36-
repository: https://helm.influxdata.com
32+
- name: cube
33+
condition: cube.enabled
34+
version: 2.0.1
35+
repository: https://gadsme.github.io/charts
36+
- name: cubestore
37+
condition: cubestore.enabled
38+
version: 0.9.2
39+
repository: https://gadsme.github.io/charts
18.2 KB
Binary file not shown.
9.84 KB
Binary file not shown.
-7.4 KB
Binary file not shown.

charts/hub-analytics/templates/environment.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,4 @@ data:
88
KAFKA_BROKERS: {{ required "must set kafka brokers" .kafkaBrokers | quote }}
99
KAFKA_SSL: {{ default "false" .kafkaSsl | quote }}
1010
KAFKA_USERNAME: {{ required "must set kafka username" .kafkaUsername | quote }}
11-
DB_URL: {{ required "must set influxdb url" .influxdbUrl | quote }}
12-
DB_BUCKET: {{ required "must set influxdb bucket" .influxdbBucket | quote }}
13-
DB_ORG: {{ required "must set influxdb org" .influxdbOrg | quote }}
1411
{{- end }}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: batch/v1
2+
kind: Job
3+
metadata:
4+
name: "{{ .Release.Name }}-migrate-db"
5+
labels:
6+
{{- include "hub-analytics.labels" . | nindent 4 }}
7+
app.kubernetes.io/component: migrations
8+
annotations:
9+
"helm.sh/hook": pre-install,pre-upgrade
10+
"helm.sh/hook-delete-policy": hook-succeeded
11+
spec:
12+
template:
13+
metadata:
14+
name: "{{ .Release.Name }}-migrate-db"
15+
labels:
16+
{{- include "hub-analytics.labels" . | nindent 8 }}
17+
app.kubernetes.io/component: migrations
18+
spec:
19+
restartPolicy: Never
20+
containers:
21+
- name: migrate
22+
{{- with .Values.migrate.image }}
23+
imagePullPolicy: {{ .pullPolicy }}
24+
image: "{{ .repository }}:{{ .tag }}"
25+
{{- end }}
26+
command: ["/usr/local/bin/migration"]
27+
args: ["-u", "$(DATABASE_URL)"]
28+
env:
29+
- name: DATABASE_URL
30+
valueFrom:
31+
secretKeyRef:
32+
name: {{ include "hub-analytics.fullname" . }}
33+
key: DATABASE_URL
34+
optional: false
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{{- if .Values.networkPolicies.enabled }}
2+
apiVersion: networking.k8s.io/v1
3+
kind: NetworkPolicy
4+
metadata:
5+
name: {{ include "hub-analytics.fullname" . }}
6+
labels:
7+
{{- include "hub-analytics.labels" . | nindent 4 }}
8+
spec:
9+
podSelector:
10+
matchLabels:
11+
{{- include "hub-analytics.selectorLabels" . | nindent 8 }}
12+
egress:
13+
- to:
14+
- podSelector:
15+
matchLabels:
16+
app.kubernetes.io/name: redpanda
17+
ports:
18+
- port: 9092
19+
protocol: TCP
20+
- to:
21+
- podSelector:
22+
matchLabels:
23+
app.kubernetes.io/name: postgresql
24+
ports:
25+
- port: 5432
26+
protocol: TCP
27+
- to:
28+
- namespaceSelector: {}
29+
podSelector:
30+
matchLabels:
31+
k8s-app: kube-dns
32+
ports:
33+
- port: 53
34+
protocol: UDP
35+
- to:
36+
- namespaceSelector:
37+
matchLabels:
38+
kubernetes.io/metadata.name: kube-system
39+
podSelector:
40+
matchLabels:
41+
k8s-app: node-local-dns
42+
ports:
43+
- port: 53
44+
protocol: UDP
45+
{{- if .Values.networkPolicies.extraEgress }}
46+
{{ toYaml .Values.networkPolicies.extraEgress | indent 4 }}
47+
{{- end }}
48+
{{- if .Values.networkPolicies.extraIngress }}
49+
ingress:
50+
{{ toYaml .Values.networkPolicies.extraIngress | indent 4 }}
51+
{{- end }}
52+
policyTypes:
53+
{{- if .Values.networkPolicies.extraIngress }}
54+
- Ingress
55+
{{- end }}
56+
- Egress
57+
{{- end }}

0 commit comments

Comments
 (0)