From db79dcf23b6dda9c2713d69493da75b7a947cd2a Mon Sep 17 00:00:00 2001 From: Tim Allclair Date: Tue, 20 Feb 2024 20:04:35 -0800 Subject: [PATCH] Generated code Kubernetes-commit: b7f620c12b7f2dbd7907ccad1ca63811a5c5766b --- .../core/v1/apparmorprofile.go | 52 +++++++++++++++++++ .../core/v1/podsecuritycontext.go | 9 ++++ .../core/v1/securitycontext.go | 9 ++++ applyconfigurations/internal/internal.go | 21 ++++++++ applyconfigurations/utils.go | 2 + 5 files changed, 93 insertions(+) create mode 100644 applyconfigurations/core/v1/apparmorprofile.go diff --git a/applyconfigurations/core/v1/apparmorprofile.go b/applyconfigurations/core/v1/apparmorprofile.go new file mode 100644 index 00000000..7f3c22af --- /dev/null +++ b/applyconfigurations/core/v1/apparmorprofile.go @@ -0,0 +1,52 @@ +/* +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/api/core/v1" +) + +// AppArmorProfileApplyConfiguration represents an declarative configuration of the AppArmorProfile type for use +// with apply. +type AppArmorProfileApplyConfiguration struct { + Type *v1.AppArmorProfileType `json:"type,omitempty"` + LocalhostProfile *string `json:"localhostProfile,omitempty"` +} + +// AppArmorProfileApplyConfiguration constructs an declarative configuration of the AppArmorProfile type for use with +// apply. +func AppArmorProfile() *AppArmorProfileApplyConfiguration { + return &AppArmorProfileApplyConfiguration{} +} + +// WithType sets the Type 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 Type field is set to the value of the last call. +func (b *AppArmorProfileApplyConfiguration) WithType(value v1.AppArmorProfileType) *AppArmorProfileApplyConfiguration { + b.Type = &value + return b +} + +// WithLocalhostProfile sets the LocalhostProfile 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 LocalhostProfile field is set to the value of the last call. +func (b *AppArmorProfileApplyConfiguration) WithLocalhostProfile(value string) *AppArmorProfileApplyConfiguration { + b.LocalhostProfile = &value + return b +} diff --git a/applyconfigurations/core/v1/podsecuritycontext.go b/applyconfigurations/core/v1/podsecuritycontext.go index 6db09aa3..6b340294 100644 --- a/applyconfigurations/core/v1/podsecuritycontext.go +++ b/applyconfigurations/core/v1/podsecuritycontext.go @@ -35,6 +35,7 @@ type PodSecurityContextApplyConfiguration struct { Sysctls []SysctlApplyConfiguration `json:"sysctls,omitempty"` FSGroupChangePolicy *corev1.PodFSGroupChangePolicy `json:"fsGroupChangePolicy,omitempty"` SeccompProfile *SeccompProfileApplyConfiguration `json:"seccompProfile,omitempty"` + AppArmorProfile *AppArmorProfileApplyConfiguration `json:"appArmorProfile,omitempty"` } // PodSecurityContextApplyConfiguration constructs an declarative configuration of the PodSecurityContext type for use with @@ -129,3 +130,11 @@ func (b *PodSecurityContextApplyConfiguration) WithSeccompProfile(value *Seccomp b.SeccompProfile = value return b } + +// WithAppArmorProfile sets the AppArmorProfile 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 AppArmorProfile field is set to the value of the last call. +func (b *PodSecurityContextApplyConfiguration) WithAppArmorProfile(value *AppArmorProfileApplyConfiguration) *PodSecurityContextApplyConfiguration { + b.AppArmorProfile = value + return b +} diff --git a/applyconfigurations/core/v1/securitycontext.go b/applyconfigurations/core/v1/securitycontext.go index 8f01537e..4146b765 100644 --- a/applyconfigurations/core/v1/securitycontext.go +++ b/applyconfigurations/core/v1/securitycontext.go @@ -36,6 +36,7 @@ type SecurityContextApplyConfiguration struct { AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty"` ProcMount *corev1.ProcMountType `json:"procMount,omitempty"` SeccompProfile *SeccompProfileApplyConfiguration `json:"seccompProfile,omitempty"` + AppArmorProfile *AppArmorProfileApplyConfiguration `json:"appArmorProfile,omitempty"` } // SecurityContextApplyConfiguration constructs an declarative configuration of the SecurityContext type for use with @@ -131,3 +132,11 @@ func (b *SecurityContextApplyConfiguration) WithSeccompProfile(value *SeccompPro b.SeccompProfile = value return b } + +// WithAppArmorProfile sets the AppArmorProfile 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 AppArmorProfile field is set to the value of the last call. +func (b *SecurityContextApplyConfiguration) WithAppArmorProfile(value *AppArmorProfileApplyConfiguration) *SecurityContextApplyConfiguration { + b.AppArmorProfile = value + return b +} diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index a22406d3..d1946cfb 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -4401,6 +4401,21 @@ var schemaYAML = typed.YAMLObject(`types: - name: podAntiAffinity type: namedType: io.k8s.api.core.v1.PodAntiAffinity +- name: io.k8s.api.core.v1.AppArmorProfile + map: + fields: + - name: localhostProfile + type: + scalar: string + - name: type + type: + scalar: string + default: "" + unions: + - discriminator: type + fields: + - fieldName: localhostProfile + discriminatorValue: LocalhostProfile - name: io.k8s.api.core.v1.AttachedVolume map: fields: @@ -6720,6 +6735,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.core.v1.PodSecurityContext map: fields: + - name: appArmorProfile + type: + namedType: io.k8s.api.core.v1.AppArmorProfile - name: fsGroup type: scalar: numeric @@ -7614,6 +7632,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: allowPrivilegeEscalation type: scalar: boolean + - name: appArmorProfile + type: + namedType: io.k8s.api.core.v1.AppArmorProfile - name: capabilities type: namedType: io.k8s.api.core.v1.Capabilities diff --git a/applyconfigurations/utils.go b/applyconfigurations/utils.go index d3ec5e7d..34677697 100644 --- a/applyconfigurations/utils.go +++ b/applyconfigurations/utils.go @@ -613,6 +613,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { // Group=core, Version=v1 case corev1.SchemeGroupVersion.WithKind("Affinity"): return &applyconfigurationscorev1.AffinityApplyConfiguration{} + case corev1.SchemeGroupVersion.WithKind("AppArmorProfile"): + return &applyconfigurationscorev1.AppArmorProfileApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("AttachedVolume"): return &applyconfigurationscorev1.AttachedVolumeApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("AWSElasticBlockStoreVolumeSource"):