Compare commits

...

5 Commits

Author SHA1 Message Date
Kubernetes Publisher
1370a40b7f Update dependencies to v0.29.0-rc.0 tag 2023-11-28 19:05:16 +00:00
cpanato
288368e416 update go.mod
Signed-off-by: cpanato <ctadeu@gmail.com>

Kubernetes-commit: 9e5b8402bb95eb82541099e77c3a8b0ccd31297f
2023-11-28 19:04:55 +00:00
Kubernetes Publisher
86d49e7265 Merge pull request #113374 from ahmedtd/kep-3257-projected-types
Implement ClusterTrustBundlePEM projected volume

Kubernetes-commit: 9f319c32064f8b72d368df65fde4e37e250f8230
2023-11-04 01:16:34 +00:00
Taahir Ahmed
59c256a926 Regenerate for ClusterTrustBundlePEM projected volume API
Kubernetes-commit: 599fdb7adde5658dadb6a149c40624b4342fc909
2023-01-24 21:19:59 -08:00
Taahir Ahmed
ac369c3042 Define ClusterTrustBundlePEM projected volume
This commit defines the ClusterTrustBundlePEM projected volume types.
These types have been renamed from the KEP (PEMTrustAnchors) in order to
leave open the possibility of a similar projection drawing from a
yet-to-exist namespaced-scoped TrustBundle object, which came up during
KEP discussion.

* Add the projection field to internal and v1 APIs.
* Add validation to ensure that usages of the project must specify a
  name and path.
* Add TODO covering admission control to forbid mirror pods from using
  the projection.

Part of KEP-3257.

Kubernetes-commit: ecfdc8fda55923c18708488ec1561a4fcf9f3e33
2022-10-21 19:50:01 -07:00
6 changed files with 121 additions and 9 deletions

View File

@@ -0,0 +1,79 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ClusterTrustBundleProjectionApplyConfiguration represents an declarative configuration of the ClusterTrustBundleProjection type for use
// with apply.
type ClusterTrustBundleProjectionApplyConfiguration struct {
Name *string `json:"name,omitempty"`
SignerName *string `json:"signerName,omitempty"`
LabelSelector *v1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"`
Optional *bool `json:"optional,omitempty"`
Path *string `json:"path,omitempty"`
}
// ClusterTrustBundleProjectionApplyConfiguration constructs an declarative configuration of the ClusterTrustBundleProjection type for use with
// apply.
func ClusterTrustBundleProjection() *ClusterTrustBundleProjectionApplyConfiguration {
return &ClusterTrustBundleProjectionApplyConfiguration{}
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *ClusterTrustBundleProjectionApplyConfiguration) WithName(value string) *ClusterTrustBundleProjectionApplyConfiguration {
b.Name = &value
return b
}
// WithSignerName sets the SignerName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the SignerName field is set to the value of the last call.
func (b *ClusterTrustBundleProjectionApplyConfiguration) WithSignerName(value string) *ClusterTrustBundleProjectionApplyConfiguration {
b.SignerName = &value
return b
}
// WithLabelSelector sets the LabelSelector field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the LabelSelector field is set to the value of the last call.
func (b *ClusterTrustBundleProjectionApplyConfiguration) WithLabelSelector(value *v1.LabelSelectorApplyConfiguration) *ClusterTrustBundleProjectionApplyConfiguration {
b.LabelSelector = value
return b
}
// WithOptional sets the Optional field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Optional field is set to the value of the last call.
func (b *ClusterTrustBundleProjectionApplyConfiguration) WithOptional(value bool) *ClusterTrustBundleProjectionApplyConfiguration {
b.Optional = &value
return b
}
// WithPath sets the Path field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Path field is set to the value of the last call.
func (b *ClusterTrustBundleProjectionApplyConfiguration) WithPath(value string) *ClusterTrustBundleProjectionApplyConfiguration {
b.Path = &value
return b
}

View File

