Skip to content
Merged
Changes from all commits
Commits
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
109 changes: 87 additions & 22 deletions gitlab-kas-18.2.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
name: gitlab-kas-18.2
version: "18.2.3"
epoch: 0 # CVE-2025-47907
version: "18.2.4"
epoch: 1 # CVE-2025-47907
description: GitLab KAS is a component installed together with GitLab. It is required to manage the GitLab agent for Kubernetes.
copyright:
- license: MIT
Expand All @@ -14,22 +14,25 @@ var-transforms:
match: ^(\d+\.\d+)\.\d+$
replace: "$1"
to: major-minor-version
- from: ${{package.version}}
match: ^(\d+)\.\d+\.\d+$
replace: "$1"
to: major-version

pipeline:
- uses: git-checkout
with:
repository: https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent
tag: v${{package.version}}
expected-commit: 1c82a19884b61c6d7158f9d78b14d31286ccc59d
expected-commit: aa1b6f9f80359df0a30cfca92646227ee5acdf2e

- uses: go/build
with:
packages: ./cmd/kas
output: kas
ldflags: |
-w -X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.Version=v${{package.version}}
-X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.Commit=v${{package.version}}
-X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.BuildTime=$(date -d@${SOURCE_DATE_EPOCH} +%F-%T)
-w -X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v${{vars.major-version}}/internal/cmd.Version=v${{package.version}}
-X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v${{vars.major-version}}/internal/cmd.GitRef=$(git rev-parse HEAD)

subpackages:
- name: gitlab-agent-${{vars.major-minor-version}}
Expand All @@ -44,27 +47,89 @@ subpackages:
output: agentk
ldflags: |
-w
-X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.Version=v${{package.version}}
-X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.Commit=v${{package.version}}
-X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.BuildTime=$(date -d@${SOURCE_DATE_EPOCH} +%F-%T)
-X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v${{vars.major-version}}/internal/cmd.Version=v${{package.version}}
-X gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v${{vars.major-version}}/internal/cmd.GitRef=$(git rev-parse HEAD)
test:
pipeline:
- runs: agentk --version

update:
enabled: true
git:
strip-prefix: v
tag-filter-prefix: v18.2
- name: "Test agentk version and help"
runs: |
set -euo pipefail
agentk --help | grep "kas-address"
agentk --version | grep "${{package.version}}"
agentk --help | grep "token-file"
agentk --help | grep "GitLab Agent for Kubernetes"

test:
environment:
contents:
packages:
- gitlab-kas-${{vars.major-minor-version}}
- gitlab-agent-${{vars.major-minor-version}}
- wait-for-it
- curl
- valkey
- valkey-cli
pipeline:
- runs: |
kas --version
agentk --version
kas --help
- name: "Version and help tests for KAS and Agent"
runs: |
set -euo pipefail
kas --version | grep "${{package.version}}"
kas --help | grep "GitLab Kubernetes Agent Server"
- name: "Test KAS daemon with Valkey (Redis)"
uses: test/daemon-check-output
with:
setup: |
openssl rand -base64 32 > /tmp/auth_secret
openssl rand -base64 48 > /tmp/websocket_secret

valkey-server --port 6379 --daemonize yes --pidfile /tmp/valkey.pid --logfile /tmp/valkey.log

sleep 5

# Create KAS configuration with Redis
cat > /tmp/kas-config.yaml <<EOF
gitlab:
address: http://localhost:3000
authentication_secret_file: /tmp/auth_secret
redis:
server:
address: 127.0.0.1:6379
agent:
listen:
address: 127.0.0.1:8150
network: tcp
kubernetes_api:
listen:
address: 127.0.0.1:8154
network: tcp
websocket_token_secret_file: /tmp/websocket_secret
observability:
listen:
address: 127.0.0.1:8151
network: tcp
api:
listen:
address: 127.0.0.1:8153
network: tcp
authentication_secret_file: /tmp/auth_secret
private_api:
listen:
address: 127.0.0.1:8155
network: tcp
authentication_secret_file: /tmp/auth_secret
EOF
start: kas --configuration-file=/tmp/kas-config.yaml
timeout: 30
expected_output: |
Running KAS
endpoint is up
post: |
set -o pipefail
wait-for-it 127.0.0.1:8151 -t 10

curl -fsSL -o /dev/null -w "%{http_code}" http://127.0.0.1:8151/liveness | grep -F "200"
curl -fsSL -o /dev/null -w "%{http_code}" http://127.0.0.1:8151/readiness | grep -F "200"

update:
enabled: true
git:
strip-prefix: v
tag-filter-prefix: v18.2
Loading