Skip to content
Open
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
58 changes: 0 additions & 58 deletions api/bases/test.openstack.org_ansibletests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,35 +110,6 @@ spec:
default: false
description: Run ansible playbook with -vvvv
type: boolean
extraConfigmapsMounts:
description: |-
Extra configmaps for mounting inside the pod
WARNING: This parameter will be deprecated!
Please use ExtraMounts parameter instead!
items:
description: |-
WARNING: This parameter will be deprecated!
Please use ExtraMounts parameter instead!
properties:
mountPath:
description: Path within the container at which the volume should
be mounted.
type: string
name:
description: The name of an existing config map for mounting.
maxLength: 253
type: string
subPath:
default: ""
description: Config map subpath for mounting, defaults to configmap
root.
type: string
required:
- mountPath
- name
- subPath
type: object
type: array
extraMounts:
description: ExtraMounts containing conf files, credentials and storage
volumes
Expand Down Expand Up @@ -1063,35 +1034,6 @@ spec:
debug:
description: Run ansible playbook with -vvvv
type: boolean
extraConfigmapsMounts:
description: |-
Extra configmaps for mounting inside the pod
WARNING: This parameter will be deprecated!
Please use ExtraMounts parameter instead!
items:
description: |-
WARNING: This parameter will be deprecated!
Please use ExtraMounts parameter instead!
properties:
mountPath:
description: Path within the container at which the volume
should be mounted.
type: string
name:
description: The name of an existing config map for mounting.
maxLength: 253
type: string
subPath:
default: ""
description: Config map subpath for mounting, defaults
to configmap root.
type: string
required:
- mountPath
- name
- subPath
type: object
type: array
extraMounts:
description: ExtraMounts containing conf files, credentials
and storage volumes
Expand Down
29 changes: 0 additions & 29 deletions api/bases/test.openstack.org_horizontests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,35 +98,6 @@ spec:
(stuck in "Running" phase) or until the corresponding HorizonTest CR is deleted.
This allows the user to debug any potential troubles with `oc rsh`.
type: boolean
extraConfigmapsMounts:
description: |-
Extra configmaps for mounting inside the pod
WARNING: This parameter will be deprecated!
Please use ExtraMounts parameter instead!
items:
description: |-
WARNING: This parameter will be deprecated!
Please use ExtraMounts parameter instead!
properties:
mountPath:
description: Path within the container at which the volume should
be mounted.
type: string
name:
description: The name of an existing config map for mounting.
maxLength: 253
type: string
subPath:
default: ""
description: Config map subpath for mounting, defaults to configmap
root.
type: string
required:
- mountPath
- name
- subPath
type: object
type: array
extraFlag:
description: |-
ExtraFlag is an extra flag that can be set to modify pytest command to
Expand Down
58 changes: 0 additions & 58 deletions api/bases/test.openstack.org_tempests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,35 +95,6 @@ spec:
(stuck in "Running" phase) or until the corresponding Tempest CR is deleted.
This allows the user to debug any potential troubles with `oc rsh`.
type: boolean
extraConfigmapsMounts:
description: |-
Extra configmaps for mounting inside the pod
WARNING: This parameter will be deprecated!
Please use ExtraMounts parameter instead!
items:
description: |-
WARNING: This parameter will be deprecated!
Please use ExtraMounts parameter instead!
properties:
mountPath:
description: Path within the container at which the volume should
be mounted.
type: string
name:
description: The name of an existing config map for mounting.
maxLength: 253
type: string
subPath:
default: ""
description: Config map subpath for mounting, defaults to configmap
root.
type: string
required:
- mountPath
- name
- subPath
type: object
type: array
extraMounts:
description: ExtraMounts containing conf files, credentials and storage
volumes
Expand Down Expand Up @@ -1391,35 +1362,6 @@ spec:
description: A URL of a container image that should be used
by the test-operator for tests execution.
type: string
extraConfigmapsMounts:
description: |-
Extra configmaps for mounting inside the pod
WARNING: This parameter will be deprecated!
Please use ExtraMounts parameter instead!
items:
description: |-
WARNING: This parameter will be deprecated!
Please use ExtraMounts parameter instead!
properties:
mountPath:
description: Path within the container at which the volume
should be mounted.
type: string
name:
description: The name of an existing config map for mounting.
maxLength: 253
type: string
subPath:
default: ""
description: Config map subpath for mounting, defaults
to configmap root.
type: string
required:
- mountPath
- name
- subPath
type: object
type: array
extraMounts:
description: ExtraMounts containing conf files, credentials
and storage volumes
Expand Down
58 changes: 0 additions & 58 deletions api/bases/test.openstack.org_tobikoes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,35 +76,6 @@ spec:
(stuck in "Running" phase) or until the corresponding Tobiko CR is deleted.
This allows the user to debug any potential troubles with `oc rsh`.
type: boolean
extraConfigmapsMounts:
description: |-
Extra configmaps for mounting inside the pod
WARNING: This parameter will be deprecated!
Please use ExtraMounts parameter instead!
items:
description: |-
WARNING: This parameter will be deprecated!
Please use ExtraMounts parameter instead!
properties:
mountPath:
description: Path within the container at which the volume should
be mounted.
type: string
name:
description: The name of an existing config map for mounting.
maxLength: 253
type: string
subPath:
default: ""
description: Config map subpath for mounting, defaults to configmap
root.
type: string
required:
- mountPath
- name
- subPath
type: object
type: array
extraMounts:
description: ExtraMounts containing conf files, credentials and storage
volumes
Expand Down Expand Up @@ -1065,35 +1036,6 @@ spec:
description: A URL of a container image that should be used
by the test-operator for tests execution.
type: string
extraConfigmapsMounts:
description: |-
Extra configmaps for mounting inside the pod
WARNING: This parameter will be deprecated!
Please use ExtraMounts parameter instead!
items:
description: |-
WARNING: This parameter will be deprecated!
Please use ExtraMounts parameter instead!
properties:
mountPath:
description: Path within the container at which the volume
should be mounted.
type: string
name:
description: The name of an existing config map for mounting.
maxLength: 253
type: string
subPath:
default: ""
description: Config map subpath for mounting, defaults
to configmap root.
type: string
required:
- mountPath
- name
- subPath
type: object
type: array
extraMounts:
description: ExtraMounts containing conf files, credentials
and storage volumes
Expand Down
2 changes: 0 additions & 2 deletions api/v1beta1/ansibletest_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ func (r *AnsibleTest) ValidateCreate() (admission.Warnings, error) {
// Common validations
allErrs = ValidatePodName(allErrs, r.Name, r.Kind)
allWarnings = CheckPrivilegedWarning(allWarnings, r.Spec.Privileged, r.Kind)
allWarnings = CheckExtraConfigmapsDeprecation(allWarnings, r.Spec.ExtraConfigmapsMounts)

// Workflow-specific validations
if len(r.Spec.Workflow) > 0 {
allErrs = ValidateWorkflowPodNames(allErrs, r.Name, r.Kind, r.Spec.Workflow)
allWarnings = CheckSELinuxWarning(allWarnings, r.Spec.Privileged, r.Spec.SELinuxLevel, r.Kind)
allWarnings = CheckWorkflowExtraConfigmapsDeprecation(allWarnings, r.Spec.Workflow)
}

if err := BuildValidationError(r.Kind, r.GetName(), allErrs); err != nil {
Expand Down
35 changes: 0 additions & 35 deletions api/v1beta1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,6 @@ import (
corev1 "k8s.io/api/core/v1"
)

// WARNING: This parameter will be deprecated!
// Please use ExtraMounts parameter instead!
type ExtraConfigmapsMounts struct {
// +operator-sdk:csv:customresourcedefinitions:type=spec
// +kubebuilder:validation:Required
// +kubebuilder:validation:MaxLength:=253
// The name of an existing config map for mounting.
Name string `json:"name"`

// +operator-sdk:csv:customresourcedefinitions:type=spec
// +kubebuilder:validation:Required
// Path within the container at which the volume should be mounted.
MountPath string `json:"mountPath"`

// +operator-sdk:csv:customresourcedefinitions:type=spec
// +kubebuilder:validation:optional
// +kubebuilder:default:=""
// Config map subpath for mounting, defaults to configmap root.
SubPath string `json:"subPath"`
}

type CommonOptions struct {
// +operator-sdk:csv:customresourcedefinitions:type=spec
// +kubebuilder:validation:optional
Expand Down Expand Up @@ -82,13 +61,6 @@ type CommonOptions struct {
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
BackoffLimit *int32 `json:"backoffLimit,omitempty"`

// +operator-sdk:csv:customresourcedefinitions:type=spec
// +kubebuilder:validation:Optional
// Extra configmaps for mounting inside the pod
// WARNING: This parameter will be deprecated!
// Please use ExtraMounts parameter instead!
ExtraConfigmapsMounts []ExtraConfigmapsMounts `json:"extraConfigmapsMounts,omitempty"`

// +operator-sdk:csv:customresourcedefinitions:type=spec
// +kubebuilder:validation:Optional
// ExtraMounts containing conf files, credentials and storage volumes
Expand Down Expand Up @@ -178,13 +150,6 @@ type WorkflowCommonOptions struct {
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
BackoffLimit *int32 `json:"backoffLimit,omitempty"`

// +operator-sdk:csv:customresourcedefinitions:type=spec
// +kubebuilder:validation:Optional
// Extra configmaps for mounting inside the pod
// WARNING: This parameter will be deprecated!
// Please use ExtraMounts parameter instead!
ExtraConfigmapsMounts *[]ExtraConfigmapsMounts `json:"extraConfigmapsMounts,omitempty"`

// +operator-sdk:csv:customresourcedefinitions:type=spec
// +kubebuilder:validation:Optional
// ExtraMounts containing conf files, credentials and storage volumes
Expand Down
22 changes: 0 additions & 22 deletions api/v1beta1/common_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,28 +131,6 @@ func ValidateWorkflowPodNames(allErrs field.ErrorList, name, kind string, workfl
return allErrs
}

// CheckExtraConfigmapsDeprecation returns warning if ExtraConfigmapsMounts is used
func CheckExtraConfigmapsDeprecation(allWarn admission.Warnings, extraConfigmaps interface{}) admission.Warnings {
if v := reflect.ValueOf(extraConfigmaps); v.Len() > 0 {
allWarn = append(allWarn, "The ExtraConfigmapsMounts parameter will be"+
" deprecated! Please use ExtraMounts parameter instead!")
}
return allWarn
}

// CheckWorkflowExtraConfigmapsDeprecation checks for deprecated field in workflow steps
func CheckWorkflowExtraConfigmapsDeprecation(allWarn admission.Warnings, workflow interface{}) admission.Warnings {
v := reflect.ValueOf(workflow)

for i := 0; i < v.Len(); i++ {
if field := v.Index(i).FieldByName("ExtraConfigmapsMounts"); field.IsValid() && !field.IsNil() {
allWarn = append(allWarn, "The ExtraConfigmapsMounts parameter will be"+
" deprecated! Please use ExtraMounts parameter instead!")
}
}
return allWarn
}

// CheckPrivilegedWarning returns warning if privileged mode is enabled
func CheckPrivilegedWarning(allWarn admission.Warnings, privileged bool, kind string) admission.Warnings {
if privileged {
Expand Down
1 change: 0 additions & 1 deletion api/v1beta1/horizontest_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func (r *HorizonTest) ValidateCreate() (admission.Warnings, error) {
var allWarnings admission.Warnings

allWarnings = CheckPrivilegedWarning(allWarnings, r.Spec.Privileged, r.Kind)
allWarnings = CheckExtraConfigmapsDeprecation(allWarnings, r.Spec.ExtraConfigmapsMounts)

return allWarnings, nil
}
Expand Down
2 changes: 0 additions & 2 deletions api/v1beta1/tempest_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,12 @@ func (r *Tempest) ValidateCreate() (admission.Warnings, error) {
// Common validations
allErrs = ValidatePodName(allErrs, r.Name, r.Kind)
allWarnings = CheckPrivilegedWarning(allWarnings, r.Spec.Privileged, r.Kind)
allWarnings = CheckExtraConfigmapsDeprecation(allWarnings, r.Spec.ExtraConfigmapsMounts)

// Workflow-specific validations
if len(r.Spec.Workflow) > 0 {
allErrs = ValidateDebugWorkflow(allErrs, r.Spec.Debug, r.Kind)
allErrs = ValidateWorkflowPodNames(allErrs, r.Name, r.Kind, r.Spec.Workflow)
allWarnings = CheckSELinuxWarning(allWarnings, r.Spec.Privileged, r.Spec.SELinuxLevel, r.Kind)
allWarnings = CheckWorkflowExtraConfigmapsDeprecation(allWarnings, r.Spec.Workflow)
}

// Privileged mode validation
Expand Down
2 changes: 0 additions & 2 deletions api/v1beta1/tobiko_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func (r *Tobiko) ValidateCreate() (admission.Warnings, error) {
// Common validations
allErrs = ValidatePodName(allErrs, r.Name, r.Kind)
allWarnings = CheckPrivilegedWarning(allWarnings, r.Spec.Privileged, r.Kind)
allWarnings = CheckExtraConfigmapsDeprecation(allWarnings, r.Spec.ExtraConfigmapsMounts)

// Special warning if privileged mode is off
if !r.Spec.Privileged {
Expand All @@ -64,7 +63,6 @@ func (r *Tobiko) ValidateCreate() (admission.Warnings, error) {
allErrs = ValidateDebugWorkflow(allErrs, r.Spec.Debug, r.Kind)
allErrs = ValidateWorkflowPodNames(allErrs, r.Name, r.Kind, r.Spec.Workflow)
allWarnings = CheckSELinuxWarning(allWarnings, r.Spec.Privileged, r.Spec.SELinuxLevel, r.Kind)
allWarnings = CheckWorkflowExtraConfigmapsDeprecation(allWarnings, r.Spec.Workflow)
}

if err := BuildValidationError(r.Kind, r.GetName(), allErrs); err != nil {
Expand Down
Loading
Loading