Skip to content

Commit 212f77d

Browse files
committed
Make kubebuilder generate DeepCopy functions
1 parent 10600e7 commit 212f77d

File tree

4 files changed

+81
-14
lines changed

4 files changed

+81
-14
lines changed

bundle/manifests/runtime-component.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ metadata:
6868
categories: Application Runtime
6969
certified: "true"
7070
containerImage: icr.io/appcafe/runtime-component-operator:daily
71-
createdAt: "2023-10-03T12:00:50Z"
71+
createdAt: "2023-10-04T15:17:01Z"
7272
description: Deploys any runtime component with dynamic and auto-tuning configuration
7373
olm.skipRange: '>=0.8.0 <1.2.2'
7474
operators.openshift.io/infrastructure-features: '["disconnected"]'

common/common.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,3 @@ func GetPodSecurityContext(asc *AppSecurityContext) *corev1.PodSecurityContext {
8686
}
8787
return podSecurityContext
8888
}
89-
90-
func (in *AppSecurityContext) DeepCopy() *AppSecurityContext {
91-
if in == nil {
92-
return nil
93-
}
94-
out := new(AppSecurityContext)
95-
in.DeepCopyInto(out)
96-
return out
97-
}
98-
99-
func (in *AppSecurityContext) DeepCopyInto(out *AppSecurityContext) {
100-
*out = *in
101-
}

common/types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ type BaseComponentProbes interface {
186186
}
187187

188188
// Define PodSecurityContext without overlapping fields in SecurityContext
189+
// +kubebuilder:object:generate=true
189190
type IsolatedPodSecurityContext struct {
190191
// A list of groups applied to the first process run in each container, in addition
191192
// to the container's primary GID. If unspecified, no groups will be added to
@@ -221,6 +222,7 @@ type IsolatedPodSecurityContext struct {
221222
FSGroupChangePolicy *corev1.PodFSGroupChangePolicy `json:"fsGroupChangePolicy,omitempty"`
222223
}
223224

225+
// +kubebuilder:object:generate=true
224226
type AppSecurityContext struct {
225227
IsolatedPodSecurityContext `json:",omitempty"`
226228
corev1.SecurityContext `json:",omitempty"`

common/zz_generated.deepcopy.go

Lines changed: 78 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)