Skip to content

Commit

Permalink
Deploy HeyFil API on dev and prod with persistent storage
Browse files Browse the repository at this point in the history
Deploy the latest HeyFil service on dev and prod that introduces a REST
API for querying SP information as well as local storage for quick
resumption of metrics on restart.
  • Loading branch information
masih committed Jul 6, 2023
1 parent 8cecfd2 commit 5f72603
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 4 deletions.
2 changes: 2 additions & 0 deletions deploy/manifests/base/heyfil/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ spec:
ports:
- containerPort: 8080
name: metrics
- containerPort: 8081
name: api
1 change: 1 addition & 0 deletions deploy/manifests/base/heyfil/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Kustomization

resources:
- deployment.yaml
- service.yaml

commonLabels:
app: heyfil
14 changes: 14 additions & 0 deletions deploy/manifests/base/heyfil/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
kind: Service
apiVersion: v1
metadata:
name: heyfil
spec:
ports:
- name: metrics
port: 8080
targetPort: metrics
- name: api
port: 8081
targetPort: api
selector:
app: heyfil
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@ spec:
- name: heyfil
args:
- '--httpIndexerEndpoint=https://dev.cid.contact'
- '--storePath=/store'
resources:
limits:
cpu: "2"
memory: 2Gi
requests:
cpu: "2"
memory: 2Gi

volumeMounts:
- name: store
mountPath: /store
volumes:
- name: store
persistentVolumeClaim:
claimName: heyfil
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: heyfil
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt"
nginx.ingress.kubernetes.io/enable-cors: "true"
spec:
tls:
- hosts:
- heyfil.dev.cid.contact
secretName: heyfil-ingress-tls
rules:
- host: heyfil.dev.cid.contact
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: heyfil
port:
name: api
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ namespace: storetheindex
resources:
- ../../../../../base/heyfil
- monitor.yaml
- pvc.yaml
- ingress.yaml

patchesStrategicMerge:
- deployment.yaml

images:
- name: heyfil
newName: 407967248065.dkr.ecr.us-east-2.amazonaws.com/ipni/heyfil
newTag: 20230614095932-b27edd5517dd460dda4ea456cd55c323046df5c4
newTag: 20230706124905-cf3b03385090e32fdf35fd6974dbc8e881f1cab1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: heyfil
name: heyfil
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Mi
storageClassName: gp3
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,20 @@ spec:
spec:
containers:
- name: heyfil
args:
- '--httpIndexerEndpoint=https://cid.contact'
- '--storePath=/store'
resources:
limits:
cpu: "2"
memory: 2Gi
requests:
cpu: "2"
memory: 2Gi

volumeMounts:
- name: store
mountPath: /store
volumes:
- name: store
persistentVolumeClaim:
claimName: heyfil
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: heyfil
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt"
nginx.ingress.kubernetes.io/enable-cors: "true"
spec:
tls:
- hosts:
- heyfil.cid.contact
secretName: heyfil-ingress-tls
rules:
- host: heyfil.cid.contact
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: heyfil
port:
name: api
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ namespace: storetheindex
resources:
- ../../../../../base/heyfil
- monitor.yaml
- pvc.yaml
- ingress.yaml

patchesStrategicMerge:
- deployment.yaml

images:
- name: heyfil
newName: 407967248065.dkr.ecr.us-east-2.amazonaws.com/ipni/heyfil
newTag: 20230614095932-b27edd5517dd460dda4ea456cd55c323046df5c4
newTag: 20230706124905-cf3b03385090e32fdf35fd6974dbc8e881f1cab1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: heyfil
name: heyfil
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Mi
storageClassName: gp3

0 comments on commit 5f72603

Please sign in to comment.