Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
fb04c01
feat: replace install job by apl-operator
CasLubbers Sep 5, 2025
34738ea
feat: fix test
CasLubbers Sep 5, 2025
8d1549b
Merge remote-tracking branch 'origin/main' into APL-940
svcAPLBot Sep 8, 2025
a9d855f
fix: set correct command
CasLubbers Sep 8, 2025
e60bf3a
fix: set SOPS_AGE_KEY
CasLubbers Sep 8, 2025
87309eb
Merge remote-tracking branch 'origin/main' into APL-940
svcAPLBot Sep 8, 2025
eff416f
fix: chart
CasLubbers Sep 8, 2025
8d217c6
fix: chart
CasLubbers Sep 8, 2025
d1c4aa6
fix: chart
CasLubbers Sep 8, 2025
8ec4f1d
fix: chart
CasLubbers Sep 8, 2025
25aefe5
fix: chart
CasLubbers Sep 8, 2025
f6fec71
fix: run post-install steps async
CasLubbers Sep 9, 2025
2af0e5d
fix: run post-install steps async
CasLubbers Sep 9, 2025
4a8d1e7
Merge remote-tracking branch 'origin/main' into APL-940
svcAPLBot Sep 9, 2025
ce9c1d7
Merge remote-tracking branch 'origin/main' into APL-940
svcAPLBot Sep 9, 2025
a635a0a
fix: getting git credentials
CasLubbers Sep 9, 2025
b292190
fix: dont clone repository
CasLubbers Sep 9, 2025
9931960
fix: updating configmap
CasLubbers Sep 9, 2025
538d7ca
test: see repourl
CasLubbers Sep 9, 2025
8548d54
test: see repourl
CasLubbers Sep 9, 2025
2299feb
test: add logging
CasLubbers Sep 9, 2025
f3905a0
feat: keep directory on restart
CasLubbers Sep 9, 2025
edbaba3
Merge remote-tracking branch 'origin/main' into APL-940
svcAPLBot Sep 9, 2025
268cad4
fix: chart
CasLubbers Sep 9, 2025
9daa101
fix: chart
CasLubbers Sep 9, 2025
b60d66a
fix: chart
CasLubbers Sep 9, 2025
90a5a5d
Merge remote-tracking branch 'origin/main' into APL-940
svcAPLBot Sep 9, 2025
93e979b
fix: create if not exist secret
CasLubbers Sep 10, 2025
210f806
Merge remote-tracking branch 'origin/main' into APL-940
svcAPLBot Sep 11, 2025
963dbd0
Merge remote-tracking branch 'origin/main' into APL-940
svcAPLBot Sep 12, 2025
3290b50
Merge remote-tracking branch 'origin/main' into APL-940
svcAPLBot Sep 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions chart/apl/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: v2
name: apl
name: apl-operator
description: A Helm chart for installing APL in Kubernetes
home: https://techdocs.akamai.com/app-platform/docs/welcome
type: application
version: 0.0.0-chart-version
appVersion: APP_VERSION_PLACEHOLDER
appVersion: "main"
keywords:
- linode
- lke
Expand Down
15 changes: 15 additions & 0 deletions chart/apl/templates/00-namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Namespace
metadata:
name: apl-operator
labels:
kubernetes.io/metadata.name: apl-operator
name: apl-operator
---
apiVersion: v1
kind: Namespace
metadata:
name: otomi
labels:
kubernetes.io/metadata.name: otomi
name: otomi
2 changes: 1 addition & 1 deletion chart/apl/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The APL installer was successfully deployed on the cluster.

Please inspect the output of the installer job ({{ .Release.Namespace }}/{{ include "apl.fullname" . }}) for any feedback or errors.
Please inspect the output of the installer job ({{ .Release.Namespace }}/{{ include "apl-operator.fullname" . }}) for any feedback or errors.

