Skip to content

Commit

Permalink
fix: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickleet committed Oct 25, 2022
1 parent 211a724 commit f33d7bf
Show file tree
Hide file tree
Showing 16 changed files with 1,069 additions and 1,073 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
draft.toml
helm/
charts/
NOTICE
LICENSE
README.md
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,5 @@ dist
jest_0
.queues
.queues.*
secrets
secrets
/tmp
3 changes: 3 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"sourceMaps": true,
"trace": true,
"outputCapture": "std",
"env": {
"DEBUG": "example:*"
}
}
]
}
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SERVICE_NAME := example-hasura-denormalizer
SERVICE_NAME := example-hasura-projections-service
NOW := $(shell date +%m_%d_%Y_%H_%M)
LOCAL_DEV_CLUSTER ?= kind-local-dev-cluster
LOCAL_DEV_CLUSTER ?= rancher-desktop

install:
npm ci
Expand All @@ -24,7 +24,7 @@ build-new-local-image:

load-local-image-to-kind:
kubectl ctx $(LOCAL_DEV_CLUSTER)
kind --name local-dev-cluster load docker-image dev.local/$(SERVICE_NAME):$(NOW)
kind --name kind-local-dev-cluster load docker-image dev.local/$(SERVICE_NAME):$(NOW)

deploy-to-local-cluster:
kubectl ctx $(LOCAL_DEV_CLUSTER)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# example-hasura-denormalizer
# example-hasura-projections-service

Recieves events from models and updates readmodel data accordingly
Recieves events from models and updates readmodel data via Hasura API

## Running

Expand Down
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
description: A Helm chart for Kubernetes
icon: https://raw.githubusercontent.com/jenkins-x/jenkins-x-platform/d273e09/images/nodejs.png
name: example-hasura-denormalizer
version: 0.1.0-SNAPSHOT
name: example-hasura-projections-service
version: dev
48 changes: 0 additions & 48 deletions helm/Makefile

This file was deleted.

18 changes: 5 additions & 13 deletions helm/templates/ksvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,15 @@ spec:
env:
- name: HASURA_URL
value: http://example-hasura.{{ .Release.Namespace }}.svc.cluster.local
- name: HASURA_ADMIN_SECRET
valueFrom:
secretKeyRef:
name: example-hasura
key: adminSecret
{{- range $pkey, $pval := .Values.env }}
- name: {{ $pkey }}
value: {{ quote $pval }}
{{- end }}
livenessProbe:
httpGet:
path: {{ .Values.livenessProbe.probePath | default .Values.probePath }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
readinessProbe:
httpGet:
path: {{ .Values.livenessProbe.probePath | default .Values.probePath }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
resources:
{{ toYaml .Values.resources | indent 10 }}
{{- end }}
Expand Down
25 changes: 25 additions & 0 deletions helm/templates/web3auth.user-created.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: eventing.knative.dev/v1
kind: Trigger
metadata:
name: web3auth.user-created
spec:
broker: web3auth-events
filter:
attributes:
type: web3auth.user-created
subscriber:
{{- if .Values.knative.eventing.local }}
uri: {{ .Values.knative.eventing.subscriber }}/cloudevent/web3auth.user-created
{{- else }}
ref:
{{- if .Values.knativeDeploy }}
apiVersion: serving.knative.dev/v1
kind: Service
name: {{ .Values.service.name }}
{{- else }}
apiVersion: v1
kind: Service
name: {{ .Values.service.name }}
{{- end }}
uri: /cloudevent/web3auth.user-created
{{- end }}
25 changes: 25 additions & 0 deletions helm/templates/web3auth.user-updated.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: eventing.knative.dev/v1
kind: Trigger
metadata:
name: web3auth.user-updated
spec:
broker: web3auth-events
filter:
attributes:
type: web3auth.user-updated
subscriber:
{{- if .Values.knative.eventing.local }}
uri: {{ .Values.knative.eventing.subscriber }}/cloudevent/web3auth.user-updated
{{- else }}
ref:
{{- if .Values.knativeDeploy }}
apiVersion: serving.knative.dev/v1
kind: Service
name: {{ .Values.service.name }}
{{- else }}
apiVersion: v1
kind: Service
name: {{ .Values.service.name }}
{{- end }}
uri: /cloudevent/web3auth.user-updated
{{- end }}
4 changes: 2 additions & 2 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ env:
runIntegrationTests: false

service:
name: example-hasura-denormalizer
internalPort: 3000
name: example-hasura-projections-service
internalPort: 5010
externalPort: 80

probePath: /health
Expand Down
Loading

0 comments on commit f33d7bf

Please sign in to comment.