Pod Certificates: make update

Change-Id: Ib258c1f3bf238f41cfa1d6de8e8d0de5b8379a06

Kubernetes-commit: 6d4000f844e22a13bc4f9cb3932ea1ab50216651
This commit is contained in:
Taahir Ahmed 2025-07-21 05:41:20 +00:00 committed by Kubernetes Publisher
parent b9f61132f4
commit 0d5cb31872
17 changed files with 1036 additions and 0 deletions

View File

@ -0,0 +1,281 @@
/*
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 v1alpha1
import (
certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
internal "k8s.io/client-go/applyconfigurations/internal"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// PodCertificateRequestApplyConfiguration represents a declarative configuration of the PodCertificateRequest type for use
// with apply.
type PodCertificateRequestApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *PodCertificateRequestSpecApplyConfiguration `json:"spec,omitempty"`
Status *PodCertificateRequestStatusApplyConfiguration `json:"status,omitempty"`
}
// PodCertificateRequest constructs a declarative configuration of the PodCertificateRequest type for use with
// apply.
func PodCertificateRequest(name, namespace string) *PodCertificateRequestApplyConfiguration {
b := &PodCertificateRequestApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("PodCertificateRequest")
b.WithAPIVersion("certificates.k8s.io/v1alpha1")
return b
}
// ExtractPodCertificateRequest extracts the applied configuration owned by fieldManager from
// podCertificateRequest. If no managedFields are found in podCertificateRequest for fieldManager, a
// PodCertificateRequestApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// podCertificateRequest must be a unmodified PodCertificateRequest API object that was retrieved from the Kubernetes API.
// ExtractPodCertificateRequest provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental!
func ExtractPodCertificateRequest(podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, fieldManager string) (*PodCertificateRequestApplyConfiguration, error) {
return extractPodCertificateRequest(podCertificateRequest, fieldManager, "")
}
// ExtractPodCertificateRequestStatus is the same as ExtractPodCertificateRequest except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractPodCertificateRequestStatus(podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, fieldManager string) (*PodCertificateRequestApplyConfiguration, error) {
return extractPodCertificateRequest(podCertificateRequest, fieldManager, "status")
}
func extractPodCertificateRequest(podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, fieldManager string, subresource string) (*PodCertificateRequestApplyConfiguration, error) {
b := &PodCertificateRequestApplyConfiguration{}
err := managedfields.ExtractInto(podCertificateRequest, internal.Parser().Type("io.k8s.api.certificates.v1alpha1.PodCertificateRequest"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(podCertificateRequest.Name)
b.WithNamespace(podCertificateRequest.Namespace)
b.WithKind("PodCertificateRequest")
b.WithAPIVersion("certificates.k8s.io/v1alpha1")
return b, nil
}
func (b PodCertificateRequestApplyConfiguration) IsApplyConfiguration() {}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *PodCertificateRequestApplyConfiguration) WithKind(value string) *PodCertificateRequestApplyConfiguration {
b.TypeMetaApplyConfiguration.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
func (b *PodCertificateRequestApplyConfiguration) WithAPIVersion(value string) *PodCertificateRequestApplyConfiguration {
b.TypeMetaApplyConfiguration.APIVersion = &value
return b
}
// 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 *PodCertificateRequestApplyConfiguration) WithName(value string) *PodCertificateRequestApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Name = &value
return b
}
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
func (b *PodCertificateRequestApplyConfiguration) WithGenerateName(value string) *PodCertificateRequestApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.GenerateName = &value
return b
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *PodCertificateRequestApplyConfiguration) WithNamespace(value string) *PodCertificateRequestApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Namespace = &value
return b
}
// WithUID sets the UID 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 UID field is set to the value of the last call.
func (b *PodCertificateRequestApplyConfiguration) WithUID(value types.UID) *PodCertificateRequestApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
func (b *PodCertificateRequestApplyConfiguration) WithResourceVersion(value string) *PodCertificateRequestApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
func (b *PodCertificateRequestApplyConfiguration) WithGeneration(value int64) *PodCertificateRequestApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
func (b *PodCertificateRequestApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PodCertificateRequestApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
func (b *PodCertificateRequestApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodCertificateRequestApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *PodCertificateRequestApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PodCertificateRequestApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *PodCertificateRequestApplyConfiguration) WithLabels(entries map[string]string) *PodCertificateRequestApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *PodCertificateRequestApplyConfiguration) WithAnnotations(entries map[string]string) *PodCertificateRequestApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (b *PodCertificateRequestApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PodCertificateRequestApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Finalizers field.
func (b *PodCertificateRequestApplyConfiguration) WithFinalizers(values ...string) *PodCertificateRequestApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
func (b *PodCertificateRequestApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec 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 Spec field is set to the value of the last call.
func (b *PodCertificateRequestApplyConfiguration) WithSpec(value *PodCertificateRequestSpecApplyConfiguration) *PodCertificateRequestApplyConfiguration {
b.Spec = value
return b
}
// WithStatus sets the Status 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 Status field is set to the value of the last call.
func (b *PodCertificateRequestApplyConfiguration) WithStatus(value *PodCertificateRequestStatusApplyConfiguration) *PodCertificateRequestApplyConfiguration {
b.Status = value
return b
}
// GetKind retrieves the value of the Kind field in the declarative configuration.
func (b *PodCertificateRequestApplyConfiguration) GetKind() *string {
return b.TypeMetaApplyConfiguration.Kind
}
// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
func (b *PodCertificateRequestApplyConfiguration) GetAPIVersion() *string {
return b.TypeMetaApplyConfiguration.APIVersion
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *PodCertificateRequestApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Name
}
// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
func (b *PodCertificateRequestApplyConfiguration) GetNamespace() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Namespace
}

View File

@ -0,0 +1,128 @@
/*
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 v1alpha1
import (
types "k8s.io/apimachinery/pkg/types"
)
// PodCertificateRequestSpecApplyConfiguration represents a declarative configuration of the PodCertificateRequestSpec type for use
// with apply.
type PodCertificateRequestSpecApplyConfiguration struct {
SignerName *string `json:"signerName,omitempty"`
PodName *string `json:"podName,omitempty"`
PodUID *types.UID `json:"podUID,omitempty"`
ServiceAccountName *string `json:"serviceAccountName,omitempty"`
ServiceAccountUID *types.UID `json:"serviceAccountUID,omitempty"`
NodeName *types.NodeName `json:"nodeName,omitempty"`
NodeUID *types.UID `json:"nodeUID,omitempty"`
MaxExpirationSeconds *int32 `json:"maxExpirationSeconds,omitempty"`
PKIXPublicKey []byte `json:"pkixPublicKey,omitempty"`
ProofOfPossession []byte `json:"proofOfPossession,omitempty"`
}
// PodCertificateRequestSpecApplyConfiguration constructs a declarative configuration of the PodCertificateRequestSpec type for use with
// apply.
func PodCertificateRequestSpec() *PodCertificateRequestSpecApplyConfiguration {
return &PodCertificateRequestSpecApplyConfiguration{}
}
// 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 *PodCertificateRequestSpecApplyConfiguration) WithSignerName(value string) *PodCertificateRequestSpecApplyConfiguration {
b.SignerName = &value
return b
}
// WithPodName sets the PodName 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 PodName field is set to the value of the last call.
func (b *PodCertificateRequestSpecApplyConfiguration) WithPodName(value string) *PodCertificateRequestSpecApplyConfiguration {
b.PodName = &value
return b
}
// WithPodUID sets the PodUID 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 PodUID field is set to the value of the last call.
func (b *PodCertificateRequestSpecApplyConfiguration) WithPodUID(value types.UID) *PodCertificateRequestSpecApplyConfiguration {
b.PodUID = &value
return b
}
// WithServiceAccountName sets the ServiceAccountName 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 ServiceAccountName field is set to the value of the last call.
func (b *PodCertificateRequestSpecApplyConfiguration) WithServiceAccountName(value string) *PodCertificateRequestSpecApplyConfiguration {
b.ServiceAccountName = &value
return b
}
// WithServiceAccountUID sets the ServiceAccountUID 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 ServiceAccountUID field is set to the value of the last call.
func (b *PodCertificateRequestSpecApplyConfiguration) WithServiceAccountUID(value types.UID) *PodCertificateRequestSpecApplyConfiguration {
b.ServiceAccountUID = &value
return b
}
// WithNodeName sets the NodeName 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 NodeName field is set to the value of the last call.
func (b *PodCertificateRequestSpecApplyConfiguration) WithNodeName(value types.NodeName) *PodCertificateRequestSpecApplyConfiguration {
b.NodeName = &value
return b
}
// WithNodeUID sets the NodeUID 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 NodeUID field is set to the value of the last call.
func (b *PodCertificateRequestSpecApplyConfiguration) WithNodeUID(value types.UID) *PodCertificateRequestSpecApplyConfiguration {
b.NodeUID = &value
return b
}
// WithMaxExpirationSeconds sets the MaxExpirationSeconds 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 MaxExpirationSeconds field is set to the value of the last call.
func (b *PodCertificateRequestSpecApplyConfiguration) WithMaxExpirationSeconds(value int32) *PodCertificateRequestSpecApplyConfiguration {
b.MaxExpirationSeconds = &value
return b
}
// WithPKIXPublicKey adds the given value to the PKIXPublicKey field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the PKIXPublicKey field.
func (b *PodCertificateRequestSpecApplyConfiguration) WithPKIXPublicKey(values ...byte) *PodCertificateRequestSpecApplyConfiguration {
for i := range values {
b.PKIXPublicKey = append(b.PKIXPublicKey, values[i])
}
return b
}
// WithProofOfPossession adds the given value to the ProofOfPossession field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the ProofOfPossession field.
func (b *PodCertificateRequestSpecApplyConfiguration) WithProofOfPossession(values ...byte) *PodCertificateRequestSpecApplyConfiguration {
for i := range values {
b.ProofOfPossession = append(b.ProofOfPossession, values[i])
}
return b
}

View File

@ -0,0 +1,85 @@
/*
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 v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// PodCertificateRequestStatusApplyConfiguration represents a declarative configuration of the PodCertificateRequestStatus type for use
// with apply.
type PodCertificateRequestStatusApplyConfiguration struct {
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
CertificateChain *string `json:"certificateChain,omitempty"`
NotBefore *metav1.Time `json:"notBefore,omitempty"`
BeginRefreshAt *metav1.Time `json:"beginRefreshAt,omitempty"`
NotAfter *metav1.Time `json:"notAfter,omitempty"`
}
// PodCertificateRequestStatusApplyConfiguration constructs a declarative configuration of the PodCertificateRequestStatus type for use with
// apply.
func PodCertificateRequestStatus() *PodCertificateRequestStatusApplyConfiguration {
return &PodCertificateRequestStatusApplyConfiguration{}
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *PodCertificateRequestStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *PodCertificateRequestStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
}
b.Conditions = append(b.Conditions, *values[i])
}
return b
}
// WithCertificateChain sets the CertificateChain 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 CertificateChain field is set to the value of the last call.
func (b *PodCertificateRequestStatusApplyConfiguration) WithCertificateChain(value string) *PodCertificateRequestStatusApplyConfiguration {
b.CertificateChain = &value
return b
}
// WithNotBefore sets the NotBefore 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 NotBefore field is set to the value of the last call.
func (b *PodCertificateRequestStatusApplyConfiguration) WithNotBefore(value metav1.Time) *PodCertificateRequestStatusApplyConfiguration {
b.NotBefore = &value
return b
}
// WithBeginRefreshAt sets the BeginRefreshAt 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 BeginRefreshAt field is set to the value of the last call.
func (b *PodCertificateRequestStatusApplyConfiguration) WithBeginRefreshAt(value metav1.Time) *PodCertificateRequestStatusApplyConfiguration {
b.BeginRefreshAt = &value
return b
}
// WithNotAfter sets the NotAfter 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 NotAfter field is set to the value of the last call.
func (b *PodCertificateRequestStatusApplyConfiguration) WithNotAfter(value metav1.Time) *PodCertificateRequestStatusApplyConfiguration {
b.NotAfter = &value
return b
}

View File

@ -0,0 +1,84 @@
/*
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
// PodCertificateProjectionApplyConfiguration represents a declarative configuration of the PodCertificateProjection type for use
// with apply.
type PodCertificateProjectionApplyConfiguration struct {
SignerName *string `json:"signerName,omitempty"`
KeyType *string `json:"keyType,omitempty"`
MaxExpirationSeconds *int32 `json:"maxExpirationSeconds,omitempty"`
CredentialBundlePath *string `json:"credentialBundlePath,omitempty"`
KeyPath *string `json:"keyPath,omitempty"`
CertificateChainPath *string `json:"certificateChainPath,omitempty"`
}
// PodCertificateProjectionApplyConfiguration constructs a declarative configuration of the PodCertificateProjection type for use with
// apply.
func PodCertificateProjection() *PodCertificateProjectionApplyConfiguration {
return &PodCertificateProjectionApplyConfiguration{}
}
// 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 *PodCertificateProjectionApplyConfiguration) WithSignerName(value string) *PodCertificateProjectionApplyConfiguration {
b.SignerName = &value
return b
}
// WithKeyType sets the KeyType 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 KeyType field is set to the value of the last call.
func (b *PodCertificateProjectionApplyConfiguration) WithKeyType(value string) *PodCertificateProjectionApplyConfiguration {
b.KeyType = &value
return b
}
// WithMaxExpirationSeconds sets the MaxExpirationSeconds 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 MaxExpirationSeconds field is set to the value of the last call.
func (b *PodCertificateProjectionApplyConfiguration) WithMaxExpirationSeconds(value int32) *PodCertificateProjectionApplyConfiguration {
b.MaxExpirationSeconds = &value
return b
}
// WithCredentialBundlePath sets the CredentialBundlePath 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 CredentialBundlePath field is set to the value of the last call.
func (b *PodCertificateProjectionApplyConfiguration) WithCredentialBundlePath(value string) *PodCertificateProjectionApplyConfiguration {
b.CredentialBundlePath = &value
return b
}
// WithKeyPath sets the KeyPath 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 KeyPath field is set to the value of the last call.
func (b *PodCertificateProjectionApplyConfiguration) WithKeyPath(value string) *PodCertificateProjectionApplyConfiguration {
b.KeyPath = &value
return b
}
// WithCertificateChainPath sets the CertificateChainPath 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 CertificateChainPath field is set to the value of the last call.
func (b *PodCertificateProjectionApplyConfiguration) WithCertificateChainPath(value string) *PodCertificateProjectionApplyConfiguration {
b.CertificateChainPath = &value
return b
}

View File

@ -26,6 +26,7 @@ type VolumeProjectionApplyConfiguration struct {
ConfigMap *ConfigMapProjectionApplyConfiguration `json:"configMap,omitempty"`
ServiceAccountToken *ServiceAccountTokenProjectionApplyConfiguration `json:"serviceAccountToken,omitempty"`
ClusterTrustBundle *ClusterTrustBundleProjectionApplyConfiguration `json:"clusterTrustBundle,omitempty"`
PodCertificate *PodCertificateProjectionApplyConfiguration `json:"podCertificate,omitempty"`
}
// VolumeProjectionApplyConfiguration constructs a declarative configuration of the VolumeProjection type for use with
@ -73,3 +74,11 @@ func (b *VolumeProjectionApplyConfiguration) WithClusterTrustBundle(value *Clust
b.ClusterTrustBundle = value
return b
}
// WithPodCertificate sets the PodCertificate 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 PodCertificate field is set to the value of the last call.
func (b *VolumeProjectionApplyConfiguration) WithPodCertificate(value *PodCertificateProjectionApplyConfiguration) *VolumeProjectionApplyConfiguration {
b.PodCertificate = value
return b
}

View File

@ -4458,6 +4458,91 @@ var schemaYAML = typed.YAMLObject(`types:
type:
scalar: string
default: ""
- name: io.k8s.api.certificates.v1alpha1.PodCertificateRequest
map:
fields:
- name: apiVersion
type:
scalar: string
- name: kind
type:
scalar: string
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: spec
type:
namedType: io.k8s.api.certificates.v1alpha1.PodCertificateRequestSpec
default: {}
- name: status
type:
namedType: io.k8s.api.certificates.v1alpha1.PodCertificateRequestStatus
default: {}
- name: io.k8s.api.certificates.v1alpha1.PodCertificateRequestSpec
map:
fields:
- name: maxExpirationSeconds
type:
scalar: numeric
default: 86400
- name: nodeName
type:
scalar: string
default: ""
- name: nodeUID
type:
scalar: string
default: ""
- name: pkixPublicKey
type:
scalar: string
- name: podName
type:
scalar: string
default: ""
- name: podUID
type:
scalar: string
default: ""
- name: proofOfPossession
type:
scalar: string
- name: serviceAccountName
type:
scalar: string
default: ""
- name: serviceAccountUID
type:
scalar: string
default: ""
- name: signerName
type:
scalar: string
default: ""
- name: io.k8s.api.certificates.v1alpha1.PodCertificateRequestStatus
map:
fields:
- name: beginRefreshAt
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
- name: certificateChain
type:
scalar: string
- name: conditions
type:
list:
elementType:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
elementRelationship: associative
keys:
- type
- name: notAfter
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
- name: notBefore
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequest
map:
fields:
@ -7105,6 +7190,27 @@ var schemaYAML = typed.YAMLObject(`types:
elementType:
namedType: io.k8s.api.core.v1.PodAffinityTerm
elementRelationship: atomic
- name: io.k8s.api.core.v1.PodCertificateProjection
map:
fields:
- name: certificateChainPath
type:
scalar: string
- name: credentialBundlePath
type:
scalar: string
- name: keyPath
type:
scalar: string
- name: keyType
type:
scalar: string
- name: maxExpirationSeconds
type:
scalar: numeric
- name: signerName
type:
scalar: string
- name: io.k8s.api.core.v1.PodCondition
map:
fields:
@ -8747,6 +8853,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: downwardAPI
type:
namedType: io.k8s.api.core.v1.DownwardAPIProjection
- name: podCertificate
type:
namedType: io.k8s.api.core.v1.PodCertificateProjection
- name: secret
type:
namedType: io.k8s.api.core.v1.SecretProjection

View File

@ -628,6 +628,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationscertificatesv1alpha1.ClusterTrustBundleApplyConfiguration{}
case certificatesv1alpha1.SchemeGroupVersion.WithKind("ClusterTrustBundleSpec"):
return &applyconfigurationscertificatesv1alpha1.ClusterTrustBundleSpecApplyConfiguration{}
case certificatesv1alpha1.SchemeGroupVersion.WithKind("PodCertificateRequest"):
return &applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration{}
case certificatesv1alpha1.SchemeGroupVersion.WithKind("PodCertificateRequestSpec"):
return &applyconfigurationscertificatesv1alpha1.PodCertificateRequestSpecApplyConfiguration{}
case certificatesv1alpha1.SchemeGroupVersion.WithKind("PodCertificateRequestStatus"):
return &applyconfigurationscertificatesv1alpha1.PodCertificateRequestStatusApplyConfiguration{}
// Group=certificates.k8s.io, Version=v1beta1
case certificatesv1beta1.SchemeGroupVersion.WithKind("CertificateSigningRequest"):
@ -908,6 +914,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationscorev1.PodAffinityTermApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("PodAntiAffinity"):
return &applyconfigurationscorev1.PodAntiAffinityApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("PodCertificateProjection"):
return &applyconfigurationscorev1.PodCertificateProjectionApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("PodCondition"):
return &applyconfigurationscorev1.PodConditionApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("PodDNSConfig"):

View File

@ -26,6 +26,8 @@ import (
type Interface interface {
// ClusterTrustBundles returns a ClusterTrustBundleInformer.
ClusterTrustBundles() ClusterTrustBundleInformer
// PodCertificateRequests returns a PodCertificateRequestInformer.
PodCertificateRequests() PodCertificateRequestInformer
}
type version struct {
@ -43,3 +45,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
func (v *version) ClusterTrustBundles() ClusterTrustBundleInformer {
return &clusterTrustBundleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// PodCertificateRequests returns a PodCertificateRequestInformer.
func (v *version) PodCertificateRequests() PodCertificateRequestInformer {
return &podCertificateRequestInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View File

@ -0,0 +1,102 @@
/*
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 informer-gen. DO NOT EDIT.
package v1alpha1
import (
context "context"
time "time"
apicertificatesv1alpha1 "k8s.io/api/certificates/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
certificatesv1alpha1 "k8s.io/client-go/listers/certificates/v1alpha1"
cache "k8s.io/client-go/tools/cache"
)
// PodCertificateRequestInformer provides access to a shared informer and lister for
// PodCertificateRequests.
type PodCertificateRequestInformer interface {
Informer() cache.SharedIndexInformer
Lister() certificatesv1alpha1.PodCertificateRequestLister
}
type podCertificateRequestInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewPodCertificateRequestInformer constructs a new informer for PodCertificateRequest type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewPodCertificateRequestInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredPodCertificateRequestInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredPodCertificateRequestInformer constructs a new informer for PodCertificateRequest type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredPodCertificateRequestInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CertificatesV1alpha1().PodCertificateRequests(namespace).List(context.Background(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CertificatesV1alpha1().PodCertificateRequests(namespace).Watch(context.Background(), options)
},
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CertificatesV1alpha1().PodCertificateRequests(namespace).List(ctx, options)
},
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CertificatesV1alpha1().PodCertificateRequests(namespace).Watch(ctx, options)
},
},
&apicertificatesv1alpha1.PodCertificateRequest{},
resyncPeriod,
indexers,
)
}
func (f *podCertificateRequestInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredPodCertificateRequestInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *podCertificateRequestInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&apicertificatesv1alpha1.PodCertificateRequest{}, f.defaultInformer)
}
func (f *podCertificateRequestInformer) Lister() certificatesv1alpha1.PodCertificateRequestLister {
return certificatesv1alpha1.NewPodCertificateRequestLister(f.Informer().GetIndexer())
}

View File

@ -199,6 +199,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
// Group=certificates.k8s.io, Version=v1alpha1
case certificatesv1alpha1.SchemeGroupVersion.WithResource("clustertrustbundles"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1alpha1().ClusterTrustBundles().Informer()}, nil
case certificatesv1alpha1.SchemeGroupVersion.WithResource("podcertificaterequests"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1alpha1().PodCertificateRequests().Informer()}, nil
// Group=certificates.k8s.io, Version=v1beta1
case certificatesv1beta1.SchemeGroupVersion.WithResource("certificatesigningrequests"):

View File

@ -29,6 +29,7 @@ import (
type CertificatesV1alpha1Interface interface {
RESTClient() rest.Interface
ClusterTrustBundlesGetter
PodCertificateRequestsGetter
}
// CertificatesV1alpha1Client is used to interact with features provided by the certificates.k8s.io group.
@ -40,6 +41,10 @@ func (c *CertificatesV1alpha1Client) ClusterTrustBundles() ClusterTrustBundleInt
return newClusterTrustBundles(c)
}
func (c *CertificatesV1alpha1Client) PodCertificateRequests(namespace string) PodCertificateRequestInterface {
return newPodCertificateRequests(c, namespace)
}
// NewForConfig creates a new CertificatesV1alpha1Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).

View File

@ -32,6 +32,10 @@ func (c *FakeCertificatesV1alpha1) ClusterTrustBundles() v1alpha1.ClusterTrustBu
return newFakeClusterTrustBundles(c)
}
func (c *FakeCertificatesV1alpha1) PodCertificateRequests(namespace string) v1alpha1.PodCertificateRequestInterface {
return newFakePodCertificateRequests(c, namespace)
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeCertificatesV1alpha1) RESTClient() rest.Interface {

View File

@ -0,0 +1,53 @@
/*
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 client-gen. DO NOT EDIT.
package fake
import (
v1alpha1 "k8s.io/api/certificates/v1alpha1"
certificatesv1alpha1 "k8s.io/client-go/applyconfigurations/certificates/v1alpha1"
gentype "k8s.io/client-go/gentype"
typedcertificatesv1alpha1 "k8s.io/client-go/kubernetes/typed/certificates/v1alpha1"
)
// fakePodCertificateRequests implements PodCertificateRequestInterface
type fakePodCertificateRequests struct {
*gentype.FakeClientWithListAndApply[*v1alpha1.PodCertificateRequest, *v1alpha1.PodCertificateRequestList, *certificatesv1alpha1.PodCertificateRequestApplyConfiguration]
Fake *FakeCertificatesV1alpha1
}
func newFakePodCertificateRequests(fake *FakeCertificatesV1alpha1, namespace string) typedcertificatesv1alpha1.PodCertificateRequestInterface {
return &fakePodCertificateRequests{
gentype.NewFakeClientWithListAndApply[*v1alpha1.PodCertificateRequest, *v1alpha1.PodCertificateRequestList, *certificatesv1alpha1.PodCertificateRequestApplyConfiguration](
fake.Fake,
namespace,
v1alpha1.SchemeGroupVersion.WithResource("podcertificaterequests"),
v1alpha1.SchemeGroupVersion.WithKind("PodCertificateRequest"),
func() *v1alpha1.PodCertificateRequest { return &v1alpha1.PodCertificateRequest{} },
func() *v1alpha1.PodCertificateRequestList { return &v1alpha1.PodCertificateRequestList{} },
func(dst, src *v1alpha1.PodCertificateRequestList) { dst.ListMeta = src.ListMeta },
func(list *v1alpha1.PodCertificateRequestList) []*v1alpha1.PodCertificateRequest {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.PodCertificateRequestList, items []*v1alpha1.PodCertificateRequest) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
}
}

View File

@ -19,3 +19,5 @@ limitations under the License.
package v1alpha1
type ClusterTrustBundleExpansion interface{}
type PodCertificateRequestExpansion interface{}

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 client-gen. DO NOT EDIT.
package v1alpha1
import (
context "context"
certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
applyconfigurationscertificatesv1alpha1 "k8s.io/client-go/applyconfigurations/certificates/v1alpha1"
gentype "k8s.io/client-go/gentype"
scheme "k8s.io/client-go/kubernetes/scheme"
)
// PodCertificateRequestsGetter has a method to return a PodCertificateRequestInterface.
// A group's client should implement this interface.
type PodCertificateRequestsGetter interface {
PodCertificateRequests(namespace string) PodCertificateRequestInterface
}
// PodCertificateRequestInterface has methods to work with PodCertificateRequest resources.
type PodCertificateRequestInterface interface {
Create(ctx context.Context, podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, opts v1.CreateOptions) (*certificatesv1alpha1.PodCertificateRequest, error)
Update(ctx context.Context, podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, opts v1.UpdateOptions) (*certificatesv1alpha1.PodCertificateRequest, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, podCertificateRequest *certificatesv1alpha1.PodCertificateRequest, opts v1.UpdateOptions) (*certificatesv1alpha1.PodCertificateRequest, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*certificatesv1alpha1.PodCertificateRequest, error)
List(ctx context.Context, opts v1.ListOptions) (*certificatesv1alpha1.PodCertificateRequestList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *certificatesv1alpha1.PodCertificateRequest, err error)
Apply(ctx context.Context, podCertificateRequest *applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration, opts v1.ApplyOptions) (result *certificatesv1alpha1.PodCertificateRequest, err error)
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, podCertificateRequest *applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration, opts v1.ApplyOptions) (result *certificatesv1alpha1.PodCertificateRequest, err error)
PodCertificateRequestExpansion
}
// podCertificateRequests implements PodCertificateRequestInterface
type podCertificateRequests struct {
*gentype.ClientWithListAndApply[*certificatesv1alpha1.PodCertificateRequest, *certificatesv1alpha1.PodCertificateRequestList, *applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration]
}
// newPodCertificateRequests returns a PodCertificateRequests
func newPodCertificateRequests(c *CertificatesV1alpha1Client, namespace string) *podCertificateRequests {
return &podCertificateRequests{
gentype.NewClientWithListAndApply[*certificatesv1alpha1.PodCertificateRequest, *certificatesv1alpha1.PodCertificateRequestList, *applyconfigurationscertificatesv1alpha1.PodCertificateRequestApplyConfiguration](
"podcertificaterequests",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *certificatesv1alpha1.PodCertificateRequest {
return &certificatesv1alpha1.PodCertificateRequest{}
},
func() *certificatesv1alpha1.PodCertificateRequestList {
return &certificatesv1alpha1.PodCertificateRequestList{}
},
gentype.PrefersProtobuf[*certificatesv1alpha1.PodCertificateRequest](),
),
}
}

View File

@ -21,3 +21,11 @@ package v1alpha1
// ClusterTrustBundleListerExpansion allows custom methods to be added to
// ClusterTrustBundleLister.
type ClusterTrustBundleListerExpansion interface{}
// PodCertificateRequestListerExpansion allows custom methods to be added to
// PodCertificateRequestLister.
type PodCertificateRequestListerExpansion interface{}
// PodCertificateRequestNamespaceListerExpansion allows custom methods to be added to
// PodCertificateRequestNamespaceLister.
type PodCertificateRequestNamespaceListerExpansion interface{}

View File

@ -0,0 +1,70 @@
/*
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 lister-gen. DO NOT EDIT.
package v1alpha1
import (
certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels"
listers "k8s.io/client-go/listers"
cache "k8s.io/client-go/tools/cache"
)
// PodCertificateRequestLister helps list PodCertificateRequests.
// All objects returned here must be treated as read-only.
type PodCertificateRequestLister interface {
// List lists all PodCertificateRequests in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*certificatesv1alpha1.PodCertificateRequest, err error)
// PodCertificateRequests returns an object that can list and get PodCertificateRequests.
PodCertificateRequests(namespace string) PodCertificateRequestNamespaceLister
PodCertificateRequestListerExpansion
}
// podCertificateRequestLister implements the PodCertificateRequestLister interface.
type podCertificateRequestLister struct {
listers.ResourceIndexer[*certificatesv1alpha1.PodCertificateRequest]
}
// NewPodCertificateRequestLister returns a new PodCertificateRequestLister.
func NewPodCertificateRequestLister(indexer cache.Indexer) PodCertificateRequestLister {
return &podCertificateRequestLister{listers.New[*certificatesv1alpha1.PodCertificateRequest](indexer, certificatesv1alpha1.Resource("podcertificaterequest"))}
}
// PodCertificateRequests returns an object that can list and get PodCertificateRequests.
func (s *podCertificateRequestLister) PodCertificateRequests(namespace string) PodCertificateRequestNamespaceLister {
return podCertificateRequestNamespaceLister{listers.NewNamespaced[*certificatesv1alpha1.PodCertificateRequest](s.ResourceIndexer, namespace)}
}
// PodCertificateRequestNamespaceLister helps list and get PodCertificateRequests.
// All objects returned here must be treated as read-only.
type PodCertificateRequestNamespaceLister interface {
// List lists all PodCertificateRequests in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*certificatesv1alpha1.PodCertificateRequest, err error)
// Get retrieves the PodCertificateRequest from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*certificatesv1alpha1.PodCertificateRequest, error)
PodCertificateRequestNamespaceListerExpansion
}
// podCertificateRequestNamespaceLister implements the PodCertificateRequestNamespaceLister
// interface.
type podCertificateRequestNamespaceLister struct {
listers.ResourceIndexer[*certificatesv1alpha1.PodCertificateRequest]
}