Bug 267307 - net/{kube-controller-manager,kube-scheduler}: update to 1.25.4
Summary: net/{kube-controller-manager,kube-scheduler}: update to 1.25.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Mikael Urankar
URL: https://github.com/kubernetes/kuberne...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-24 11:47 UTC by loic.blot
Modified: 2023-01-18 14:51 UTC (History)
4 users (show)

See Also:
loic.blot: maintainer-feedback+


Attachments
kube.patch (2.28 KB, patch)
2022-10-24 11:48 UTC, loic.blot
fernape: maintainer-approval+
Details | Diff
kube-scheduler.patch (3.42 KB, patch)
2022-11-04 15:32 UTC, loic.blot
loic.blot: maintainer-approval+
Details | Diff
kube-scheduler.patch (3.70 KB, text/plain)
2022-11-04 15:43 UTC, loic.blot
no flags Details
kube-controller-manager.patch (3.07 KB, patch)
2022-11-04 15:50 UTC, loic.blot
loic.blot: maintainer-approval+
Details | Diff
kube-controller-manager.patch (4.61 KB, patch)
2022-11-11 12:27 UTC, loic.blot
no flags Details | Diff
kube-scheduler.patch (5.28 KB, patch)
2022-11-11 12:28 UTC, loic.blot
no flags Details | Diff
kube-controller-manager.patch (4.67 KB, patch)
2022-11-12 09:16 UTC, loic.blot
loic.blot: maintainer-approval+
Details | Diff
kube-scheduler.patch (5.98 KB, patch)
2022-11-12 09:17 UTC, loic.blot
loic.blot: maintainer-approval+
Details | Diff
kube-{scheduler,controller-manager}.diff (6.58 KB, patch)
2022-11-12 21:29 UTC, loic.blot
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description loic.blot 2022-10-24 11:47:51 UTC
Hello,
long time since i didn't updated those packages, they should not be often used, but as i see there is efforts around runj and containerd, maybe at a time we'll see Kubernetes on FreeBSD ? :)
Comment 1 loic.blot 2022-10-24 11:48:38 UTC
Created attachment 237579 [details]
kube.patch
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2022-10-27 12:22:07 UTC
^Triage: Please set the maintainer-approval attachment flag (to ?) and set the requestee field to the e-mail address of the maintainer to ask for maintainer approval.

Q/A: PORTREVISION needs to be removed. Should be 0 on PORT/DISTVERSION bump.

Thanks!
Comment 3 loic.blot 2022-10-27 13:59:41 UTC
i'm the maintainer, i approved myself. Can you hot change the patch on apply to be compliant with rules ? :)
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2022-10-27 14:01:51 UTC
^Triage: Maintainer-feedback flag (+) not required unless requested (?) first.
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2022-10-27 14:38:58 UTC
Just for curiosity, why not updating to 1.25 release?
https://kubernetes.io/releases/#release-v1-25
Comment 6 loic.blot 2022-10-29 17:30:20 UTC
just because i didn't tested it yet, i have currently 1.24 cluster, but promise when i plan to switch to 1.25 i'll test it and publish a patch. Just 1.25 remove PSP and it's long to switch to 1.25 without loosing the PSP like support
Comment 7 Nuno Teixeira freebsd_committer freebsd_triage 2022-10-29 21:11:17 UTC
On both ports, BUILD_DATE= 2019-01-30T00:00:00Z

