Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
bff84a2
feat: enhance Git configuration for external git support
CasLubbers Jan 20, 2026
8987dc3
feat: update tests to mock new git configuration structure and handle…
CasLubbers Jan 20, 2026
c8d2d5f
feat: refactor git configuration references in otomi-api.gotmpl
CasLubbers Jan 20, 2026
ac4fc49
feat: update Git credentials handling and refactor related configurat…
CasLubbers Jan 21, 2026
df766e2
feat: refactor Git repository configuration to use authenticated URLs
CasLubbers Jan 21, 2026
59236e3
feat: rename baseUrl to repoUrl in Git configuration for consistency
CasLubbers Jan 21, 2026
d83029b
feat: update gitea database installation conditions and improve deplo…
CasLubbers Jan 22, 2026
06c204b
feat: integrate GitRepoConfig into AplOperator for improved git handling
CasLubbers Jan 22, 2026
2d2e099
feat: pass parent directory to hfValues for correct ENV_DIR handling
CasLubbers Jan 22, 2026
12ab342
feat: restructure Git configuration handling and store in ConfigMap
CasLubbers Jan 23, 2026
659a0eb
feat: update Git configuration to include new password fields and imp…
CasLubbers Jan 23, 2026
e1d139f
feat: enhance git configuration with email and repo details, and add …
CasLubbers Jan 23, 2026
58cd37e
feat: add useInternalGitea field to Git configuration for enhanced in…
CasLubbers Jan 23, 2026
8d694c5
fix: remove useinternalgitea
CasLubbers Feb 4, 2026
1139966
Merge remote-tracking branch 'origin/main' into APL-1465
CasLubbers Feb 4, 2026
c566ad7
fix: remove useinternalgitea
CasLubbers Feb 4, 2026
1a18c9c
fix: values
CasLubbers Feb 4, 2026
d10d17f
fix: cleanup values
CasLubbers Feb 4, 2026
a66b00b
fix: set gitea enabled correct
CasLubbers Feb 5, 2026
1b0d35d
fix: set gitea enabled correct
CasLubbers Feb 5, 2026
dd8de3c
fix: set gitea enabled correct
CasLubbers Feb 5, 2026
0f8c25c
ci: skip compare run on draft
merll Feb 5, 2026
02d4091
ci: edit last comment
merll Feb 5, 2026
cccde4e
fix: remove lastUpdated
CasLubbers Feb 5, 2026
8a4e2e0
Merge branch 'main' into APL-1465
svcAPLBot Feb 5, 2026
5243cab
fix: update apl-operator values
CasLubbers Feb 5, 2026
300e82b
feat: add git migration secrets
CasLubbers Feb 5, 2026
7fa45ae
fix: tests
CasLubbers Feb 5, 2026
b555afe
fix: ensure git credentials
CasLubbers Feb 5, 2026
b6af151
fix: ensure git credentials
CasLubbers Feb 5, 2026
bab2b35
fix: use username instead of user
CasLubbers Feb 5, 2026
53f50bb
fix: use username instead of user
CasLubbers Feb 5, 2026
fecf455
fix: use username instead of user
CasLubbers Feb 5, 2026
c15ed90
fix: use username instead of user
CasLubbers Feb 5, 2026
7d8edcd
Merge branch 'main' into APL-1465
svcAPLBot Feb 5, 2026
6490616
Merge branch 'main' into APL-1465
svcAPLBot Feb 5, 2026
365ac1d
Merge branch 'main' into APL-1465
svcAPLBot Feb 5, 2026
1809b05
Merge branch 'main' into APL-1465
svcAPLBot Feb 6, 2026
be8b2d7
Merge branch 'main' into APL-1465
svcAPLBot Feb 6, 2026
4653f81
fix: encrypting
CasLubbers Feb 6, 2026
dfefac8
fix: encrypting
CasLubbers Feb 6, 2026
1e8f3e3
fix: create sops secret
CasLubbers Feb 6, 2026
d500d6b
fix: tests
CasLubbers Feb 6, 2026
1572ad5
feat: ensure git and sops secrets configmap
CasLubbers Feb 9, 2026
638d96c
feat: make templating use generic git
CasLubbers Feb 9, 2026
d504e63
feat: make teamRepoUrl optional
CasLubbers Feb 9, 2026
5728697
Merge branch 'main' into APL-1465
svcAPLBot Feb 9, 2026
3624b39
feat: set api version
CasLubbers Feb 9, 2026
360eb50
Merge branch 'main' into APL-1465
svcAPLBot Feb 9, 2026
f887880
Merge branch 'main' into APL-1465
svcAPLBot Feb 9, 2026
6852b31
feat: set console version
CasLubbers Feb 10, 2026
c333ba9
feat: set gitea enabled in defaults instead of derived
CasLubbers Feb 10, 2026
43f68a9
Merge remote-tracking branch 'origin/main' into APL-1465
CasLubbers Feb 10, 2026
3612416
Merge branch 'main' into APL-1465
svcAPLBot Feb 11, 2026
cb8ec50
Merge remote-tracking branch 'origin/main' into APL-1465
CasLubbers Feb 11, 2026
350a3ae
Merge branch 'main' into APL-1465
svcAPLBot Feb 11, 2026
bc4ded7
Merge branch 'main' into APL-1465
svcAPLBot Feb 11, 2026
0e0bd47
Merge branch 'main' into APL-1465
svcAPLBot Feb 11, 2026
b4f9739
Merge branch 'main' into APL-1465
svcAPLBot Feb 12, 2026
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/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-operator.fullname" . }}) for any feedback or errors.
Please inspect the output of the apl-operator deployment (apl-operator/{{ include "apl-operator.fullname" . }}) for any feedback or errors.

