Skip to content

Commit 1a60b85

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/ts-node-dev-2.0.0
2 parents 4e26b7c + 54b2960 commit 1a60b85

File tree

419 files changed

+29666
-21100
lines changed

Some content is hidden

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

419 files changed

+29666
-21100
lines changed

.env.sample

+1-14
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,11 @@ DISABLE_SYNC=1
88
# ENV_DIR=''
99

1010
# KMS access from here on
11-
# Google (paste json key here without newlines nor spaces and double quotes escaped)
12-
GCLOUD_SERVICE_KEY="\"some\":\"key\""
13-
# Azure:
14-
AZURE_TENANT_ID=''
15-
AZURE_CLIENT_ID=''
16-
AZURE_CLIENT_SECRET=''
17-
# AWS:
18-
AWS_DEFAULT_REGION=''
19-
AWS_REGION=''
20-
AWS_ACCESS_KEY_ID=''
21-
AWS_SECRET_ACCESS_KEY=''
22-
# AGE:
2311
SOPS_AGE_KEY=''
2412

2513
OTOMI_CHARTS_URL='https://github.com/linode/apl-charts.git'
2614

27-
2815
RETRIES=6
2916
RANDOM=false
3017
MIN_TIMEOUT=10000
31-
FACTOR=1
18+
FACTOR=1

.github/workflows/Releases.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
dry-run:
7+
type: boolean
8+
description: 'Dry run: Uncheck if you want to publish a release'
9+
default: true
10+
11+
jobs:
12+
release-please:
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
- name: Install dependencies
21+
run: |
22+
npm install semantic-release@24 @semantic-release/git @semantic-release/changelog -D
23+
- name: Release
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
run: npx semantic-release --dry-run=${{ github.event.inputs.dry-run }}

.github/workflows/integration.yml

+26-19
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Deploy APL
22
on:
33
workflow_call:
44
inputs:
5+
linode_types:
6+
description: 'Linode instance types'
7+
type: string
8+
default: g6-dedicated-8
59
kubernetes_versions:
610
description: 'Kubernetes version'
711
type: string
@@ -28,14 +32,26 @@ on:
2832
default: 'false'
2933
workflow_dispatch:
3034
inputs:
35+
linode_types:
36+
description: 'Linode instance types'
37+
type: choice
38+
options:
39+
- g6-dedicated-4
40+
- g6-dedicated-8
41+
- g6-dedicated-16
42+
- g6-dedicated-32
43+
- g6-dedicated-48
44+
- g6-dedicated-50
45+
- g6-dedicated-56
46+
default: g6-dedicated-4
3147
kubernetes_versions:
3248
description: 'Kubernetes version'
3349
type: choice
3450
options:
35-
- "['1.29']"
3651
- "['1.30']"
3752
- "['1.31']"
38-
default: "['1.31']"
53+
- "['1.32']"
54+
default: "['1.32']"
3955
install_profile:
4056
description: APL installation profile
4157
default: minimal-with-team
@@ -198,7 +214,7 @@ jobs:
198214
--region nl-ams \
199215
--k8s_version ${{ env.LINODE_K8S_VERSION }} \
200216
--control_plane.high_availability true \
201-
--node_pools.type g6-dedicated-8 --node_pools.count 3 \
217+
--node_pools.type ${{ inputs.linode_types }} --node_pools.count 3 \
202218
--node_pools.autoscaler.enabled true \
203219
--node_pools.autoscaler.max 3 \
204220
--node_pools.autoscaler.min 3 \
@@ -223,24 +239,15 @@ jobs:
223239
224240
sleep 30
225241
done
226-
- name: Save kubectl config with auth token and Get kubectl environment and create docker secret
242+
- name: Save kubectl config with auth token
227243
if: ${{ inputs.install_profile != 'no-apl' }}
228244
run: |
229-
# Get the kubeconfig from linode-cli
230-
kubeconfig=$(linode-cli lke kubeconfig-view ${{ env.LINODE_CLUSTER_ID }} --text | sed 1d | base64 --decode)
231-
232-
# Save the kubeconfig to a file
233-
kubeconfigDir="$HOME/.kube"
234-
kubeconfigPath="$HOME/.kube/config"
235-
mkdir -p "$kubeconfigDir" # Create the directory if it doesn't exist
236-
echo "$kubeconfig" > "$kubeconfigPath"
237-
echo "Kubeconfig saved to $kubeconfigPath"
238-
239-
# Set the kubectl context to use the new kubeconfig
240-
export KUBECONFIG="$kubeconfigPath"
241-
contextName=$(kubectl config get-contexts -o name | head -n 1)
242-
kubectl config use-context "$contextName"
243-
echo "Kubectl context set to linode"
245+
echo "Waiting for kubeconfig..."
246+
while :; do
247+
linode-cli get-kubeconfig --label "${{ env.LINODE_CLUSTER_NAME }}" 2> /dev/null && break
248+
echo "still waiting..."
249+
sleep 10
250+
done
244251
echo LINODE_CLUSTER_CONTEXT=`kubectl config current-context` >> $GITHUB_ENV
245252
- name: Create image pull secret on test cluster
246253
if: ${{ inputs.install_profile != 'no-apl' }}