Shouldn't it be updated or use a dynamic one date +'%Y-%m-%dT%H:%M:%SZ'?
Comment 8 Nuno Teixeira freebsd_committer freebsd_triage 2022-10-29 21:12:49 UTC
(In reply to Nuno Teixeira from comment #7)
(...)

* version.buildDate=$$(date +'%Y-%m-%dT%H:%M:%SZ')?
Comment 9 loic.blot 2022-11-04 15:32:09 UTC
Created attachment 237858 [details]
kube-scheduler.patch

Add a new patch for kube-scheduler in order to add rc.d script & default configuration
Comment 10 Nuno Teixeira freebsd_committer freebsd_triage 2022-11-04 15:37:21 UTC
(In reply to loic.blot from comment #9)

What about BUILD_DATE?

Thanks
Comment 11 loic.blot 2022-11-04 15:40:54 UTC
wait i'm working on various enhancement points, just a second :) i need to prepare kube-controller-manager default setup too.

For the 1.25 i'm not ready to test it, whereas i have a working 1.24.7 setup
Comment 12 loic.blot 2022-11-04 15:43:10 UTC
Created attachment 237859 [details]
kube-scheduler.patch
Comment 13 loic.blot 2022-11-04 15:50:19 UTC
Created attachment 237860 [details]
kube-controller-manager.patch

Add kube-controller-manager install message & rc.d script
Comment 14 loic.blot 2022-11-04 15:50:51 UTC
Nuno Teixeira BUILD_DATE point fixed & both patchs are not ready to be merged
Comment 15 loic.blot 2022-11-11 11:23:13 UTC
don't merge it yet, i just finished my upgrade plan to prepare 1.25.x series i'm testing the 1.25.4 now, i will publish new diff today
Comment 16 loic.blot 2022-11-11 12:27:24 UTC
Created attachment 238013 [details]
kube-controller-manager.patch

1.25.4 upgrade + service + build flags fix
Comment 17 loic.blot 2022-11-11 12:28:09 UTC
Created attachment 238014 [details]
kube-scheduler.patch

1.25.4 upgrade + service + buildflags fix
Comment 18 loic.blot 2022-11-11 12:51:53 UTC
ready to be merged and up-to date version this time :)
Comment 19 Nuno Teixeira freebsd_committer freebsd_triage 2022-11-11 22:22:38 UTC
1.
version.buildDate=${BUILD_DATE}
BUILD_DATE is not defined.

2.
Do we need to set version.gitMinor and version.gitMajor?
Isn't version.gitVersion satisfy both?

3.
version.buildDate, version.gitMinor, version.gitMajor and version.gitVersion are applied to several targets.
Do we need all those targets?
Comment 20 loic.blot 2022-11-12 09:16:34 UTC
Created attachment 238028 [details]
kube-controller-manager.patch

fix kube-controller-manager BUILD_DATE
Comment 21 loic.blot 2022-11-12 09:17:28 UTC
Created attachment 238029 [details]
kube-scheduler.patch

fix BUILD_DATE on kube-scheduler
Comment 22 loic.blot 2022-11-12 09:18:24 UTC
Thanks Nuno,
for point 1 it's fixed, i forgot to make it dynamic ty.
for point 2 and 3, it refers on official build process, then all is mandatory, see https://github.com/kubernetes/kubernetes/blob/f33ddd1b9c1f53ca9bb7dd8a55c7e15ced1292a8/hack/lib/version.sh#L154

I hope this time we can merge :)
Comment 23 Nuno Teixeira freebsd_committer freebsd_triage 2022-11-12 12:15:45 UTC
(In reply to loic.blot from comment #22)

Uploaded patches are not git formated and I can't apply them with patch.
Please send git patches.

Don't forget to remove PORTREVISON line, since it will become 0.

I think we are good to go.
Comment 24 loic.blot 2022-11-12 14:29:52 UTC
rofl, this process is a bit slow, i don't have the ports as git repo, let me fork it on a machine and do a proper git diff (i can put it on github mirror if you prefer)
Comment 25 Nuno Teixeira freebsd_committer freebsd_triage 2022-11-12 14:48:14 UTC
(In reply to loic.blot from comment #24)
Yes, please upload a git patch.
Current patches doesn't apply at all.
Comment 26 Nuno Teixeira freebsd_committer freebsd_triage 2022-11-12 15:10:40 UTC
(In reply to loic.blot from comment #24)
(...)

Or a tarball of both ports since you aren't using a git repo.
Comment 27 loic.blot 2022-11-12 21:29:16 UTC
Created attachment 238038 [details]
kube-{scheduler,controller-manager}.diff

Here is git diff of the controller manager & scheduler with PORTREVISION removed
Comment 28 Nuno Teixeira freebsd_committer freebsd_triage 2022-11-12 22:08:57 UTC
(In reply to loic.blot from comment #27)

Almost there, there are missing files in patch:
kube-scheduler.in
scheduler.yaml.sample
pkg-message
kube-controller-manager.in
etc

You need to `git add` those files.

Final diff will be `git diff --staged`
Comment 29 Nuno Teixeira freebsd_committer freebsd_triage 2022-11-13 15:41:30 UTC
Cannot apply uploaded patches.
Back to pool.
Comment 30 loic.blot 2022-11-13 15:57:08 UTC
Here is the Github PR: https://github.com/freebsd/freebsd-ports/pull/136/files
Comment 31 Graham Perrin freebsd_committer freebsd_triage 2022-12-30 01:21:04 UTC
Triage: 

* PR 136 in GitHub was referenced by a commit on 2022-11-15

* the patch-ready keyword is deprecated.

(The dashboard showed this ports bug as ready to be taken by a committer.)
Comment 32 Mikael Urankar freebsd_committer freebsd_triage 2023-01-16 17:16:50 UTC
There is an error with net/kube-scheduler

[00:00:27] Error: Build failed in phase: check-plist

===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: bin/kube-scheduler
Error: Missing: etc/rc.d/kube-scheduler
Comment 33 loic.blot 2023-01-16 20:19:41 UTC
Hello Mikael, i reviewed, and yeah it's useless lines, exact.
PR has been updated on github and now also updated to 1.26.0 version.
If you are okay, go ahead to merge it, if we want at a point Kubernetes on FreeBSD.

I'll work on kube-apiserver port when this one is merged, to ensure i reproduce same good practices
Comment 34 Mikael Urankar freebsd_committer freebsd_triage 2023-01-17 16:31:34 UTC
(In reply to loic.blot from comment #33)
Thanks, I took the liberty to remove portrevision and convert a space to a tab.
Comment 35 commit-hook freebsd_committer freebsd_triage 2023-01-17 16:31:47 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=264a02d617e3675c8b1b4e5bfa909d604fc48ef0

commit 264a02d617e3675c8b1b4e5bfa909d604fc48ef0
Author:     Loic Blot <loic.blot@unix-experience.fr>
AuthorDate: 2022-11-12 22:41:15 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2023-01-17 16:30:33 +0000

    et/kube-controller-manager, net/kube-scheduler: Update to 1.26.0

    PR:             267307
    Approved by:    Loïc Blot (maintainer)

 net/kube-controller-manager/Makefile               | 30 ++++++++++++++-----
 net/kube-controller-manager/distinfo               |  6 ++--
 .../files/kube-controller-manager.in (new +x)      | 24 +++++++++++++++
 net/kube-controller-manager/pkg-message (new)      | 10 +++++++
 net/kube-scheduler/Makefile                        | 34 +++++++++++++++++-----
 net/kube-scheduler/distinfo                        |  6 ++--
 .../files/kube-scheduler.in (new +x)               | 24 +++++++++++++++
 .../files/scheduler.yaml.sample (new)              |  8 +++++
 net/kube-scheduler/pkg-message (new)               |  9 ++++++
 net/kube-scheduler/pkg-plist (new)                 |  1 +
 10 files changed, 130 insertions(+), 22 deletions(-)
Comment 36 Mikael Urankar freebsd_committer freebsd_triage 2023-01-17 16:32:16 UTC
(In reply to loic.blot from comment #33)
Are you able to improve pkg-descr a bit for both ports?
Comment 37 loic.blot 2023-01-17 16:46:05 UTC
Thanks Mikael for the merge,,
Yes i can, i propose to do it in the addition of Kubernetes API Server package, in the same commit, fine to you ? we can close this one in this case, ok ?
Comment 38 Mikael Urankar freebsd_committer freebsd_triage 2023-01-17 16:47:59 UTC
(In reply to loic.blot from comment #37)
ok
Comment 39 loic.blot 2023-01-17 19:36:44 UTC
Mikael, i posted the PR with the pkg-descr changes on the other opened issue here:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267308
Comment 40 commit-hook freebsd_committer freebsd_triage 2023-01-18 14:46:17 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0740541bf312fc37d34d09ddb45dd7b69762c2ea

commit 0740541bf312fc37d34d09ddb45dd7b69762c2ea
Author:     Loic Blot <loic.blot@unix-experience.fr>
AuthorDate: 2023-01-17 18:22:39 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2023-01-18 14:44:29 +0000

    net/kube-controller-manager, net/kube-scheduler: Improve pkg-descr

    PR:             267307

 net/kube-controller-manager/Makefile  | 1 +
 net/kube-controller-manager/pkg-descr | 6 +++++-
 net/kube-scheduler/Makefile           | 1 +
 net/kube-scheduler/pkg-descr          | 7 ++++++-
 4 files changed, 13 insertions(+), 2 deletions(-)
Comment 41 Mikael Urankar freebsd_committer freebsd_triage 2023-01-18 14:51:16 UTC
Do you mind if I move the content of pkg-plist in the Makefile?

diff --git a/net/kube-scheduler/Makefile b/net/kube-scheduler/Makefile
index 4e56cd28d1..4be20a7c23 100644
--- a/net/kube-scheduler/Makefile
+++ b/net/kube-scheduler/Makefile
@@ -42,7 +42,8 @@ GO_BUILDFLAGS=        -ldflags="-X k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/versio
 
 USE_RC_SUBR=   kube-scheduler
 
-PLIST_FILES=   bin/${PORTNAME}
+PLIST_FILES=   bin/${PORTNAME} \
+               '@sample etc/kubernetes/scheduler.yaml.sample'
 
 post-install:
        ${MKDIR} ${STAGEDIR}${PREFIX}/etc/kubernetes