Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
Added enablements and annotations, fixed insecure package deps (#65)
Browse files Browse the repository at this point in the history
* Added enablements for service and ingress resources
* Added annotations for service, ingress and deployment resources
* Upgraded Insecure dependencies
* Fixing docker-compose against known good versions
  • Loading branch information
dblane-digicatapult authored Jul 12, 2022
1 parent 069cb53 commit 2555460
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 1,489 deletions.
8 changes: 4 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
- POSTGRES_DB=dscp

dscp-identity-service:
image: ghcr.io/digicatapult/dscp-identity-service:latest
image: ghcr.io/digicatapult/dscp-identity-service:v1.5.0
container_name: identity-service
command: /bin/sh -c "
sleep 30 &&
Expand All @@ -50,7 +50,7 @@ services:
- AUTH_TYPE=${AUTH_TYPE:-NONE}

dscp-node:
image: ghcr.io/digicatapult/dscp-node:latest
image: ghcr.io/digicatapult/dscp-node:v3.8.0
container_name: node
command:
--base-path /data/
Expand Down Expand Up @@ -78,7 +78,7 @@ services:
- 5001:5001

dscp-api:
image: ghcr.io/digicatapult/dscp-api:latest
image: ghcr.io/digicatapult/dscp-api:v4.4.0
container_name: dscp-api
ports:
- 3001:3001
Expand All @@ -98,4 +98,4 @@ services:
restart: on-failure
volumes:
inteli-api-storage:
identity-storage:
identity-storage:
4 changes: 2 additions & 2 deletions helm/inteli-api/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: inteli-api
appVersion: '1.27.4'
appVersion: '1.28.0'
description: A Helm chart for inteli-api
version: '1.27.4'
version: '1.28.0'
type: application
maintainers:
- name: digicatapult
Expand Down
6 changes: 6 additions & 0 deletions helm/inteli-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ spec:
selector:
matchLabels:
name: {{ include "inteli-api.fullname" . }}
replicas: {{ .Values.deployment.replicaCount }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- with .Values.deployment.annotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
name: {{ include "inteli-api.fullname" . }}
spec:
Expand Down Expand Up @@ -52,13 +56,15 @@ spec:
- name: {{ include "inteli-api.fullname" . }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.deployment.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /health
port: {{ .Values.config.port }}
initialDelaySeconds: 15
timeoutSeconds: 3
periodSeconds: 5
{{- end }}
env:
- name: PORT
valueFrom:
Expand Down
4 changes: 3 additions & 1 deletion helm/inteli-api/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- $fullName := include "inteli-api.fullname" . -}}
{{- $ingressPaths := .Values.ingress.paths -}}
{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand All @@ -24,5 +25,6 @@ spec:
service:
name: {{ $fullName }}
port:
number: 80
number: {{ $.Values.service.port }}
{{- end }}
{{- end }}
10 changes: 8 additions & 2 deletions helm/inteli-api/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
{{- $fullName := include "inteli-api.fullname" . -}}
{{- if .Values.service.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "inteli-api.fullname" . }}
labels:
{{- include "inteli-api.labels" . | nindent 4 }}
{{- include "inteli-api.labels" . | nindent 4 }}
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
name: {{ include "inteli-api.fullname" . }}
ports:
- protocol: 'TCP'
port: 80
port: {{ .Values.service.port }}
targetPort: {{ .Values.config.port }}
{{- end }}
16 changes: 14 additions & 2 deletions helm/inteli-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,32 @@ config:
issuer: https://inteli.eu.auth0.com/
tokenUrl: https://inteli.eu.auth0.com/oauth/token

deployment:
annotations: {}
livenessProbe:
enabled: true
replicaCount: 1

ingress:
# annotations: {}
annotations: {}
# className: ""
enabled: true
paths:
- /v1/attachment
- /v1/build
- /v1/order
- /v1/part
- /v1/recipe

service:
annotations: {}
enabled: true
port: 80

image:
repository: ghcr.io/digicatapult/inteli-api
pullPolicy: IfNotPresent
tag: 'v1.27.4'
tag: 'v1.28.0'
pullSecrets: ['ghcr-digicatapult']

postgresql:
Expand Down
Loading

0 comments on commit 2555460

Please sign in to comment.