Skip to content

Commit 920bbd5

Browse files
authored
Merge branch 'main' into APL-478
2 parents c699505 + 242a42e commit 920bbd5

File tree

215 files changed

+4563
-2827
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+4563
-2827
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ workflow/
1717
.envrc
1818
otomi.cpuprofile
1919
/.idea/
20-
tmp
20+
tmp
21+
**values-repo.yaml

.values/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ core.yaml
1212
.env
1313
env/status.yaml
1414
env/bootstrap.yaml
15+
values-repo.yaml

.values/env/apps/.gitkeep

-1
This file was deleted.

.values/env/cluster.yaml

Whitespace-only changes.

.values/env/databases/.gitkeep

-1
This file was deleted.

.values/env/settings.yaml

-1
This file was deleted.

.values/env/teams.yaml

-3
This file was deleted.

.values/env/teams/.gitkeep

-1
This file was deleted.

.vscode/launch.json

+11
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
},
5151
{
5252
"name": "Debug current test",
53+
"envFile": ".env",
5354
"type": "node",
5455
"request": "launch",
5556
"program": "${workspaceRoot}/node_modules/.bin/jest",
@@ -67,6 +68,16 @@
6768
"console": "integratedTerminal",
6869
"cwd": "${workspaceRoot}"
6970
},
71+
{
72+
"name": "Bootstrap-dev-with-repo",
73+
"request": "launch",
74+
"runtimeArgs": ["run", "bootstrap-dev-with-repo"],
75+
"runtimeExecutable": "npm",
76+
"type": "node",
77+
"envFile": ".env",
78+
"console": "integratedTerminal",
79+
"cwd": "${workspaceRoot}"
80+
},
7081
{
7182
"name": "Migrate values",
7283
"request": "launch",

CHANGELOG.md

+54
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,60 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [4.4.0](https://github.com/linode/apl-core/compare/v4.3.0...v4.4.0) (2025-03-14)
6+
7+
8+
### Features
9+
10+
* add coderepository schema & fixtures ([#1945](https://github.com/linode/apl-core/issues/1945)) ([0382ee1](https://github.com/linode/apl-core/commit/0382ee1ecef527cd9b813299a96964fcf9df85fd))
11+
* added semantic-release gh-actions ([#1933](https://github.com/linode/apl-core/issues/1933)) ([8b379fa](https://github.com/linode/apl-core/commit/8b379fae329bc16b046d92291a479c2591ad32c8))
12+
* added upgrade script for secrets ([#1967](https://github.com/linode/apl-core/issues/1967)) ([86b8ae0](https://github.com/linode/apl-core/commit/86b8ae05cac57b44239f444ca58cb4f55fbe5e8f))
13+
* api endpoint ([#1982](https://github.com/linode/apl-core/issues/1982)) ([24b45e9](https://github.com/linode/apl-core/commit/24b45e934b07e1ddf10ad9419e7e50fb8f29cf61))
14+
* Add self-service option for admins to add external helm charts to the catalog ([#1979](https://github.com/linode/apl-core/issues/1979)) ([fb993e1](https://github.com/linode/apl-core/commit/fb993e10f05d0ee0d85fa17223c46c4e836ae490))
15+
* create service accounts for gitea organizations ([#1929](https://github.com/linode/apl-core/issues/1929)) ([40a3d20](https://github.com/linode/apl-core/commit/40a3d2004b63e6565adb36013b1140b6b5a85984))
16+
* deploy sealed secrets from the values repo ([#1924](https://github.com/linode/apl-core/issues/1924)) ([f70c855](https://github.com/linode/apl-core/commit/f70c855071e97d5ff4d8c71b3019259c182c1862))
17+
* update versions.yaml ([#1989](https://github.com/linode/apl-core/issues/1989)) ([69224d6](https://github.com/linode/apl-core/commit/69224d63759866442c9ce459a65d8f5751ce7fc0))
18+
19+
20+
### Bug Fixes
21+
22+
* check for helm secrets version and update it ([#1927](https://github.com/linode/apl-core/issues/1927)) ([b74377c](https://github.com/linode/apl-core/commit/b74377cf6cc3ed25f5652f1b17f99a09d366472a))
23+
* checking if gitea is ready in git-clone tasks ([#1936](https://github.com/linode/apl-core/issues/1936)) ([a3dfb4a](https://github.com/linode/apl-core/commit/a3dfb4a3a4a969677ab96954a47407e5077b05a2))
24+
* falco dashboard title ([#1928](https://github.com/linode/apl-core/issues/1928)) ([d0fb19c](https://github.com/linode/apl-core/commit/d0fb19cb7bdcc4c0c4b2d2457ef90b0a595b31ac))
25+
* generate password with special characters ([#1938](https://github.com/linode/apl-core/issues/1938)) ([f16ce6b](https://github.com/linode/apl-core/commit/f16ce6bd00459d769a466a04dccc2de122ea1167))
26+
* ignoreDifferences for apps created by team-admin ([#1995](https://github.com/linode/apl-core/issues/1995)) ([80e260e](https://github.com/linode/apl-core/commit/80e260e353914b74b1b2d4dd2f5c0bda8771195b))
27+
* removed git error which can expose credentials ([#1944](https://github.com/linode/apl-core/issues/1944)) ([4c00fa1](https://github.com/linode/apl-core/commit/4c00fa19abbe7277796273e7bcb5e87912f61ed2))
28+
* unique admin password for gitea ([#1910](https://github.com/linode/apl-core/issues/1910)) ([a2f1349](https://github.com/linode/apl-core/commit/a2f1349b02ab309fa6c20f869964ab09347c4b13))
29+
* unique admin password for gitea ([#1940](https://github.com/linode/apl-core/issues/1940)) ([eea8299](https://github.com/linode/apl-core/commit/eea82990099125b83c8434b26254acd5d0f14914))
30+
* workload with validatingwebhookcfg ([#1942](https://github.com/linode/apl-core/issues/1942)) ([70d6aee](https://github.com/linode/apl-core/commit/70d6aee6ff09d4bb9c76fb09ba004693d96b3ff3))
31+
32+
33+
### Reverts
34+
35+
* fix - unique admin password for gitea ([#1939](https://github.com/linode/apl-core/issues/1939)) ([7d8bf90](https://github.com/linode/apl-core/commit/7d8bf908d2d5e55a718bc4eef292c6cc9fb3e977))
36+
37+
38+
### CI
39+
40+
* add charts and alias ([#1931](https://github.com/linode/apl-core/issues/1931)) ([57c74ec](https://github.com/linode/apl-core/commit/57c74ec67890cb205d23c89a6c6671aeac9cb6da))
41+
* added alias for rabbitmq operator ([#1966](https://github.com/linode/apl-core/issues/1966)) ([c557cbf](https://github.com/linode/apl-core/commit/c557cbfd6f915a30432d1b3c4db1fb6cab733d42))
42+
* added more linode types to the integration workflow ([#1976](https://github.com/linode/apl-core/issues/1976)) ([2c6e084](https://github.com/linode/apl-core/commit/2c6e084bcca9a309597c6e018273cd15733bdfd6))
43+
* update chart index and improve checks ([#1963](https://github.com/linode/apl-core/issues/1963)) ([0ee8cd2](https://github.com/linode/apl-core/commit/0ee8cd27b1d9c47a47145254dc301fca1736bb0e))
44+
* update chart references ([#1937](https://github.com/linode/apl-core/issues/1937)) ([fea5c4c](https://github.com/linode/apl-core/commit/fea5c4c2c29443c75217d5068b85ec298ae8d079))
45+
* update workflow to support k8s 1.32 and wait for kubeconfig ([#1943](https://github.com/linode/apl-core/issues/1943)) ([ab7b631](https://github.com/linode/apl-core/commit/ab7b6311dac8eee3a72dc2c7632829df04b021b1))
46+
47+
48+
### Others
49+
50+
* **chart-deps:** update cert-manager to version v1.17.1 ([#1941](https://github.com/linode/apl-core/issues/1941)) ([e634d34](https://github.com/linode/apl-core/commit/e634d3468c4c0e86eb9451eee1906932e958d89d))
51+
* **chart-deps:** update harbor to version 1.16.2 ([#1903](https://github.com/linode/apl-core/issues/1903)) ([af1a3a0](https://github.com/linode/apl-core/commit/af1a3a02a1137df6e7922ff76ffd04c0b5e98efd))
52+
* **chart-deps:** update rabbitmq-cluster-operator to version 3.20.1 ([#1969](https://github.com/linode/apl-core/issues/1969)) ([d3f8a2f](https://github.com/linode/apl-core/commit/d3f8a2f923f51eb52e35c23942c3ff5414100495))
53+
* **deps:** bump helm/chart-releaser-action from 1.6.0 to 1.7.0 ([#1901](https://github.com/linode/apl-core/issues/1901)) ([d759673](https://github.com/linode/apl-core/commit/d75967368303bb72626ddbb399fd790f30b7d837))
54+
* **deps:** bump ncipollo/release-action from 1.14.0 to 1.15.0 ([#1893](https://github.com/linode/apl-core/issues/1893)) ([abdee3d](https://github.com/linode/apl-core/commit/abdee3d9c187d456849cf99e6e9fd6e73b4b20db))
55+
* tasks version to 3.7.0 ([#1977](https://github.com/linode/apl-core/issues/1977)) ([cfa5608](https://github.com/linode/apl-core/commit/cfa5608c8060a641cee08b50fc05e38198b5a101))
56+
* updated api and console versions ([#1999](https://github.com/linode/apl-core/issues/1999)) ([753e480](https://github.com/linode/apl-core/commit/753e480388c650e1114f7f062cfbb5e47c731284))
57+
* versions ([#1970](https://github.com/linode/apl-core/issues/1970)) ([40ef843](https://github.com/linode/apl-core/commit/40ef843a930683215ce271571dfcad8a601caf0e))
58+
559
## [4.3.0](https://github.com/linode/apl-core/compare/v4.2.0...v4.3.0) (2025-02-10)
660

761

bin/common.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717
LOG_LEVEL='--log-level warn'
1818

1919
# Common vars
20-
readonly otomi_settings="$ENV_DIR/env/settings.yaml"
20+
readonly otomi_settings="$ENV_DIR/env/settings/otomi.yaml"
2121
readonly otomi_tools_image="linode/apl-core:latest"
2222
[ $(uname -s) == 'Linux' ] && readonly LINUX_WORKAROUND='--user=root:root'
2323

@@ -148,7 +148,7 @@ function get_k8s_version() {
148148

149149
function otomi_image_tag() {
150150
local otomi_version=$OTOMI_VERSION
151-
[ -z "$otomi_version" ] && [ -f $otomi_settings ] && otomi_version=$(yq '.otomi.version' $otomi_settings)
151+
[ -z "$otomi_version" ] && [ -f $otomi_settings ] && otomi_version=$(yq '.spec.version' $otomi_settings)
152152
[ -z "$otomi_version" ] && otomi_version=$(cat $PWD/package.json | jq -r .version)
153153
[ -z "$otomi_version" ] && otomi_version='main'
154154
echo $otomi_version
@@ -211,7 +211,7 @@ function crypt() {
211211
[ -n "$VERBOSE" ] && echo "Skipping encryption for $file as it is not changed."
212212
fi
213213
else
214-
if helm secrets decrypt "$file" > "${file}.dec"; then
214+
if helm secrets decrypt "$file" >"${file}.dec"; then
215215
# we correct timestamp of decrypted file to match source file,
216216
# in order to detect changes for conditional encryption
217217
[ -n "$VERBOSE" ] && echo "Setting timestamp of decrypted file to that of source file."

bin/compare.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ targetDirA="tmp/${branchA}"
1414
targetDirB="tmp/${branchB}"
1515

1616
export NODE_ENV=test
17+
otomi values
1718
helmfile template $templateArgs --output-dir-template="../$targetDirB/{{.Release.Namespace}}-{{.Release.Name }}"
18-
19+
rm tests/fixtures/values-repo.yaml
1920
git checkout $branchA
2021
# we remove previously rendered manifests so they are not mixed up with newly rendered
2122
rm -rf $targetDirA

binzx/otomi

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ function parse_yaml {
7777
fallback_otomi_version='latest'
7878
if [ -n "$in_core" ]; then
7979
otomi_version='main'
80-
elif [ -f "${ENV_DIR}/env/settings.yaml" ]; then
81-
otomi_version_rec=$(parse_yaml $ENV_DIR/env/settings.yaml | grep 'otomi__version=')
80+
elif [ -f "${ENV_DIR}/env/settings/otomi.yaml" ]; then
81+
otomi_version_rec=$(parse_yaml $ENV_DIR/env/settings/otomi.yaml | grep 'otomi__version=')
8282
if [[ "$otomi_version_rec" =~ otomi__version=\"(.*)\" ]]; then
8383
otomi_version=${BASH_REMATCH[1]}
8484
else
85-
# If the settings.yaml doesn't contain otomi.version, we fall back to latest
85+
# If the otomi.yaml doesn't contain otomi.version, we fall back to latest
8686
otomi_version=$fallback_otomi_version
8787
fi
8888
else

charts/otomi-pipelines/templates/tekton-otomi-git-clone.yaml

+8-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
description: Determine if pipeline should run based on the commit message
1717
type: string
1818
- name: OTOMI_VERSION
19-
description: Otomi version as in values/env/settings.yaml
19+
description: Otomi version as in values/env/settings/versions.yaml
2020
type: string
2121
- name: TRIGGER_TEAMS_PIPELINE
2222
description: Determine if the otomi-task-teams is about to run
@@ -66,8 +66,13 @@ spec:
6666
else
6767
echo -n "0" > $(results.CI.path) && export CI="0" && echo "Finished"
6868
fi
69-
70-
echo -n "$(yq '.otomi.version' values/env/settings.yaml)" > $(results.OTOMI_VERSION.path)
69+
70+
if [ -f values/env/settings/otomi.yaml ]; then
71+
echo -n "$(yq '.spec.version' values/env/settings/otomi.yaml)" > $(results.OTOMI_VERSION.path)
72+
else
73+
echo -n "$(yq '.otomi.version' values/env/settings.yaml)" > $(results.OTOMI_VERSION.path)
74+
fi
75+
7176
cd values
7277
# Check if team files has been changed
7378
if git diff --name-only HEAD~1 | grep -e "env/.*.teams" -e "env/teams"; then

charts/team-ns/templates/argocd/argocd-applicationset.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ spec:
1414
repoURL: "{{ $v.gitOps.workloadValuesRepoUrl }}"
1515
revision: HEAD
1616
files:
17-
- path: "env/teams/workloads/{{ $v.teamId }}/{{ .name }}.yaml"
17+
- path: "env/teams/{{ $v.teamId }}/workloadValues/{{ .name }}.yaml"
1818
template:
1919
metadata:
2020
name: 'team-{{ $v.teamId }}-{{ .name }}'
@@ -80,6 +80,15 @@ spec:
8080
kind: ValidatingWebhookConfiguration
8181
jqPathExpressions:
8282
- '.webhooks[]?.clientConfig.caBundle'
83+
- group: admissionregistration.k8s.io
84+
kind: MutatingWebhookConfiguration
85+
jqPathExpressions:
86+
- '.webhooks[]?.clientConfig.caBundle'
87+
- group: "apps"
88+
kind: "StatefulSet"
89+
jqPathExpressions:
90+
- ".spec.volumeClaimTemplates[].apiVersion"
91+
- ".spec.volumeClaimTemplates[].kind"
8392
{{- end }}
8493
destination:
8594
server: 'https://kubernetes.default.svc'

docs/migrating-values.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Let's take a look at an example:
3636
changes:
3737
- version: 3
3838
renamings:
39-
- env/base.yaml: env/settings.yaml
39+
- env/base.yaml: env/settings/otomi.yaml
4040
deletions:
4141
# The key at (json)path charts.bla.someProp gets removed from ENV_DIR
4242
- charts.bla.someProp

helmfile.d/helmfile-60.teams.yaml

+11-14
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ bases:
1818
releases:
1919
{{- range $teamId, $team := omit $tc "admin" }}
2020
{{- $teamServices := ($team | get "services" list) }}
21+
{{- $teamSettings := $team.settings }}
2122
{{- $domain := ($v.cluster | get "domainSuffix" nil) }}
2223
{{- $alertmanagerDomain := printf "alertmanager.%s" $domain }}
2324
{{- $prometheusDomain := printf "prometheus-%s.%s" $teamId $domain }}
2425
{{- $grafanaDomain := printf "grafana-%s.%s" $teamId $domain }}
25-
{{- $azure := $team | get "azure" dict }}
2626
{{- $teamApps := index $tc $teamId "apps" | default dict }}
2727
- name: tekton-dashboard-{{ $teamId }}
2828
installed: true
@@ -37,7 +37,7 @@ releases:
3737
- resources:
3838
{{- $teamApps.tekton.resources.dashboard | toYaml | nindent 10 }}
3939
- name: prometheus-{{ $teamId }}
40-
installed: {{ or ($team | get "managedMonitoring.grafana" false) ($team | get "managedMonitoring.alertmanager" false) }}
40+
installed: {{ or ($teamSettings | get "managedMonitoring.grafana" false) ($teamSettings | get "managedMonitoring.alertmanager" false) }}
4141
namespace: team-{{ $teamId }}
4242
chart: ../charts/kube-prometheus-stack
4343
labels:
@@ -50,7 +50,7 @@ releases:
5050
- nameOverride: {{ $teamId }}-po
5151
fullnameOverride: {{ $teamId }}-po
5252
alertmanager:
53-
enabled: {{ $team | get "managedMonitoring.alertmanager" false }}
53+
enabled: {{ $teamSettings | get "managedMonitoring.alertmanager" false }}
5454
namespaceOverride: null
5555
alertmanagerSpec:
5656
externalUrl: "https://alertmanager-{{ $teamId }}.{{ $domain }}"
@@ -62,7 +62,7 @@ releases:
6262
resources:
6363
{{- $teamApps.alertmanager.resources | toYaml | nindent 14 }}
6464
# to do: load slackTpl and opsgenieTpl only if alerts.receicers = true
65-
config: {{- tpl (readFile "../helmfile.d/snippets/alertmanager-teams.gotmpl") (dict "instance" $team "root" $v "slackTpl" $slackTpl "opsgenieTpl" $opsgenieTpl) | nindent 12 }}
65+
config: {{- tpl (readFile "../helmfile.d/snippets/alertmanager-teams.gotmpl") (dict "instance" $teamSettings "root" $v "slackTpl" $slackTpl "opsgenieTpl" $opsgenieTpl) | nindent 12 }}
6666
defaultRules:
6767
rules:
6868
general: false
@@ -72,7 +72,7 @@ releases:
7272
enabled: false
7373
prometheusSpec: {}
7474
grafana:
75-
enabled: {{ $team | get "managedMonitoring.grafana" false }}
75+
enabled: {{ $teamSettings | get "managedMonitoring.grafana" false }}
7676
resources:
7777
{{- $teamApps.grafana.resources.grafana | toYaml | nindent 12 }}
7878
namespaceOverride: null # team-{{ $teamId }}
@@ -135,7 +135,7 @@ releases:
135135
basicAuth: true
136136
basicAuthUser: {{ $teamId }}
137137
secureJsonData:
138-
basicAuthPassword: {{ $team.password | quote }}
138+
basicAuthPassword: {{ $teamSettings.password | quote }}
139139
jsonData:
140140
derivedFields:
141141
- datasourceName: Tempo
@@ -181,9 +181,9 @@ releases:
181181
tag: 'http.path'
182182
lokiSearch:
183183
datasourceUid: 'loki'
184-
{{- if has "msteams" ($team | get "alerts.receivers" list) }}
184+
{{- if has "msteams" ($teamSettings | get "alerts.receivers" list) }}
185185
- name: prometheus-msteams-{{ $teamId }}
186-
installed: {{ $team | get "managedMonitoring.alertmanager" false }}
186+
installed: {{ $teamSettings | get "managedMonitoring.alertmanager" false }}
187187
namespace: team-{{ $teamId }}
188188
chart: ../charts/prometheus-msteams
189189
labels:
@@ -199,11 +199,11 @@ releases:
199199
additionalLabels:
200200
release: prometheus-{{ $teamId }}
201201
connectors:
202-
- high_priority_channel: {{ $team | get "msteams.highPrio" }}
203-
- low_priority_channel: {{ $team | get "msteams.lowPrio" }}
202+
- high_priority_channel: {{ $teamSettings | get "msteams.highPrio" }}
203+
- low_priority_channel: {{ $teamSettings | get "msteams.lowPrio" }}
204204
{{- end }}
205205
- name: grafana-dashboards-{{ $teamId }}
206-
installed: {{ $team | get "managedMonitoring.grafana" false }}
206+
installed: {{ $teamSettings | get "managedMonitoring.grafana" false }}
207207
namespace: team-{{ $teamId }}
208208
chart: ../charts/grafana-dashboards
209209
labels:
@@ -218,9 +218,6 @@ releases:
218218
{{- if $v.apps.falco.enabled }}
219219
- falco-teams
220220
{{- end }}
221-
{{- if and (eq $v.cluster.provider "azure") ($team | get "azureMonitor" ($v | get "azure.monitor" nil)) }}
222-
- azure
223-
{{- end }}
224221
{{- if $v.apps.trivy.enabled }}
225222
- trivy-teams
226223
{{- end }}

0 commit comments

Comments
 (0)