Also visit https://apl-docs.net for further instructions and reference documentation.
Also visit https://apl-docs.net for further instructions and reference documentation.
2 changes: 1 addition & 1 deletion chart/apl/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ spec:
- secretRef:
name: apl-sops-secrets
- secretRef:
name: gitea-credentials
name: apl-git-credentials
{{- end }}
volumeMounts:
- name: otomi-values
Expand Down
14 changes: 14 additions & 0 deletions chart/apl/templates/git-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- $git := .Values.otomi.git | default dict }}
apiVersion: v1
kind: ConfigMap
metadata:
name: apl-git-config
namespace: apl-operator
data:
{{- if $git.repoUrl }}
repoUrl: {{ $git.repoUrl | quote }}
{{- end }}
branch: {{ $git.branch | quote }}
{{- if $git.email }}
email: {{ $git.email | quote }}
{{- end }}
15 changes: 8 additions & 7 deletions chart/apl/templates/git-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{{- $git := .Values.otomi.git | default dict }}
apiVersion: v1
kind: Secret
metadata:
name: gitea-credentials
name: apl-git-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 }}
{{- if $git.username }}
username: {{ $git.username | quote }}
{{- end }}
{{- if $git.password }}
password: {{ $git.password | quote }}
{{- end }}
9 changes: 9 additions & 0 deletions chart/apl/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ otomi:
## By default the image tag is set to .Chart.AppVersion
# version: main

## Git repository configuration
## By default, APL uses the built-in Gitea instance.
git:
# repoUrl: '' # Repository url (e.g., https://github.com/org/repo)
# user: '' # Git username (defaults to 'otomi-admin')
# password: '' # Git password or personal access token
# email: '' # Email for git commits (defaults to '[email protected]')
branch: main

