Commit Graph

371 Commits

Author SHA1 Message Date
Patrick Ohly
bde9b64cdf DRA: remove "source" indirection from v1 Pod API
This makes the API nicer:

    resourceClaims:
    - name: with-template
      resourceClaimTemplateName: test-inline-claim-template
    - name: with-claim
      resourceClaimName: test-shared-claim

Previously, this was:

    resourceClaims:
    - name: with-template
      source:
        resourceClaimTemplateName: test-inline-claim-template
    - name: with-claim
      source:
        resourceClaimName: test-shared-claim

A more long-term benefit is that other, future alternatives
might not make sense under the "source" umbrella.

This is a breaking change. It's justified because DRA is still
alpha and will have several other API breaks in 1.31.
2024-06-27 17:53:24 +02:00
Antonio Ojea
59adf3f833 remove unused function LoadBalancerStatusEqual
It is duplicated in the cloud provider package, and is only used
there for the service load balancer controller.
2024-05-30 23:03:54 +00:00
Shingo Omura
552fd7e850
KEP-3619: Fine-grained SupplementalGroups control (#117842)
* Add `Linux{Sandbox,Container}SecurityContext.SupplementalGroupsPolicy` and `ContainerStatus.user` in cri-api

* Add `PodSecurityContext.SupplementalGroupsPolicy`, `ContainerStatus.User` and its featuregate

* Implement DropDisabledPodFields for PodSecurityContext.SupplementalGroupsPolicy and ContainerStatus.User fields

* Implement kubelet so to wire between SecurityContext.SupplementalGroupsPolicy/ContainerStatus.User and cri-api in kubelet

* Clarify `SupplementalGroupsPolicy` is an OS depdendent field.

* Make `ContainerStatus.User` is initially attached user identity to the first process in the ContainerStatus

It is because, the process identity can be dynamic if the initially attached identity
has enough privilege calling setuid/setgid/setgroups syscalls in Linux.

* Rewording suggestion applied

* Add TODO comment for updating SupplementalGroupsPolicy default value in v1.34

* Added validations for SupplementalGroupsPolicy and ContainerUser

* No need featuregate check in validation when adding new field with no default value

* fix typo: identitiy -> identity
2024-05-29 15:40:29 -07:00
Marek Siarkowicz
3ee8178768 Cleanup defer from SetFeatureGateDuringTest function call 2024-04-24 20:25:29 +02:00
Kubernetes Prow Robot
74877bb43b
Merge pull request #124417 from thockin/remove_gate_DefaultHostNetworkHostPortsInPodTemplates
Remove gate DefaultHostNetworkHostPortsInPodTemplates
2024-04-21 18:39:33 -07:00
Kubernetes Prow Robot
534d7cbc1a
Merge pull request #123905 from aojea/field_selector
Field selector for Services based on ClusterIP and Type
2024-04-19 15:30:55 -07:00
Tim Hockin
a2fb1b51ac
Remove DefaultHostNetworkHostPortsInPodTemplates gate
This behavior was deprecated in 1.28.
2024-04-19 15:24:15 -07:00
Kubernetes Prow Robot
c43b733dd6
Merge pull request #123736 from thockin/cleanup_manual_conversions
Cleanup manual conversions
2024-04-18 01:03:27 -07:00
Antonio Ojea
8f306d8046 services fielse selector for type
Change-Id: I57e934c520713713d4b0616a52519ec51c49e0fc
2024-04-11 13:09:36 +00:00
Antonio Ojea
c37e14364c implement field selector for clusterIP on services
This will allow components that don't need to watch headless services
(heavily used on ai/ml workloads) to filter them server side.

Specially useful for kubelet and kube-proxy

Change-Id: If36c2c27f2ec80db400c9133c61428d14e124f3e
2024-04-11 13:09:33 +00:00
Akihiro Suda
1dc05009fe
api: NodeStatus: rename RuntimeClasses to RuntimeHandlers
The runtime classes are apiserver's concept, while the handlers are kubelet's concept.
For NodeStatus, it makes more sense to return the latter ones here.

This commit modifies the following files:

- pkg/apis/core/types.go
- staging/src/k8s.io/api/core/v1/types.go
- pkg/kubelet/nodestatus/setters.go
- pkg/kubelet/kubelet_node_status.go
- pkg/registry/core/node/strategy.go
- test/e2e_node/mount_rro_linux_test.go

Other changes were auto-generated by running `make update`.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-14 08:06:39 +09:00
Antonio Ojea
7ab1ef644e
Revert "Implement a field selector for ClusterIP on Services" 2024-03-12 12:20:27 +00:00
Akihiro Suda
d940886d0a
api: KEP-3857: Recursive Read-only (RRO) mounts
This commit modifies the following files:

- pkg/apis/core/types.go
- staging/src/k8s.io/api/core/v1/types.go

Other changes were auto-generated by running `make update`.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-09 09:48:12 +09:00
Kubernetes Prow Robot
bd25605619
Merge pull request #123435 from tallclair/apparmor-ga
AppArmor fields API
2024-03-06 15:35:14 -08:00
Tim Hockin
ca0d2e27e6
Comment some manual conversions
Explain why seemingly-useless manual conversions are needed.  This is
deeply unfortunate, but better to document it than not.
2024-03-05 21:46:42 -08:00
Tim Hockin
b4f14ce00b
Remove manual Volume conversions 2024-03-05 21:45:02 -08:00
Tim Hockin
2f853b8eb8
Remove manual LoadBalancerStatus conversions
These are not needed.
2024-03-05 21:45:01 -08:00
Kubernetes Prow Robot
5b4d97dc5a
Merge pull request #122541 from aojea/headless_selector
Implement a field selector for ClusterIP on Services
2024-03-05 17:30:57 -08:00
Tim Allclair
b7f620c12b Generated code 2024-03-05 12:22:50 -08:00
Antonio Ojea
0595ec7942 implement field selector for clusterIP on services
This will allow components that don't need to watch headless services
(heavily used on ai/ml workloads) to filter them server side.

Specially useful for kubelet and kube-proxy

Co-authored-by: Jianbo Ma <sakuranlbj@gmail.com>

Change-Id: I6434d2c8c77aaf725ec5c07acbcda14311f24bfa

Change-Id: Iba9e25afb90712facfb3dee25c500bbe08ef38fc
2024-03-05 17:16:42 +00:00
Gaurav Ghildiyal
646fd200b8 Run 'make update' 2024-03-03 22:46:00 -08:00
Tim Hockin
467d5d745c
Get rid of unused API type NodeResources 2024-03-01 15:13:50 -08:00
Taahir Ahmed
599fdb7add Regenerate for ClusterTrustBundlePEM projected volume API 2023-11-03 11:40:48 -07:00
Kubernetes Prow Robot
dba565193c
Merge pull request #121104 from carlory/kep-3751-api-changes
[KEP-3571] introduce the VolumeAttributesClass API
2023-10-31 20:23:50 +01:00
carlory
56ab6c5942 generated changes 2023-10-31 11:26:35 +08:00
AxeZhan
070e7a38cb generic set 2023-10-28 15:31:28 +08:00
Kensei Nakada
d5d3c26337 feature(scheduler): implement matchLabelKeys in PodAffinity and PodAntiAffinity 2023-10-18 11:28:02 +00:00
AxeZhan
5c0618b848 codegen 2023-10-16 19:50:33 +08:00
Kubernetes Prow Robot
a2cc9db02f
Merge pull request #119665 from vinaykul/getpodqos-optimization
Perf optimization: GetPodQOS() returns persisted value of PodStatus.QOSClass, if set.
2023-10-12 06:48:26 +02:00
Quan Tian
2b69daa960 Allow specifying ExternalTrafficPolicy for ClusterIP Services with ExternalIPs
When defining a ClusterIP Service, we can specify externalIP, and the
traffic policy of externalIP is subject to externalTrafficPolicy.
However, the policy can't be set when type is not NodePort or
LoadBalancer, and will default to Cluster when kube-proxy processes the
Service.

This commit updates the defaulting and validation of Service to allow
specifying ExternalTrafficPolicy for ClusterIP Services with
ExternalIPs.

Signed-off-by: Quan Tian <qtian@vmware.com>
2023-08-30 23:56:47 +08:00
Patrick Ohly
c1eb18c00c generated files 2023-08-21 17:07:43 +02:00
Aohan Yang
29a6705dab Generated code for IP mode field 2023-08-14 12:33:54 +08:00
Aohan Yang
3ac2899d2b Add IP mode field 2023-08-14 11:24:49 +08:00
Mark Rossetti
0d90d1ffa5
Revert "Merge pull request #118895 from RyanAoh/kep-1860"
This reverts commit 890a6c8f70, reversing
changes made to 4f60a8d493.
2023-08-09 15:51:20 -07:00
Vinay Kulkarni
40b604e374 Update pkg/apis/core/helper/qos/qos.go
Co-authored-by: Itamar Holder <77444623+iholder101@users.noreply.github.com>
2023-08-08 04:01:46 +00:00
vinay kulkarni
4063ca4050 Code review fix: Move GetPodQOS code to ComputePodQOS. If set, return PodStatus.QOSClass from GetPodQOS. 2023-08-07 14:47:37 +00:00
vinay kulkarni
5d4410b960 Perf optimization: Move away from GetPodQOS, using PodStatus.QOSClass instead 2023-08-07 14:47:37 +00:00
Roman Bednar
294f5c9a42 make update 2023-07-21 21:39:24 +02:00
Hemant Kumar
6a780f57ce Update generated data 2023-07-17 15:30:36 -04:00
Aohan Yang
7c6e399b22 Generated code for IP mode field 2023-07-17 16:01:59 +08:00
Aohan Yang
e6863757f4 Add IP mode field 2023-07-17 15:51:40 +08:00
Shiming Zhang
3e2a1a7b9c Regenerate 2023-07-14 09:43:16 +08:00
Patrick Ohly
0fc62d5ded dra: generated files 2023-07-11 14:23:48 +02:00
Gunju Kim
c187b38117 Sidecar: Generated code 2023-07-07 21:39:35 +00:00
Daniel Smith
1ffe3f467e lavalamp is taking a long break 2023-05-11 16:43:38 +00:00
Tim Hockin
ec3379a717
Do hostNet Pod-ports -> hostPorts in Pod defaults
Rather than doing it in PodSpec defaulting, which triggers in
Deployments and DaemonSets, do it only when a Pod is actually in play.
2023-05-09 18:10:20 -07:00
Tim Hockin
d55b67b349
Clean up brace whitespace in **/validation_test.go
This was making my eyes bleed as I read over code.

I used the following in vim.  I made them up on the fly, but they seemed
to pass manual inspection.

:g/},\n\s*{$/s//}, {/
:w
:g/{$\n\s*{$/s//{{/
:w
:g/^\(\s*\)},\n\1},$/s//}},/
:w
:g/^\(\s*\)},$\n\1}$/s//}}/
:w
2023-05-02 00:48:42 -07:00
Stephen Kitt
4911e9de4a
api: replace intstr.FromInt with intstr.FromInt32
This touches cases where FromInt() is used on numeric constants, or
values which are already int32s, or int variables which are defined
close by and can be changed to int32s with little impact.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2023-05-01 09:16:15 +02:00
Kubernetes Prow Robot
56e17d6d67
Merge pull request #115168 from HirazawaUi/delte-pkg-apis-other-unused-functions
remove unused not api functions in the pkg/apis directory
2023-04-24 14:23:01 -07:00
Kubernetes Prow Robot
25a25e27a9
Merge pull request #110477 from halfcrazy/feat/hostnetwork-fieldsel
support fieldSelector spec.hostNetwork
2023-04-21 18:13:11 -07:00