generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add cert-manager HTTP01 resolver and Data Platform static asset dep…
…loyment (#5500) Signed-off-by: Jacob Woffenden <jacob.woffenden@digital.justice.gov.uk> Co-authored-by: Gary <Gary-H9@users.noreply.github.com>
- Loading branch information
Showing
12 changed files
with
157 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,7 @@ acme: | |
aws: | ||
region: | ||
hostedZoneID: | ||
dnsZone: | ||
dnsZone: | ||
|
||
http01: | ||
ingressClassName: default |
7 changes: 7 additions & 0 deletions
7
terraform/environments/data-platform-apps-and-tools/src/helm/charts/static-assets/Chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
apiVersion: v2 | ||
name: static-assets | ||
description: A Helm chart to deploy Data Platform static assets | ||
type: application | ||
version: 1.0.0 | ||
appVersion: 1.0.0 |
29 changes: 29 additions & 0 deletions
29
...ments/data-platform-apps-and-tools/src/helm/charts/static-assets/templates/deployment.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Release.Name }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: static-assets | ||
template: | ||
metadata: | ||
labels: | ||
app: static-assets | ||
spec: | ||
containers: | ||
- name: static-assets | ||
image: {{ .Values.image.repository }}@sha256:{{ .Values.image.sha }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
resources: | ||
requests: | ||
memory: {{ .Values.container.staticAssets.resources.requests.memory }} | ||
cpu: {{ .Values.container.staticAssets.resources.requests.cpu }} | ||
limits: | ||
memory: {{ .Values.container.staticAssets.resources.limits.memory }} | ||
cpu: {{ .Values.container.staticAssets.resources.limits.cpu }} | ||
ports: | ||
- containerPort: {{ .Values.container.staticAssets.port }} |
26 changes: 26 additions & 0 deletions
26
...ronments/data-platform-apps-and-tools/src/helm/charts/static-assets/templates/ingress.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ .Release.Name }} | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
cert-manager.io/cluster-issuer: {{ .Values.ingress.certManager.issuer }} | ||
external-dns.alpha.kubernetes.io/hostname: {{ .Values.ingress.host }} | ||
spec: | ||
ingressClassName: default | ||
tls: | ||
- hosts: | ||
- {{ .Values.ingress.host }} | ||
secretName: static-assets-tls | ||
rules: | ||
- host: {{ .Values.ingress.host }} | ||
http: | ||
paths: | ||
- path: / | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: static-assets | ||
port: | ||
number: {{ .Values.container.staticAssets.port }} |
14 changes: 14 additions & 0 deletions
14
...ronments/data-platform-apps-and-tools/src/helm/charts/static-assets/templates/service.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Release.Name }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: static-assets | ||
ports: | ||
- protocol: TCP | ||
port: {{ .Values.container.staticAssets.port }} | ||
targetPort: {{ .Values.container.staticAssets.port }} |
21 changes: 21 additions & 0 deletions
21
...aform/environments/data-platform-apps-and-tools/src/helm/charts/static-assets/values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
image: | ||
repository: ghcr.io/ministryofjustice/data-platform-static-assets | ||
sha: 0b55c9eaecbd0fb517a4d32bedee9e682335eb74cadefba0a31cb874b3e1750d | ||
pullPolicy: Always | ||
|
||
container: | ||
staticAssets: | ||
resources: | ||
requests: | ||
cpu: 250m | ||
memory: 64Mi | ||
limits: | ||
cpu: 500m | ||
memory: 128Mi | ||
port: 8080 | ||
|
||
ingress: | ||
certManager: | ||
issuer: letsencrypt-production-http01 | ||
host: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ controllerManager: | |
- external-secrets | ||
- cosign-system | ||
- prometheus | ||
- static-assets |