Also visit https://apl-docs.net for further instructions and reference documentation.
45 changes: 25 additions & 20 deletions chart/apl/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,41 +1,35 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "apl.name" -}}
{{- define "apl-operator.name" -}}
{{- default .Chart.Name .Values.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.
Always returns "apl-operator" to ensure consistent naming.
*/}}
{{- define "apl.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- define "apl-operator.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
apl-operator
{{- end -}}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "apl.chart" -}}
{{- define "apl-operator.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "apl.labels" -}}
helm.sh/chart: {{ include "apl.chart" . }}
{{ include "apl.selectorLabels" . }}
{{- define "apl-operator.labels" -}}
helm.sh/chart: {{ include "apl-operator.chart" . }}
{{ include "apl-operator.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,8 +39,19 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "apl.selectorLabels" -}}
app.kubernetes.io/name: {{ include "apl.name" . }}
{{- define "apl-operator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "apl-operator.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "apl-operator.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "apl-operator.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- .Values.serviceAccount.name }}
{{- end }}
{{- end }}

9 changes: 9 additions & 0 deletions chart/apl/templates/conf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: git-config
namespace: apl-operator
data:
.gitconfig: |
[safe]
directory = *
128 changes: 128 additions & 0 deletions chart/apl/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{{- $kms := .Values.kms | default dict }}
{{- $imageName := .Values.imageName | default "linode/apl-core" }}
{{- $version := .Values.otomi.version | default .Chart.AppVersion }}
{{- $useORCS := .Values.otomi.useORCS | default "true"}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "apl-operator.fullname" . }}
namespace: apl-operator
labels: {{- include "apl-operator.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels: {{- include "apl-operator.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations: {{- toYaml . | nindent 8 }}
{{- end }}
labels: {{- include "apl-operator.selectorLabels" . | nindent 8 }}
spec:
dnsConfig:
nameservers:
- 8.8.8.8
- 8.8.4.4
restartPolicy: Always
serviceAccountName: {{ include "apl-operator.serviceAccountName" . }}
securityContext:
runAsNonRoot: true
runAsUser: 999
runAsGroup: 999
fsGroup: 3000
seccompProfile:
type: RuntimeDefault
containers:
- name: apl-operator
{{- if $useORCS }}
image: "mirror.registry.linodelke.net/docker/{{ $imageName }}:{{ $version }}"
{{- else }}
image: "{{ $imageName }}:{{ $version }}"
{{- end }}
imagePullPolicy: {{ ternary "IfNotPresent" "Always" (regexMatch "^v\\d" $version) }}
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1001
resources:
limits:
cpu: '2'
memory: '2Gi'
requests:
cpu: '1'
memory: '1Gi'
workingDir: /home/app/stack
command:
- node
- dist/src/operator/main.js
env:
- name: VERBOSITY
value: '1'
- name: ENV_DIR
value: /home/app/stack/env
- name: VALUES_INPUT
value: /secret/values.yaml
# Git configuration for operator (will be set after installation)
- name: GIT_ORG
value: {{ .Values.operator.gitOrg | default "apl" | quote }}
- name: GIT_REPO
value: {{ .Values.operator.gitRepo | default "values" | quote }}
- name: POLL_INTERVAL_MS
value: {{ .Values.operator.pollIntervalMs | default "30000" | quote }}
- name: RECONCILE_INTERVAL_MS
value: {{ .Values.operator.reconcileIntervalMs | default "300000" | quote }}
{{- if hasKey $kms "sops" }}
envFrom:
- secretRef:
name: apl-sops-secrets
- secretRef:
name: gitea-credentials
{{- end }}
volumeMounts:
- name: otomi-values
mountPath: /home/app/stack/env
- name: values-secret
mountPath: /secret
- name: tmp
mountPath: /tmp
- name: git-config
mountPath: /home/app/.gitconfig
subPath: .gitconfig
livenessProbe:
exec:
command: ["/bin/sh", "-c", "pgrep -f 'apl-operator' > /dev/null"]
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 10
failureThreshold: 3
readinessProbe:
exec:
command: ["/bin/sh", "-c", "pgrep -f 'apl-operator' > /dev/null"]
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
volumes:
- name: values-secret
secret:
secretName: {{ .Release.Name }}-values
- name: otomi-values
emptyDir: {}
- name: tmp
emptyDir: {}
- name: git-config
configMap:
name: git-config
items:
- key: .gitconfig
path: .gitconfig
{{- if hasKey .Values "imagePullSecretNames" }}
imagePullSecrets:
{{- range .Values.imagePullSecretNames }}
- name: {{ . }}
{{- end }}
{{- end }}
13 changes: 13 additions & 0 deletions chart/apl/templates/git-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Secret
metadata:
name: gitea-credentials
namespace: apl-operator
type: Opaque
stringData:
{{- if .Values.gitUsername }}
GIT_USERNAME: {{ .Values.gitUsername | quote }}
{{- end }}
{{- if .Values.gitPassword }}
GIT_PASSWORD: {{ .Values.gitPassword | quote }}
{{- end }}
100 changes: 0 additions & 100 deletions chart/apl/templates/job.yaml

This file was deleted.

Loading
Loading