.github/workflows/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
#Cut the CHANGELOG.md file up to the first occurence of the "### \[[0-9]*" (meaning three #, a space,a square bracket and any number after it)
106106
sed -n '/### \[[0-9]*/q;p' CHANGELOG.md > NEW_CHANGELOG.md
107107
- name: Create GitHub release
108-
uses: ncipollo/release-action@v1.14.0
108+
uses: ncipollo/release-action@v1.16.0
109109
env:
110110
token: ${{ secrets.GITHUB_TOKEN }}
111111
with:
@@ -177,7 +177,7 @@ jobs:
177177
run: git config --global --add safe.directory /__w/apl-core/apl-core
178178
- name: Create and publish otomi chart release
179179
id: chart_release
180-
uses: helm/chart-releaser-action@v1.6.0
180+
uses: helm/chart-releaser-action@v1.7.0
181181
with:
182182
charts_dir: chart
183183
skip_existing: true

.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

.releaserc.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"branches": ["releases/rel-*", "main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
[
7+
"@semantic-release/changelog",
8+
{
9+
"changelogFile": "CHANGELOG.md"
10+
}
11+
],
12+
[
13+
"@semantic-release/git",
14+
{
15+
"assets": ["CHANGELOG.md"],
16+
"message": "chore(release): ${nextRelease.version} CHANGELOG.md update [ci skip]\n\n${nextRelease.notes}"
17+
}
18+
],
19+
"@semantic-release/github"
20+
]
21+
}

.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

bin/install-deps.sh

+19-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,26 @@ go install github.com/noqcks/gucci@latest
44
go install github.com/plexsystems/konstraint@latest
55
npm install -g json-dereference-cli
66

7+
# Desired version
8+
helm_secrets_target_version="4.6.2"
9+
10+
# Get the installed version of helm-secrets
11+
helm_secrets_installed_version=$(helm plugin list | awk '/secrets/ {print $2}')
12+
13+
# Compare versions and update if necessary
14+
if [ -z "$helm_secrets_installed_version" ]; then
15+
echo "helm-secrets is not installed. Installing version $helm_secrets_target_version..."
16+
helm plugin install https://github.com/jkroepke/helm-secrets --version "$helm_secrets_target_version"
17+
elif [ "$(printf '%s\n' "$helm_secrets_installed_version" "$helm_secrets_target_version" | sort -V | head -n1)" != "$helm_secrets_target_version" ]; then
18+
echo "Updating helm-secrets from version $helm_secrets_installed_version to $helm_secrets_target_version..."
19+
helm plugin uninstall secrets
20+
helm plugin install https://github.com/jkroepke/helm-secrets --version "$helm_secrets_target_version"
21+
else
22+
echo "helm-secrets is up-to-date (version $helm_secrets_installed_version)."
23+
fi
24+
725
helm plugin install https://github.com/databus23/helm-diff.git || echo "Skipping helm-diff"
8-
helm plugin install https://github.com/jkroepke/helm-secrets.git --version v3.15.0 || echo "Skipping helm-secret"
26+
927

1028
echo "Set shell rc file:"
1129
echo 'echo export PATH="$HOME/go/bin:$PATH" >> $HOME/.zshrc'

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

0 commit comments

Comments
 (0)