Skip to content

Commit

Permalink
Annotations and Upgrades (#32)
Browse files Browse the repository at this point in the history
* Added annotations to services and statefulSets
* Made service deployment configurable
* Upgraded to latest version of the dscp-node
* upgraded types package to latest version from dscp-node
* Fixed some package dependency security issues
* Bumped versions
  • Loading branch information
dblane-digicatapult authored Jul 12, 2022
1 parent 0e6b6ab commit 332e703
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 1,345 deletions.
6 changes: 3 additions & 3 deletions helm/dscp-ipfs/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: dscp-node
repository: https://digicatapult.github.io/dscp-node/
version: 3.0.1
digest: sha256:27b626344df7c86b8ce42a18d2e1afdb5fbbeb9db6aa4a7a6f64bc6cbd8b592f
generated: "2022-04-07T13:21:43.837968+01:00"
version: 3.8.0
digest: sha256:6525c15a6c7106f048b6592f6b2c871cf774d4305507ad91f22a07d56b468c39
generated: "2022-07-12T10:07:48.897446+01:00"
6 changes: 3 additions & 3 deletions helm/dscp-ipfs/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: v2
name: dscp-ipfs
appVersion: '2.1.2'
appVersion: '2.2.0'
description: A Helm chart for dscp-ipfs
version: '2.1.2'
version: '2.2.0'
type: application
dependencies:
- name: dscp-node
version: '3.0.1'
version: '3.8.0'
repository: https://digicatapult.github.io/dscp-node/
condition: dscpNode.enabled
alias: dscpNode
Expand Down
16 changes: 14 additions & 2 deletions helm/dscp-ipfs/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
{{- if .Values.service.swarm.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "dscp-ipfs.fullname" . }}-swarm
{{- with .Values.service.swarm.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "dscp-ipfs.labels" . | nindent 4 }}
spec:
selector:
name: {{ include "dscp-ipfs.fullname" . }}
ports:
- protocol: 'TCP'
port: 4001
port: {{ .Values.service.swarm.port }}
targetPort: {{ .Values.config.ipfsSwarmPort }}
{{- end }}
---
{{- if .Values.service.api.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "dscp-ipfs.fullname" . }}-api
{{- with .Values.service.api.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "dscp-ipfs.labels" . | nindent 4 }}
spec:
selector:
name: {{ include "dscp-ipfs.fullname" . }}
ports:
- protocol: 'TCP'
port: 5001
port: {{ .Values.service.api.port }}
targetPort: {{ .Values.config.ipfsApiPort }}
{{- end }}
5 changes: 4 additions & 1 deletion helm/dscp-ipfs/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ spec:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- with .Values.statefulSet.annotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
name: {{ include "dscp-ipfs.fullname" . }}
spec:
Expand Down Expand Up @@ -139,7 +142,7 @@ spec:
- containerPort: {{ .Values.config.ipfsApiPort }}
name: ipfs-http-api
protocol: TCP
{{- if .Values.config.enableLivenessProbe }}
{{- if .Values.statefulSet.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /health
Expand Down
18 changes: 16 additions & 2 deletions helm/dscp-ipfs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,26 @@ config:
- /ip6/2001:db8::/ipcidr/32
- /ip6/fc00::/ipcidr/7
- /ip6/fe80::/ipcidr/10
enableLivenessProbe: true

service:
swarm:
annotations: {}
enabled: true
port: 4001
api:
annotations: {}
enabled: true
port: 5001

statefulSet:
annotations: {}
livenessProbe:
enabled: true

image:
repository: ghcr.io/digicatapult/dscp-ipfs
pullPolicy: IfNotPresent
tag: 'v2.1.2'
tag: 'v2.2.0'

storage:
storageClass: ""
Expand Down
Loading

0 comments on commit 332e703

Please sign in to comment.