Skip to content

Commit

Permalink
Add preserve unknown fields annotation to FreeForm and Option fields
Browse files Browse the repository at this point in the history
Signed-off-by: Ruben Vargas <[email protected]>
  • Loading branch information
rubenvp8510 committed May 17, 2021
1 parent 7968e96 commit 29af842
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions deploy/crds/jaegertracing.io_jaegers_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ spec:
type: object
config:
type: object
x-kubernetes-preserve-unknown-fields: true
dnsPolicy:
type: string
hostNetwork:
Expand All @@ -600,6 +601,7 @@ spec:
type: object
options:
type: object
x-kubernetes-preserve-unknown-fields: true
priorityClassName:
type: string
resources:
Expand Down Expand Up @@ -1633,6 +1635,7 @@ spec:
type: object
config:
type: object
x-kubernetes-preserve-unknown-fields: true
image:
type: string
labels:
Expand All @@ -1641,6 +1644,7 @@ spec:
type: object
options:
type: object
x-kubernetes-preserve-unknown-fields: true
resources:
nullable: true
properties:
Expand Down Expand Up @@ -2629,6 +2633,7 @@ spec:
type: boolean
config:
type: object
x-kubernetes-preserve-unknown-fields: true
image:
type: string
labels:
Expand All @@ -2643,6 +2648,7 @@ spec:
type: integer
options:
type: object
x-kubernetes-preserve-unknown-fields: true
priorityClassName:
type: string
replicas:
Expand Down Expand Up @@ -3631,6 +3637,7 @@ spec:
type: boolean
config:
type: object
x-kubernetes-preserve-unknown-fields: true
image:
type: string
labels:
Expand All @@ -3645,6 +3652,7 @@ spec:
type: integer
options:
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
type: integer
Expand Down Expand Up @@ -4649,6 +4657,7 @@ spec:
type: object
options:
type: object
x-kubernetes-preserve-unknown-fields: true
resources:
nullable: true
properties:
Expand Down Expand Up @@ -5658,6 +5667,7 @@ spec:
type: integer
options:
type: object
x-kubernetes-preserve-unknown-fields: true
priorityClassName:
type: string
replicas:
Expand Down Expand Up @@ -6399,6 +6409,7 @@ spec:
properties:
options:
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
securityContext:
properties:
Expand Down Expand Up @@ -9531,6 +9542,7 @@ spec:
type: object
options:
type: object
x-kubernetes-preserve-unknown-fields: true
secretName:
type: string
type:
Expand Down Expand Up @@ -9559,6 +9571,7 @@ spec:
properties:
options:
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
volumeMounts:
items:
Expand Down
13 changes: 13 additions & 0 deletions pkg/apis/jaegertracing/v1/jaeger_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ type JaegerQuerySpec struct {
Image string `json:"image,omitempty"`

// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Options Options `json:"options,omitempty"`

// +optional
Expand Down Expand Up @@ -270,13 +271,15 @@ type JaegerQuerySpec struct {
// +k8s:openapi-gen=true
type JaegerUISpec struct {
// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Options FreeForm `json:"options,omitempty"`
}

// JaegerSamplingSpec defines the options to be used to configure the UI
// +k8s:openapi-gen=true
type JaegerSamplingSpec struct {
// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Options FreeForm `json:"options,omitempty"`
}

Expand Down Expand Up @@ -308,6 +311,7 @@ type JaegerIngressSpec struct {
JaegerCommonSpec `json:",inline,omitempty"`

// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Options Options `json:"options,omitempty"`
}

Expand Down Expand Up @@ -347,9 +351,11 @@ type JaegerAllInOneSpec struct {
Image string `json:"image,omitempty"`

// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Options Options `json:"options,omitempty"`

// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Config FreeForm `json:"config,omitempty"`

// +optional
Expand Down Expand Up @@ -392,12 +398,14 @@ type JaegerCollectorSpec struct {
Image string `json:"image,omitempty"`

// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Options Options `json:"options,omitempty"`

// +optional
JaegerCommonSpec `json:",inline,omitempty"`

// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Config FreeForm `json:"config,omitempty"`

// +optional
Expand Down Expand Up @@ -425,12 +433,14 @@ type JaegerIngesterSpec struct {
Image string `json:"image,omitempty"`

// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Options Options `json:"options,omitempty"`

// +optional
JaegerCommonSpec `json:",inline,omitempty"`

// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Config FreeForm `json:"config,omitempty"`
}

Expand All @@ -449,12 +459,14 @@ type JaegerAgentSpec struct {
ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"`

// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Options Options `json:"options,omitempty"`

// +optional
JaegerCommonSpec `json:",inline,omitempty"`

// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Config FreeForm `json:"config,omitempty"`

// +optional
Expand All @@ -480,6 +492,7 @@ type JaegerStorageSpec struct {
SecretName string `json:"secretName,omitempty"`

// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Options Options `json:"options,omitempty"`

// +optional
Expand Down

0 comments on commit 29af842

Please sign in to comment.