## Optional configuration
# apps:
# cert-manager:
Expand Down
12 changes: 10 additions & 2 deletions charts/apl-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ spec:
{{- include "apl-operator.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
# Restart pod when git credentials or config changes (important for migration)
checksum/git-credentials: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
checksum/git-config: {{ include (print $.Template.BasePath "/git-config.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
labels:
{{- include "apl-operator.selectorLabels" . | nindent 8 }}
spec:
Expand All @@ -38,6 +41,11 @@ spec:
env:
- name: CI
value: "true"
envFrom:
- secretRef:
name: apl-sops-secrets
- secretRef:
name: apl-git-credentials
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
Expand Down
16 changes: 16 additions & 0 deletions charts/apl-operator/templates/git-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- $git := .Values.git | default dict }}
apiVersion: v1
kind: ConfigMap
metadata:
name: apl-git-config
namespace: apl-operator
data:
{{- if $git.repoUrl }}
repoUrl: {{ $git.repoUrl | quote }}
{{- end }}
{{- if $git.branch }}
branch: {{ $git.branch | quote }}
{{- end }}
{{- if $git.email }}
email: {{ $git.email | quote }}
{{- end }}
21 changes: 20 additions & 1 deletion charts/apl-operator/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- $kms := .Values.kms | default dict }}
{{- $git := .Values.git | default dict }}
{{- if hasKey $kms "sops" }}
{{- $v := $kms.sops }}
apiVersion: v1
Expand Down Expand Up @@ -34,12 +35,30 @@ data:
{{- end }}
{{- end }}
---
# Keep old secret for migration. Remove in future release.
apiVersion: v1
kind: Secret
metadata:
name: gitea-credentials
namespace: {{ .Release.Namespace }}
namespace: apl-operator
type: Opaque
stringData:
{{- if .Values.gitUsername }}
GIT_USERNAME: {{ .Values.gitUsername | quote }}
{{- end }}
{{- if .Values.gitPassword }}
GIT_PASSWORD: {{ .Values.gitPassword | quote }}
{{- end }}
---
apiVersion: v1
kind: Secret
metadata:
name: apl-git-credentials
type: Opaque
stringData:
{{- if $git.username }}
username: {{ $git.username | quote }}
{{- end }}
{{- if $git.password }}
password: {{ $git.password | quote }}
{{- end }}
3 changes: 0 additions & 3 deletions charts/apl-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,3 @@ kms: {}
# sops:
# age:
# privateKey: "AGE-SECRET-KEY-EXAMPLExxxxxxxxxxxxxxxxxxxxxxxx"

gitPassword: ""
gitUsername: "otomi-admin"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- $v := .Values }}
{{- $a := $v.apps.argocd }}
{{- if $a.enabled }}
{{- if and $a.enabled $v.gitOps.teamRepoUrl }}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
Expand Down
2 changes: 2 additions & 0 deletions charts/team-ns/templates/argocd/argocd-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
{{- range $i, $item := $v.workloads }}
{{- $urls = append $urls $item.url }}
{{- end }}
{{- if $v.gitOps.teamRepoUrl }}
{{- $urls = append $urls $v.gitOps.teamRepoUrl }}
{{- end }}
{{- $urls = append $urls $v.gitOps.valuesRepoUrl }}
{{- $urls = sortAlpha (uniq $urls) }}

Expand Down
2 changes: 2 additions & 0 deletions charts/team-ns/templates/argocd/argocd-repo.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.gitOps.teamRepoUrl }}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -8,3 +9,4 @@ metadata:
stringData:
type: git
url: {{ .Values.gitOps.teamRepoUrl }}
{{- end }}
14 changes: 7 additions & 7 deletions charts/team-ns/templates/builds/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
annotations:
sidecar.istio.io/inject: "false"
# ArgoCD sync wave annotation to ensure it's applied first
argocd.argoproj.io/sync-wave: "-2"
argocd.argoproj.io/sync-wave: "-2"
labels: {{- include "team-ns.chart-labels" $ | nindent 4 }}
spec:
workspaces:
Expand Down Expand Up @@ -76,7 +76,7 @@ spec:
value: {{ $v.harborDomain }}/team-{{ $v.teamId }}/{{ .imageName }}:{{ .tag }}
{{- with (dig "mode" "docker" "envVars" nil . ) }}
- name: EXTRA_ARGS
value:
value:
{{- range . }}
- --build-arg={{ .name }}={{ .value }}
{{- end }}
Expand Down Expand Up @@ -116,7 +116,7 @@ spec:
metadata:
creationTimestamp: null
spec:
{{- if $v.buildStorageClassName }}
{{- if $v.buildStorageClassName }}
storageClassName: {{ $v.buildStorageClassName }}
{{- end }}
accessModes:
Expand All @@ -134,7 +134,7 @@ spec:
{{- else }}
- name: git-credentials
secret:
secretName: gitea-credentials
secretName: apl-git-credentials
{{- end }}
- name: docker-credentials
secret:
Expand Down Expand Up @@ -166,7 +166,7 @@ spec:
metadata:
creationTimestamp: null
spec:
{{- if $v.buildStorageClassName }}
{{- if $v.buildStorageClassName }}
storageClassName: {{ $v.buildStorageClassName }}
{{- end }}
accessModes:
Expand All @@ -184,7 +184,7 @@ spec:
{{- else }}
- name: git-credentials
secret:
secretName: gitea-credentials
secretName: apl-git-credentials
{{- end }}
- name: docker-credentials
secret:
Expand All @@ -211,7 +211,7 @@ kind: EventListener
metadata:
name: gitea-webhook-{{ .name }}
annotations:
argocd.argoproj.io/sync-wave: "-1"
argocd.argoproj.io/sync-wave: "-1"
labels:
tekton.dev/pipeline: docker-build-{{ .name }}
{{- include "team-ns.chart-labels" $ | nindent 4 }}
Expand Down
4 changes: 2 additions & 2 deletions helmfile.d/helmfile-03.databases.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ bases:

