1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

net/kube-apiserver: Add new port

The Kubernetes API server validates and configures data for the api
objects which include pods, services, replicationcontrollers,
and others. The API Server services REST operations and provides
the frontend to the cluster's shared state through which all other
components interact.

Note: while testing this as a replacement of a Linux based on my lab,
I only saw Webhooks not working due to Kubernetes network mesh not implemented.
I added a notice about this for people who want to test it.

PR:		267308
This commit is contained in:
Loic Blot 2023-01-17 20:32:43 +01:00 committed by Mikael Urankar
parent f665aa3933
commit db9dab9d84
6 changed files with 90 additions and 0 deletions

View File

@ -339,6 +339,7 @@
SUBDIR += krill
SUBDIR += ksmtp
SUBDIR += ktnef
SUBDIR += kube-apiserver
SUBDIR += kube-controller-manager
SUBDIR += kube-scheduler
SUBDIR += l2tpd

View File

@ -0,0 +1,45 @@
PORTNAME= kube-apiserver
PORTVERSION= 1.26.0
DISTVERSIONPREFIX= v
CATEGORIES= net
MAINTAINER= loic.blot@unix-experience.fr
COMMENT= Kubernetes API service
WWW= https://github.com/kubernetes/kubernetes
LICENSE= APACHE20
USES= cpe go
CPE_VENDOR= jenkins
CPE_PRODUCT= kubernetes
USE_GITHUB= yes
GH_ACCOUNT= kubernetes
GH_PROJECT= kubernetes
BUILD_DATE= $$(date +'%Y-%m-%dT%H:%M:%SZ')
GO_PKGNAME= k8s.io/kubernetes
GO_TARGET= ${GO_PKGNAME}/cmd/kube-apiserver
GO_BUILDFLAGS= -ldflags="-X k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.buildDate=${BUILD_DATE} \
-X k8s.io/kubernetes/vendor/k8s.io/component-base/version.buildDate=${BUILD_DATE} \
-X k8s.io/client-go/pkg/version.buildDate=${BUILD_DATE} \
-X k8s.io/component-base/version.buildDate=${BUILD_DATE} \
-X k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitMinor=${PORTVERSION:R:E} \
-X k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitMinor=${PORTVERSION:R:E} \
-X k8s.io/client-go/pkg/version.gitMinor=${PORTVERSION:R:E} \
-X k8s.io/component-base/version.gitMinor=${PORTVERSION:R:E} \
-X k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitMajor=${PORTVERSION:R:R} \
-X k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitMajor=${PORTVERSION:R:R} \
-X k8s.io/client-go/pkg/version.gitMajor=${PORTVERSION:R:R} \
-X k8s.io/component-base/version.gitMajor=${PORTVERSION:R:R} \
-X k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitVersion=${DISTVERSIONPREFIX}${PORTVERSION} \
-X k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitVersion=${DISTVERSIONPREFIX}${PORTVERSION} \
-X k8s.io/client-go/pkg/version.gitVersion=${DISTVERSIONPREFIX}${PORTVERSION} \
-X k8s.io/component-base/version.gitVersion=${DISTVERSIONPREFIX}${PORTVERSION}"
USE_RC_SUBR= kube-apiserver
PLIST_FILES= bin/${PORTNAME}
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1670573676
SHA256 (kubernetes-kubernetes-v1.26.0_GH0.tar.gz) = a0de781db6d09d91f39306740420f150c5912606f52e4c9a859649f4313fe508
SIZE (kubernetes-kubernetes-v1.26.0_GH0.tar.gz) = 40269668

View File

@ -0,0 +1,24 @@
#!/bin/sh
#
# PROVIDE: kube-apiserver
# REQUIRE: DAEMON
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable kube-apiserver:
#
# kube-apiserver_enable="YES"
. /etc/rc.subr
name="kube_apiserver"
rcvar="kube_apiserver_enable"
load_rc_config $name
: ${kube_apiserver_enable:=no}
: ${kube_apiserver_args:="--bind-address=0.0.0.0 --v=2"}
pidfile="/var/run/${name}.pid"
command="/usr/sbin/daemon"
command_args="-P ${pidfile} -r -S -t ${name} -T ${name} /usr/local/bin/kube-apiserver ${kube_apiserver_args}"
run_rc_command "$1"

View File

@ -0,0 +1,5 @@
The Kubernetes API server validates and configures data for the api
objects which include pods, services, replicationcontrollers,
and others. The API Server services REST operations and provides
the frontend to the cluster's shared state through which all other
components interact.

View File

@ -0,0 +1,12 @@
[
{ type: install
message: <<EOM
----------------------------------------------------------------------
Thanks for installing Kubernetes API server on FreeBSD.
There is a known limitation on kube-apiserver currently:
* Webhooks cannot work as they require CNI network mesh in most of the
deployment. Currently Kubelet hasn't be ported to FreeBSD.
----------------------------------------------------------------------
EOM
}
]