[dev] Enable Keda in Mariner (#1334)

* save current changes

* save more changes

* wrap implementation

* cri-o implementation

* take out cni PR contents

* revert cni PR changes

* add license and manifest info

* fix typo in manifest

* fix licensing and manifest issue

* fix conmon spec naming issue

* fix license map

* fix linting

* resolve PR comments

* save changes for keda

* keda implementation

* remove unnecessary files

* update manifest and license info

Co-authored-by: Henry Li <lihl@microsoft.com>
This commit is contained in:
Henry Li 2021-08-25 16:30:06 -07:00 committed by GitHub
parent bd94b19669
commit 504f1b50c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 77 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -207,6 +207,7 @@
"installkernel",
"ivykis",
"jsonbuilder",
"keda",
"kubernetes-1.18.14",
"kubernetes-1.18.17",
"kubernetes-1.19.7",

View File

@ -0,0 +1,6 @@
{
"Signatures": {
"keda-2.4.0-vendor.tar.gz": "bf5f2e19aac2c178a868aa1b1245b11d5ed4a51b0713d1f41154987f062f986e",
"keda-2.4.0.tar.gz": "e3a44a7be2d80369fb490898fb3f5605170a2848c8f30c6c24eb68fb57cfd3e0"
}
}

59
SPECS/keda/keda.spec Normal file
View File

@ -0,0 +1,59 @@
Summary: Kubernetes-based Event Driven Autoscaling
Name: keda
Version: 2.4.0
Release: 1%{?dist}
License: ASL 2.0
Vendor: Microsoft Corporation
Distribution: Mariner
URL: https://github.com/kedacore/keda
#Source0: https://github.com/kedacore/%%{name}/archive/refs/tags/v%%{version}.tar.gz
Source0: %{name}-%{version}.tar.gz
# Below is a manually created tarball, no download link.
# We're using pre-populated Go modules from this tarball, since network is disabled during build time.
# How to re-build this file:
# 1. wget https://github.com/kedacore/%%{name}/archive/refs/tags/v%%{version}.tar.gz -O %%{name}-%%{version}.tar.gz
# 2. tar -xf %%{name}-%%{version}.tar.gz
# 3. cd %%{name}-%%{version}
# 4. go mod vendor
# 5. tar --sort=name \
# --mtime="2021-04-26 00:00Z" \
# --owner=0 --group=0 --numeric-owner \
# --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
# -cf %%{name}-%%{version}-vendor.tar.gz vendor
#
Source1: %{name}-%{version}-vendor.tar.gz
BuildRequires: golang >= 1.15
%description
KEDA is a Kubernetes-based Event Driven Autoscaling component.
It provides event driven scale for any container running in Kubernetes
%prep
%setup -q
%build
# create vendor folder from the vendor tarball and set vendor mode
tar -xf %{SOURCE1} --no-same-owner
export LDFLAGS="-X=github.com/kedacore/keda/v2/version.GitCommit= -X=github.com/kedacore/keda/v2/version.Version=main"
go build -ldflags "$LDFLAGS" -mod=vendor -v -o bin/keda main.go
gofmt -l -w -s .
go vet ./...
go build -ldflags "$LDFLAGS" -mod=vendor -v -o bin/keda-adapter adapter/main.go
%install
mkdir -p %{buildroot}%{_bindir}
cp ./bin/keda %{buildroot}%{_bindir}
cp ./bin/keda-adapter %{buildroot}%{_bindir}
%files
%defattr(-,root,root)
%license LICENSE
%{_bindir}/%{name}
%{_bindir}/%{name}-adapter
%changelog
* Wed Aug 25 2021 Henry Li <lihl@microsoft.com> - 2.4.0-1
- Original version for CBL-Mariner

View File

@ -2554,6 +2554,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "keda",
"version": "2.4.0",
"downloadUrl": "https://github.com/kedacore/keda/archive/refs/tags/v2.4.0.tar.gz"
}
}
},
{
"component": {
"type": "other",