releases:
- name: gitea-db-secret-artifacts
installed: true
installed: {{ $a | get "gitea.enabled" }}
namespace: gitea
labels:
pkg: gitea
app: core
<<: *raw
- name: gitea-otomi-db
installed: true
installed: {{ $a | get "gitea.enabled" }}
namespace: gitea
labels:
pkg: gitea
Expand Down
4 changes: 2 additions & 2 deletions helmfile.d/snippets/defaults.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ environments:
- apps:
kubeflow-pipelines:
rootPassword: {{ randAlphaNum 32 }}
gitea:
adminPassword: {{ randAlphaNum 20 }}
{{- range $index,$ingressClassName := $ingressClassNames }}
ingress-nginx-{{ $ingressClassName}}:
autoscaling:
Expand Down Expand Up @@ -274,6 +272,8 @@ environments:
{{- end }}
otomi:
adminPassword: {{ randAlphaNum 32 }}
git:
password: {{ randAlphaNum 20 }}
cluster:
owner: customer
name: apl
Expand Down
7 changes: 6 additions & 1 deletion helmfile.d/snippets/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ environments:
memory: 64Mi
cpu: 10m
gitea:
adminUsername: otomi-admin
_rawValues: {}
enabled: true
networkPolicies:
enabled: true
databaseMaxConnections: 28
Expand Down Expand Up @@ -1143,6 +1143,11 @@ environments:
receivers:
- none
otomi:
git:
branch: main
repoUrl: http://gitea-http.gitea.svc.cluster.local:3000/otomi/values.git
username: otomi-admin
email: [email protected]
hasExternalDNS: false
hasExternalIDP: false
isMultitenant: true
Expand Down
2 changes: 0 additions & 2 deletions helmfile.d/snippets/derived.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,6 @@ environments:
registry:
credentials:
password: {{ $a | get "harbor.registry.credentials.password" $v.otomi.adminPassword | quote }}
gitea:
enabled: true
keycloak:
enabled: true
address: {{ $keycloakBaseUrl }}
Expand Down
1 change: 1 addition & 0 deletions src/cmd/bootstrap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ describe('Bootstrapping values', () => {
getKmsSettings: jest.fn(),
terminal,
writeFile: jest.fn(),
createUpdateGenericSecret: jest.fn(),
}
it('should create files on first run and en/de-crypt', async () => {
deps.pathExists.mockReturnValue(false)
Expand Down
19 changes: 17 additions & 2 deletions src/cmd/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { randomUUID } from 'crypto'
import { existsSync } from 'fs'
import { copyFile, cp, mkdir, readFile, writeFile } from 'fs/promises'
import { generate as generatePassword } from 'generate-password'
import { cloneDeep, get, isEmpty, merge, set } from 'lodash'
import { cloneDeep, get, merge, set } from 'lodash'
import { pki } from 'node-forge'
import path from 'path'
import { bootstrapGit } from 'src/common/bootstrap'
Expand All @@ -12,7 +12,14 @@ import { decrypt, encrypt } from 'src/common/crypt'
import { terminal } from 'src/common/debug'
import { env, isCli } from 'src/common/envalid'
import { hfValues } from 'src/common/hf'
import { createK8sSecret, getDeploymentState, getK8sSecret, secretId } from 'src/common/k8s'
import {
createK8sSecret,
createUpdateGenericSecret,
getDeploymentState,
getK8sSecret,
k8s,
secretId,
} from 'src/common/k8s'
import { getKmsSettings } from 'src/common/repo'
import { ensureTeamGitOpsDirectories, getFilename, gucci, isCore, loadYaml, rootDir } from 'src/common/utils'
import { generateSecrets, writeValues } from 'src/common/values'
Expand Down Expand Up @@ -44,6 +51,7 @@ export const bootstrapSops = async (
readFile,
terminal,
writeFile,
createUpdateGenericSecret,
},
): Promise<void> => {
const d = deps.terminal(`cmd:${cmdName}:genSops`)
Expand Down Expand Up @@ -75,6 +83,13 @@ export const bootstrapSops = async (
if (privateKey && !process.env.SOPS_AGE_KEY) {
process.env.SOPS_AGE_KEY = privateKey
await deps.writeFile(`${envDir}/.secrets`, `SOPS_AGE_KEY=${privateKey}`)
try {
await deps.createUpdateGenericSecret(k8s.core(), 'apl-sops-secrets', 'apl-operator', {
SOPS_AGE_KEY: privateKey,
})
} catch (e) {
d.warn('Failed to create or update apl-sops-secrets secret with SOPS_AGE_KEY, this might come later')
}
}
}

Expand Down
Loading
Loading