diff --git a/keda-2.19.yaml b/keda-2.19.yaml new file mode 100644 index 000000000000..3757b1ee6a4b --- /dev/null +++ b/keda-2.19.yaml @@ -0,0 +1,165 @@ +package: + name: keda-2.19 + version: "2.19.0" + epoch: 0 # GHSA-cfpf-hrx2-8rv6 + description: KEDA is a Kubernetes-based Event Driven Autoscaling component. It provides event driven scale for any container running in Kubernetes + copyright: + - license: Apache-2.0 + dependencies: + runtime: + - tzdata + provides: + - keda=${{package.full-version}} + +environment: + contents: + packages: + - build-base + - busybox + - ca-certificates-bundle + - go + - protobuf-dev + - protoc + +pipeline: + - uses: git-checkout + with: + expected-commit: 3f88d60ae92f1174f67738f079f96ec17eeee77f + repository: https://github.com/kedacore/keda + tag: v${{package.version}} + + - runs: | + # Generate code and protobufs; requires go and openssl + make generate + + - uses: go/build + with: + packages: ./cmd/operator + output: keda + ldflags: | + -X github.com/kedacore/keda/v2/version.GitCommit=$(git rev-list -1 HEAD) -X github.com/kedacore/keda/v2/version.Version=${{package.version}} \ + -X github.com/kedacore/keda/v2/version.Version=${{package.version}} + +subpackages: + - name: "${{package.name}}-metrics-apiserver" + description: "Metrics adapter for Keda" + dependencies: + runtime: + - openssl + - tzdata + provides: + - keda-adapter=${{package.full-version}} + - keda-metrics-apiserver=${{package.full-version}} + pipeline: + - uses: go/build + with: + packages: ./cmd/adapter + output: keda-adapter + ldflags: | + -X github.com/kedacore/keda/v2/version.GitCommit=$(git rev-list -1 HEAD) -X github.com/kedacore/keda/v2/version.Version=${{package.version}} \ + -X github.com/kedacore/keda/v2/version.Version=${{package.version}} + test: + pipeline: + - runs: | + # outputs to stderr + keda-adapter --help 2>&1 | grep -q "kubeconfig" + + - name: "${{package.name}}-admission-webhooks" + description: "Webhooks for Keda" + dependencies: + runtime: + - openssl + - tzdata + provides: + - keda-admission-webhooks=${{package.full-version}} + pipeline: + - uses: go/build + with: + packages: ./cmd/webhooks + output: keda-admission-webhooks + ldflags: | + -X github.com/kedacore/keda/v2/version.GitCommit=$(git rev-list -1 HEAD) -X github.com/kedacore/keda/v2/version.Version=${{package.version}} \ + -X github.com/kedacore/keda/v2/version.Version=${{package.version}} + test: + pipeline: + - runs: | + # outputs to stderr + keda-admission-webhooks --help 2>&1 | grep -q "kubeconfig" + + - name: "${{package.name}}-compat" + description: "Compatibility package to place binaries in the location expected by upstream helm charts" + dependencies: + provides: + - keda-compat=${{package.full-version}} + pipeline: + - runs: | + # The helm chart expects the keda binaries to be in / instead of /usr/bin + mkdir -p "${{targets.subpkgdir}}" + ln -sf /usr/bin/keda ${{targets.subpkgdir}}/keda + ln -sf /usr/bin/keda-admission-webhooks ${{targets.subpkgdir}}/keda-admission-webhooks + ln -sf /usr/bin/keda-adapter ${{targets.subpkgdir}}/keda-adapter + - uses: strip + test: + pipeline: + - uses: test/virtualpackage + with: + virtual-pkg-name: keda-compat + real-pkg-name: ${{subpkg.name}} + +update: + enabled: true + github: + identifier: kedacore/keda + strip-prefix: v + tag-filter: v2.19. + +test: + environment: + contents: + packages: + - ${{package.name}} + - ${{package.name}}-metrics-apiserver + - ${{package.name}}-admission-webhooks + - ${{package.name}}-compat + environment: + WATCH_NAMESPACE: keda + pipeline: + - name: "Binary checks" + runs: | + # outputs to stderr + keda --help 2>&1 | grep -q "k8s-cluster-domain" + - uses: test/kwok/cluster + with: + serviceaccount: false + # Minimal package test, for endpoint testing, CRD installation would be required + - name: "Test KEDA operator startup" + uses: test/daemon-check-output + with: + setup: | + # Create minimal service account directory + DIR=/var/run/secrets/kubernetes.io/serviceaccount + mkdir -p "$DIR" + echo "fake-token" > "$DIR/token" + echo "fake-ca" > "$DIR/ca.crt" + echo "keda" > "$DIR/namespace" + # Create certs directory that KEDA expects + mkdir -p /certs + cp "$DIR/ca.crt" /certs/ca.crt + # Create dummy TLS certificate for webhooks + openssl req -x509 -newkey rsa:2048 -keyout /certs/tls.key -out /certs/tls.crt -days 1 -nodes -subj "/CN=keda-webhooks" + start: keda --zap-log-level=info --zap-encoder=console + timeout: 30 + expected_output: | + KEDA Version: ${{package.version}} + Starting manager + Starting metrics server + Starting EventSource + error_strings: | + # expects CRD related errors + FAIL + FATAL + Traceback.*most.recent.call + Exception in thread + java.lang.NullPointerException + java.lang.RuntimeException + Gem::MissingSpecError