Skip to content

Commit ed2df39

Browse files
authored
Merge pull request #27 from holaplex/mpw/add-hub-webhooks
Mpw/add hub webhooks
2 parents d3d1024 + 0461a41 commit ed2df39

File tree

16 files changed

+390
-4
lines changed

16 files changed

+390
-4
lines changed

charts/hub-orgs/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type: application
1818
# This is the chart version. This version number should be incremented each time you make changes
1919
# to the chart and its templates, including the app version.
2020
# Versions are expected to follow Semantic Versioning (https://semver.org/)
21-
version: 0.4.1
21+
version: 0.4.2
2222

2323
# This is the version number of the application being deployed. This version number should be
2424
# incremented each time you make changes to the application. Versions are not expected to

charts/hub-orgs/templates/environment.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ data:
88
KAFKA_BROKERS: {{ required "must set kafka brokers" .kafkaBrokers | quote }}
99
KAFKA_USERNAME: {{ required "must set kafka username" .kafkaUsername | quote }}
1010
KAFKA_SSL: {{ required "must set kafka ssl" .kafkaSsl | quote }}
11-
SVIX_BASE_URL: {{ required "must set svix base url" .svixBaseUrl | quote }}
1211
KETO_READ_URL: {{ required "must set keto read url" .ketoReadUrl | quote }}
1312
KETO_WRITE_URL: {{ required "must set keto write url" .ketoWriteUrl | quote }}
1413
{{- end }}

charts/hub-orgs/templates/secrets.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ metadata:
88
"helm.sh/hook": pre-install
99
type: Opaque
1010
data:
11-
SVIX_AUTH_TOKEN: {{ .entries.svixAuthToken | b64enc }}
1211
DATABASE_URL: {{ .entries.databaseUrl | b64enc }}
1312
KAFKA_PASSWORD: {{ .entries.kafkaPassword | b64enc }}
1413
{{- end }}

charts/hub-orgs/values.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,5 @@ environment:
8484
kafkaBrokers: "hub-eventbus-cluster-0.hub-eventbus-cluster.default.svc.cluster.local.:9093"
8585
kafkaUsername: ""
8686
kafkaSsl: false
87-
svixBaseUrl: http://svix
8887
ketoReadUrl: http://keto-read
8988
ketoWriteUrl: http://keto-write

charts/hub-webhooks/.helmignore

Lines changed: 23 additions & 0 deletions
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/

charts/hub-webhooks/Chart.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: v2
2+
name: hub-webhooks
3+
description: Helm chart for hub-webhooks
4+
maintainers:
5+
- name: Holaplex Engineering
6+
7+
8+
# A chart can be either an 'application' or a 'library' chart.
9+
#
10+
# Application charts are a collection of templates that can be packaged into versioned archives
11+
# to be deployed.
12+
#
13+
# Library charts provide useful utilities or functions for the chart developer. They're included as
14+
# a dependency of application charts to inject those utilities and functions into the rendering
15+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
16+
type: application
17+
18+
# This is the chart version. This version number should be incremented each time you make changes
19+
# to the chart and its templates, including the app version.
20+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
21+
version: 0.1.0
22+
23+
# This is the version number of the application being deployed. This version number should be
24+
# incremented each time you make changes to the application. Versions are not expected to
25+
# follow Semantic Versioning. They should reflect the version the application is using.
26+
# It is recommended to use it with quotes.
27+
appVersion: "0.1.0"
28+
dependencies:
29+
- name: svix
30+
condition: svix.enabled
31+
version: 0.0.1
32+
repository: https://charts.holaplex.com

charts/hub-webhooks/templates/NOTES.txt

Whitespace-only changes.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "hub-webhooks.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 "hub-webhooks.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 "hub-webhooks.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "hub-webhooks.labels" -}}
37+
helm.sh/chart: {{ include "hub-webhooks.chart" . }}
38+
{{ include "hub-webhooks.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 "hub-webhooks.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "hub-webhooks.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 "hub-webhooks.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "hub-webhooks.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "hub-webhooks.fullname" . }}
5+
labels:
6+
{{- include "hub-webhooks.labels" . | nindent 4 }}
7+
spec:
8+
{{- if not .Values.autoscaling.enabled }}
9+
replicas: {{ .Values.replicaCount }}
10+
{{- end }}
11+
selector:
12+
matchLabels:
13+
{{- include "hub-webhooks.selectorLabels" . | nindent 6 }}
14+
template:
15+
metadata:
16+
{{- with .Values.podAnnotations }}
17+
annotations:
18+
{{- toYaml . | nindent 8 }}
19+
{{- end }}
20+
labels:
21+
{{- include "hub-webhooks.selectorLabels" . | nindent 8 }}
22+
spec:
23+
{{- with .Values.imagePullSecrets }}
24+
imagePullSecrets:
25+
{{- toYaml . | nindent 8 }}
26+
{{- end }}
27+
serviceAccountName: {{ include "hub-webhooks.serviceAccountName" . }}
28+
securityContext:
29+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
30+
containers:
31+
- name: {{ .Chart.Name }}
32+
securityContext:
33+
{{- toYaml .Values.securityContext | nindent 12 }}
34+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
35+
imagePullPolicy: {{ .Values.image.pullPolicy }}
36+
envFrom:
37+
- configMapRef:
38+
name: {{ include "hub-webhooks.fullname" . }}
39+
- secretRef:
40+
name: {{ include "hub-webhooks.fullname" . }}
41+
ports:
42+
- name: http
43+
containerPort: {{ .Values.service.port }}
44+
protocol: TCP
45+
livenessProbe:
46+
httpGet:
47+
path: /health
48+
port: http
49+
readinessProbe:
50+
httpGet:
51+
path: /health
52+
port: http
53+
resources:
54+
{{- toYaml .Values.resources | nindent 12 }}
55+
{{- with .Values.nodeSelector }}
56+
nodeSelector:
57+
{{- toYaml . | nindent 8 }}
58+
{{- end }}
59+
{{- with .Values.affinity }}
60+
affinity:
61+
{{- toYaml . | nindent 8 }}
62+
{{- end }}
63+
{{- with .Values.tolerations }}
64+
tolerations:
65+
{{- toYaml . | nindent 8 }}
66+
{{- end }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ include "hub-webhooks.fullname" . }}
5+
data:
6+
{{- with .Values.environment }}
7+
PORT: {{ .port | quote }}
8+
KAFKA_BROKERS: {{ required "must set kafka brokers" .kafkaBrokers | quote }}
9+
KAFKA_USERNAME: {{ required "must set kafka username" .kafkaUsername | quote }}
10+
KAFKA_SSL: {{ required "must set kafka ssl" .kafkaSsl | quote }}
11+
SVIX_BASE_URL: {{ required "must set svix base url" .svixBaseUrl | quote }}
12+
{{- end }}

0 commit comments

Comments
 (0)