@@ -25,6 +25,7 @@ type VolumeProjectionApplyConfiguration struct {
DownwardAPI *DownwardAPIProjectionApplyConfiguration `json:"downwardAPI,omitempty"`
ConfigMap *ConfigMapProjectionApplyConfiguration `json:"configMap,omitempty"`
ServiceAccountToken *ServiceAccountTokenProjectionApplyConfiguration `json:"serviceAccountToken,omitempty"`
ClusterTrustBundle *ClusterTrustBundleProjectionApplyConfiguration `json:"clusterTrustBundle,omitempty"`
}
// VolumeProjectionApplyConfiguration constructs an declarative configuration of the VolumeProjection type for use with
@@ -64,3 +65,11 @@ func (b *VolumeProjectionApplyConfiguration) WithServiceAccountToken(value *Serv
b.ServiceAccountToken = value
return b
}
// WithClusterTrustBundle sets the ClusterTrustBundle field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ClusterTrustBundle field is set to the value of the last call.
func (b *VolumeProjectionApplyConfiguration) WithClusterTrustBundle(value *ClusterTrustBundleProjectionApplyConfiguration) *VolumeProjectionApplyConfiguration {
b.ClusterTrustBundle = value
return b
}

View File

@@ -4371,6 +4371,25 @@ var schemaYAML = typed.YAMLObject(`types:
- name: timeoutSeconds
type:
scalar: numeric
- name: io.k8s.api.core.v1.ClusterTrustBundleProjection
map:
fields:
- name: labelSelector
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector
- name: name
type:
scalar: string
- name: optional
type:
scalar: boolean
- name: path
type:
scalar: string
default: ""
- name: signerName
type:
scalar: string
- name: io.k8s.api.core.v1.ComponentCondition
map:
fields:
@@ -7874,6 +7893,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.core.v1.VolumeProjection
map:
fields:
- name: clusterTrustBundle
type:
namedType: io.k8s.api.core.v1.ClusterTrustBundleProjection
- name: configMap
type:
namedType: io.k8s.api.core.v1.ConfigMapProjection

View File

@@ -609,6 +609,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationscorev1.ClaimSourceApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ClientIPConfig"):
return &applyconfigurationscorev1.ClientIPConfigApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ClusterTrustBundleProjection"):
return &applyconfigurationscorev1.ClusterTrustBundleProjectionApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ComponentCondition"):
return &applyconfigurationscorev1.ComponentConditionApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ComponentStatus"):

10
go.mod
View File

@@ -2,7 +2,7 @@
module k8s.io/client-go
go 1.21.3
go 1.21
require (
github.com/evanphx/json-patch v4.12.0+incompatible
@@ -24,8 +24,8 @@ require (
golang.org/x/term v0.13.0
golang.org/x/time v0.3.0
google.golang.org/protobuf v1.31.0
k8s.io/api v0.0.0-20231101171312-cd0ecb048ea5
k8s.io/apimachinery v0.0.0-20231101171057-16d50e6708ce
k8s.io/api v0.29.0-rc.0
k8s.io/apimachinery v0.29.0-rc.0
k8s.io/klog/v2 v2.110.1
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
@@ -61,6 +61,6 @@ require (
)
replace (
k8s.io/api => k8s.io/api v0.0.0-20231101171312-cd0ecb048ea5
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20231101171057-16d50e6708ce
k8s.io/api => k8s.io/api v0.29.0-rc.0
k8s.io/apimachinery => k8s.io/apimachinery v0.29.0-rc.0
)

8
go.sum
View File

@@ -157,10 +157,10 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.0.0-20231101171312-cd0ecb048ea5 h1:ZfnjV6xXqx4UGcyZm6uANo3TRx2ZzzARWc4sJzdRXOg=
k8s.io/api v0.0.0-20231101171312-cd0ecb048ea5/go.mod h1:pe4ymgKfZ6OhusBquRSk+Kqm3zLI7wDLZQoGKcHdLLc=
k8s.io/apimachinery v0.0.0-20231101171057-16d50e6708ce h1:oOZHk+iB3pNz2vb9yXNUWs6fQDcsINJePa5YxiAU0Z4=
k8s.io/apimachinery v0.0.0-20231101171057-16d50e6708ce/go.mod h1:yFk3nwBh/jXlkMvRKH7BKtX7saT1lRmmGV6Ru0cTSUA=
k8s.io/api v0.29.0-rc.0 h1:02tTYMv1YIdRW9RwK720+xCMFc+bLfT7zHrdpte4ZHA=
k8s.io/api v0.29.0-rc.0/go.mod h1:jvYDVnWgiA2XGEvnLp2GVl0xNSOG4eDhbkUqTVyXCiA=
k8s.io/apimachinery v0.29.0-rc.0 h1:TdySPmDRDPJSGRGEsLUhwTQr13k4obi7HPJ4Tml2otA=
k8s.io/apimachinery v0.29.0-rc.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis=
k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0=
k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo=
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780=