Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add preserve unknown fields annotation to FreeForm and Options fields #1435

Merged
merged 3 commits into from
May 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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