File nginx-ingress-controller.spec of Package nginx-ingress-controller
#
# spec file for package nginx-ingress-controller
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global import_path k8s.io/ingress-nginx
Name: nginx-ingress-controller
Version: 0.15.0
Release: 0
Summary: Kubernetes ingress controller for nginx
License: Apache-2.0
Group: Productivity/Networking/Web/Proxy
Url: https://github.com/kubernetes/ingress-nginx
Source0: https://github.com/kubernetes/ingress-nginx/archive/nginx-%{version}.tar.gz#/ingress-nginx-%{version}.tar.gz
Source1: nginx-ingress-controller-rpmlintrc
Patch0: rootless-is-port-available.patch
Requires(pre): %fillup_prereq
BuildRequires: golang-packaging
BuildRequires: golang(API) >= 1.10
%description
An Ingress controller is meant to handle all the quirks associated
with a specific "class" of Ingress.
An Ingress Controller is a daemon, deployed as a Kubernetes Pod, that watches
the apiserver's /ingresses endpoint for updates to the Ingress resource. Its
job is to satisfy requests for Ingresses.
%package -n kubernetes-404-server
Summary: Webserver needed for the Kubernetes ingress functionality
Group: Productivity/Networking/Web/Proxy
%description -n kubernetes-404-server
404-server is a webserver that satisfies the Kubernetes ingress, which
means it has to do two things:
* Serve a 404 page at /
* Serve 200 on a /healthz
%prep
%setup -q -n ingress-nginx-nginx-%{version}
%patch0 -p1
%build
%goprep %{import_path}
export GOPATH=${RPM_BUILD_DIR}/go
CGO_ENABLED=0 go build -a -installsuffix cgo -o nginx-ingress-controller k8s.io/ingress-nginx/cmd/nginx
CGO_ENABLED=0 go build -a -installsuffix cgo -o kubernetes-404-server k8s.io/ingress-nginx/images/404-server
%install
install -D -m 0755 nginx-ingress-controller %{buildroot}%{_bindir}/nginx-ingress-controller
install -D -m 0755 kubernetes-404-server %{buildroot}%{_bindir}/kubernetes-404-server
%files
%{_bindir}/nginx-ingress-controller
%license LICENSE
%files -n kubernetes-404-server
%{_bindir}/kubernetes-404-server
%changelog