first commit

This commit is contained in:
2026-01-21 17:37:42 +11:00
commit bd1ed71ac4
142 changed files with 18994 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
Thank you for installing the {{ .Chart.Name }} chart for the Amplify Integration Platform.
Your release is named {{ .Release.Name }}.
To learn more about the release, try:
$ helm status {{ .Release.Name }}
$ helm get all {{ .Release.Name }}

View File

@@ -0,0 +1,76 @@
{{- define "postdeploy.name" -}}
{{- default "postdeploy" .Values.postdeploy.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "postdeploy.fullname" -}}
{{- if .Values.postdeploy.fullnameOverride }}
{{- .Values.postdeploy.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default "postdeploy" .Values.postdeploy.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "postdeploy.labels" -}}
{{ include "dataplane.labels" . }}
{{ include "postdeploy.selectorLabels" . }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "postdeploy.selectorLabels" -}}
app.kubernetes.io/name: {{ include "postdeploy.name" . }}
app: {{ include "postdeploy.appName" . }}
dplane: "postdeploy"
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "postdeploy.serviceAccountName" -}}
{{- if .Values.postdeploy.serviceAccount.enabled }}
{{- default (include "postdeploy.fullname" .) .Values.postdeploy.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.postdeploy.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Custom templates start here
*/}}
{{- define "postdeploy.appName" -}}
{{- $name := default "postdeploy" .Values.postdeploy.nameOverride -}}
{{- $env := default "postdeploy" .Values.global.appEnv -}}
{{- printf "%s-%s" $name $env | trunc 63 | trimSuffix "-" -}}
{{- end }}
{{/*
Image name
*/}}
{{- define "image.finalname" -}}
{{- printf "%s/%s:%s" .Values.postdeploy.image.server "postdeploy" .Chart.AppVersion }}
{{- end }}
{{/*
Cpu min request
*/}}
{{- define "microserviceChart.minCpuUnits" -}}
"
{{- index .Values.postdeploy.valuesPerEnvironment.cpuUnits ((pluck .Values.postdeploy.environment .Values.postdeploy.environments | first | default .Values.postdeploy.environments.sandbox) | int) -}}
m"
{{- end }}

View File

@@ -0,0 +1,13 @@
{{- if .Values.postdeploy.calicoNetpol.enabled }}
apiVersion: projectcalico.org/v3
kind: NetworkPolicy
metadata:
name: {{ template "postdeploy.name" . }}
namespace: {{ .Release.Namespace }}
spec:
order: 10
selector: ampint.ddplane == 'clean-up-job'
types:
- Ingress
- Egress
{{- end }}

View File

@@ -0,0 +1,71 @@
{{- if .Values.postdeploy.enabled }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "postdeploy.appName" . }}-cleanup-cache
labels:
ampint.ddplane: "clean-up-job"
spec:
ttlSecondsAfterFinished: {{ .Values.postdeploy.job_ttl }}
template:
metadata:
labels:
ampint.ddplane: "clean-up-job"
spec:
{{- with .Values.global.image.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.postdeploy.serviceAccount.enabled }}
serviceAccountName: {{ include "postdeploy.serviceAccountName" . }}
{{- end }}
{{- if .Values.postdeploy.podSecurityContextEnabled }}
securityContext: {{- toYaml .Values.postdeploy.podSecurityContext | nindent 8 }}
{{- end }}
containers:
- name: cleanup-cache
securityContext: {{- toYaml .Values.postdeploy.securityContext | nindent 12 }}
image: "{{ default .Values.global.image.repository .Values.global.alpinetools.image.repository }}/{{ .Values.global.alpinetools.image.name }}:{{ .Values.global.alpinetools.image.tag }}"
command:
- "/bin/sh"
- "-c"
- |
if [ -d "/efs/component-cache" ]; then
echo "Deleting deprecated folder /efs/component-cache/!";
rm -rf /efs/component-cache;
fi
if [ -d "/efs/event-cache" ]; then
echo "Deleting deprecated folder /efs/event-cache/!";
rm -rf /efs/event-cache;
fi
if [ -d "/efs/libraries/shared-libraries" ]; then
echo "Deleting deprecated folder /efs/libraries/shared-libraries/!";
rm -rf /efs/libraries/shared-libraries;
fi
if [ -d "/efs/clusters/$clusterRefId/libraries/shared-libraries/" ]; then
echo "Deleting deprecated folder /efs/clusters/$clusterRefId/libraries/shared-libraries/!";
rm -rf /efs/clusters/$clusterRefId/libraries/shared-libraries;
fi
imagePullPolicy: Always
envFrom:
- configMapRef:
name: configmap-common
volumeMounts:
- name: {{ .Values.global.volumeStorageName }}
mountPath: /efs
volumes:
- name: {{ .Values.global.volumeStorageName }}
persistentVolumeClaim:
claimName: {{ .Release.Namespace }}-{{ .Values.global.claimName }}
restartPolicy: Never
{{- with .Values.postdeploy.nodeSelector }}
nodeSelector: {{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.postdeploy.affinity }}
affinity: {{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.postdeploy.tolerations }}
tolerations: {{- toYaml . | nindent 8 }}
{{- end -}}
{{- end }}

View File

@@ -0,0 +1,13 @@
{{- if ( and .Values.postdeploy.serviceAccount.enabled ( not .Values.postdeploy.serviceAccount.preexisting ) ) -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "postdeploy.serviceAccountName" . }}
labels:
{{- include "postdeploy.labels" . | nindent 4 }}
{{- with .Values.postdeploy.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.postdeploy.serviceAccount.automountServiceAccountToken }}
{{- end }}