diff --git a/api/bases/test.openstack.org_ansibletests.yaml b/api/bases/test.openstack.org_ansibletests.yaml index 6dff9fc6..3ab618df 100644 --- a/api/bases/test.openstack.org_ansibletests.yaml +++ b/api/bases/test.openstack.org_ansibletests.yaml @@ -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 @@ -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 diff --git a/api/bases/test.openstack.org_horizontests.yaml b/api/bases/test.openstack.org_horizontests.yaml index ea23e7cd..a640211f 100644 --- a/api/bases/test.openstack.org_horizontests.yaml +++ b/api/bases/test.openstack.org_horizontests.yaml @@ -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 diff --git a/api/bases/test.openstack.org_tempests.yaml b/api/bases/test.openstack.org_tempests.yaml index ea08d2d7..f65ed58d 100644 --- a/api/bases/test.openstack.org_tempests.yaml +++ b/api/bases/test.openstack.org_tempests.yaml @@ -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 @@ -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 diff --git a/api/bases/test.openstack.org_tobikoes.yaml b/api/bases/test.openstack.org_tobikoes.yaml index b7f5d65b..acd612dd 100644 --- a/api/bases/test.openstack.org_tobikoes.yaml +++ b/api/bases/test.openstack.org_tobikoes.yaml @@ -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 @@ -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 diff --git a/api/v1beta1/ansibletest_webhook.go b/api/v1beta1/ansibletest_webhook.go index 263bb527..3501a440 100644 --- a/api/v1beta1/ansibletest_webhook.go +++ b/api/v1beta1/ansibletest_webhook.go @@ -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 { diff --git a/api/v1beta1/common.go b/api/v1beta1/common.go index d9e88d29..1619c150 100644 --- a/api/v1beta1/common.go +++ b/api/v1beta1/common.go @@ -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 @@ -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 @@ -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 diff --git a/api/v1beta1/common_webhook.go b/api/v1beta1/common_webhook.go index 6fbb0ca1..19c6c6e7 100644 --- a/api/v1beta1/common_webhook.go +++ b/api/v1beta1/common_webhook.go @@ -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 { diff --git a/api/v1beta1/horizontest_webhook.go b/api/v1beta1/horizontest_webhook.go index 7e2bdef1..ed63e699 100644 --- a/api/v1beta1/horizontest_webhook.go +++ b/api/v1beta1/horizontest_webhook.go @@ -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 } diff --git a/api/v1beta1/tempest_webhook.go b/api/v1beta1/tempest_webhook.go index b562b5b0..e55cc594 100644 --- a/api/v1beta1/tempest_webhook.go +++ b/api/v1beta1/tempest_webhook.go @@ -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 diff --git a/api/v1beta1/tobiko_webhook.go b/api/v1beta1/tobiko_webhook.go index cd22200d..f8b46dd2 100644 --- a/api/v1beta1/tobiko_webhook.go +++ b/api/v1beta1/tobiko_webhook.go @@ -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 { @@ -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 { diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index d90f60fb..c27d8d0d 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -156,11 +156,6 @@ func (in *CommonOptions) DeepCopyInto(out *CommonOptions) { *out = new(int32) **out = **in } - if in.ExtraConfigmapsMounts != nil { - in, out := &in.ExtraConfigmapsMounts, &out.ExtraConfigmapsMounts - *out = make([]ExtraConfigmapsMounts, len(*in)) - copy(*out, *in) - } if in.ExtraMounts != nil { in, out := &in.ExtraMounts, &out.ExtraMounts *out = make([]ExtraVolMounts, len(*in)) @@ -254,21 +249,6 @@ func (in *ExternalPluginType) DeepCopy() *ExternalPluginType { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtraConfigmapsMounts) DeepCopyInto(out *ExtraConfigmapsMounts) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraConfigmapsMounts. -func (in *ExtraConfigmapsMounts) DeepCopy() *ExtraConfigmapsMounts { - if in == nil { - return nil - } - out := new(ExtraConfigmapsMounts) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExtraImagesFlavorType) DeepCopyInto(out *ExtraImagesFlavorType) { *out = *in @@ -737,15 +717,6 @@ func (in *WorkflowCommonOptions) DeepCopyInto(out *WorkflowCommonOptions) { *out = new(int32) **out = **in } - if in.ExtraConfigmapsMounts != nil { - in, out := &in.ExtraConfigmapsMounts, &out.ExtraConfigmapsMounts - *out = new([]ExtraConfigmapsMounts) - if **in != nil { - in, out := *in, *out - *out = make([]ExtraConfigmapsMounts, len(*in)) - copy(*out, *in) - } - } if in.ExtraMounts != nil { in, out := &in.ExtraMounts, &out.ExtraMounts *out = new([]ExtraVolMounts) diff --git a/config/crd/bases/test.openstack.org_ansibletests.yaml b/config/crd/bases/test.openstack.org_ansibletests.yaml index 6dff9fc6..3ab618df 100644 --- a/config/crd/bases/test.openstack.org_ansibletests.yaml +++ b/config/crd/bases/test.openstack.org_ansibletests.yaml @@ -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 @@ -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 diff --git a/config/crd/bases/test.openstack.org_horizontests.yaml b/config/crd/bases/test.openstack.org_horizontests.yaml index ea23e7cd..a640211f 100644 --- a/config/crd/bases/test.openstack.org_horizontests.yaml +++ b/config/crd/bases/test.openstack.org_horizontests.yaml @@ -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 diff --git a/config/crd/bases/test.openstack.org_tempests.yaml b/config/crd/bases/test.openstack.org_tempests.yaml index ea08d2d7..f65ed58d 100644 --- a/config/crd/bases/test.openstack.org_tempests.yaml +++ b/config/crd/bases/test.openstack.org_tempests.yaml @@ -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 @@ -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 diff --git a/config/crd/bases/test.openstack.org_tobikoes.yaml b/config/crd/bases/test.openstack.org_tobikoes.yaml index b7f5d65b..acd612dd 100644 --- a/config/crd/bases/test.openstack.org_tobikoes.yaml +++ b/config/crd/bases/test.openstack.org_tobikoes.yaml @@ -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 @@ -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 diff --git a/config/manifests/bases/test-operator.clusterserviceversion.yaml b/config/manifests/bases/test-operator.clusterserviceversion.yaml index d7e97685..24591953 100644 --- a/config/manifests/bases/test-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/test-operator.clusterserviceversion.yaml @@ -71,21 +71,6 @@ spec: - description: Run ansible playbook with -vvvv displayName: Debug path: debug - - description: |- - Extra configmaps for mounting inside the pod - WARNING: This parameter will be deprecated! - Please use ExtraMounts parameter instead! - displayName: Extra Configmaps Mounts - path: extraConfigmapsMounts - - description: Path within the container at which the volume should be mounted. - displayName: Mount Path - path: extraConfigmapsMounts[0].mountPath - - description: The name of an existing config map for mounting. - displayName: Name - path: extraConfigmapsMounts[0].name - - description: Config map subpath for mounting, defaults to configmap root. - displayName: Sub Path - path: extraConfigmapsMounts[0].subPath - description: ExtraMounts containing conf files, credentials and storage volumes displayName: Extra Mounts path: extraMounts @@ -180,21 +165,6 @@ spec: - description: Run ansible playbook with -vvvv displayName: Debug path: workflow[0].debug - - description: |- - Extra configmaps for mounting inside the pod - WARNING: This parameter will be deprecated! - Please use ExtraMounts parameter instead! - displayName: Extra Configmaps Mounts - path: workflow[0].extraConfigmapsMounts - - description: Path within the container at which the volume should be mounted. - displayName: Mount Path - path: workflow[0].extraConfigmapsMounts.mountPath - - description: The name of an existing config map for mounting. - displayName: Name - path: workflow[0].extraConfigmapsMounts.name - - description: Config map subpath for mounting, defaults to configmap root. - displayName: Sub Path - path: workflow[0].extraConfigmapsMounts.subPath - description: ExtraMounts containing conf files, credentials and storage volumes displayName: Extra Mounts path: workflow[0].extraMounts @@ -289,21 +259,6 @@ spec: - description: DashboardUrl is the URL of the Horizon dashboard. displayName: Dashboard Url path: dashboardUrl - - description: |- - Extra configmaps for mounting inside the pod - WARNING: This parameter will be deprecated! - Please use ExtraMounts parameter instead! - displayName: Extra Configmaps Mounts - path: extraConfigmapsMounts - - description: Path within the container at which the volume should be mounted. - displayName: Mount Path - path: extraConfigmapsMounts[0].mountPath - - description: The name of an existing config map for mounting. - displayName: Name - path: extraConfigmapsMounts[0].name - - description: Config map subpath for mounting, defaults to configmap root. - displayName: Sub Path - path: extraConfigmapsMounts[0].subPath - description: |- ExtraFlag is an extra flag that can be set to modify pytest command to exclude or include particular test(s) @@ -420,21 +375,6 @@ spec: This allows the user to debug any potential troubles with `oc rsh`. displayName: Debug path: debug - - description: |- - Extra configmaps for mounting inside the pod - WARNING: This parameter will be deprecated! - Please use ExtraMounts parameter instead! - displayName: Extra Configmaps Mounts - path: extraConfigmapsMounts - - description: Path within the container at which the volume should be mounted. - displayName: Mount Path - path: extraConfigmapsMounts[0].mountPath - - description: The name of an existing config map for mounting. - displayName: Name - path: extraConfigmapsMounts[0].name - - description: Config map subpath for mounting, defaults to configmap root. - displayName: Sub Path - path: extraConfigmapsMounts[0].subPath - description: ExtraMounts containing conf files, credentials and storage volumes displayName: Extra Mounts path: extraMounts @@ -744,21 +684,6 @@ spec: for tests execution. displayName: Container Image path: workflow[0].containerImage - - description: |- - Extra configmaps for mounting inside the pod - WARNING: This parameter will be deprecated! - Please use ExtraMounts parameter instead! - displayName: Extra Configmaps Mounts - path: workflow[0].extraConfigmapsMounts - - description: Path within the container at which the volume should be mounted. - displayName: Mount Path - path: workflow[0].extraConfigmapsMounts.mountPath - - description: The name of an existing config map for mounting. - displayName: Name - path: workflow[0].extraConfigmapsMounts.name - - description: Config map subpath for mounting, defaults to configmap root. - displayName: Sub Path - path: workflow[0].extraConfigmapsMounts.subPath - description: ExtraMounts containing conf files, credentials and storage volumes displayName: Extra Mounts path: workflow[0].extraMounts @@ -1061,21 +986,6 @@ spec: for tests execution. displayName: Container Image path: containerImage - - description: |- - Extra configmaps for mounting inside the pod - WARNING: This parameter will be deprecated! - Please use ExtraMounts parameter instead! - displayName: Extra Configmaps Mounts - path: extraConfigmapsMounts - - description: Path within the container at which the volume should be mounted. - displayName: Mount Path - path: extraConfigmapsMounts[0].mountPath - - description: The name of an existing config map for mounting. - displayName: Name - path: extraConfigmapsMounts[0].name - - description: Config map subpath for mounting, defaults to configmap root. - displayName: Sub Path - path: extraConfigmapsMounts[0].subPath - description: ExtraMounts containing conf files, credentials and storage volumes displayName: Extra Mounts path: extraMounts @@ -1188,21 +1098,6 @@ spec: for tests execution. displayName: Container Image path: workflow[0].containerImage - - description: |- - Extra configmaps for mounting inside the pod - WARNING: This parameter will be deprecated! - Please use ExtraMounts parameter instead! - displayName: Extra Configmaps Mounts - path: workflow[0].extraConfigmapsMounts - - description: Path within the container at which the volume should be mounted. - displayName: Mount Path - path: workflow[0].extraConfigmapsMounts.mountPath - - description: The name of an existing config map for mounting. - displayName: Name - path: workflow[0].extraConfigmapsMounts.name - - description: Config map subpath for mounting, defaults to configmap root. - displayName: Sub Path - path: workflow[0].extraConfigmapsMounts.subPath - description: ExtraMounts containing conf files, credentials and storage volumes displayName: Extra Mounts path: workflow[0].extraMounts diff --git a/internal/ansibletest/volumes.go b/internal/ansibletest/volumes.go index 06a5f21a..6bef6e68 100644 --- a/internal/ansibletest/volumes.go +++ b/internal/ansibletest/volumes.go @@ -40,14 +40,6 @@ func GetVolumes( } volumes = util.AppendExtraMountsVolumes(volumes, instance.Spec.ExtraMounts, svc) - volumes = util.AppendExtraConfigmapsVolumes(volumes, instance.Spec.ExtraConfigmapsMounts, util.PublicInfoMode) - - if len(instance.Spec.Workflow) > 0 { - cmMounts := instance.Spec.Workflow[externalWorkflowCounter].ExtraConfigmapsMounts - if cmMounts != nil { - volumes = util.AppendExtraConfigmapsVolumes(volumes, *cmMounts, util.PublicInfoMode) - } - } return volumes } @@ -86,14 +78,6 @@ func GetVolumeMounts( } volumeMounts = util.AppendExtraMountsVolumeMounts(volumeMounts, instance.Spec.ExtraMounts, svc) - volumeMounts = util.AppendExtraConfigmapsVolumeMounts(volumeMounts, instance.Spec.ExtraConfigmapsMounts) - - if len(instance.Spec.Workflow) > 0 { - cmMounts := instance.Spec.Workflow[externalWorkflowCounter].ExtraConfigmapsMounts - if cmMounts != nil { - volumeMounts = util.AppendExtraConfigmapsVolumeMounts(volumeMounts, *cmMounts) - } - } return volumeMounts } diff --git a/internal/horizontest/volumes.go b/internal/horizontest/volumes.go index eb1fdb06..9926c0b8 100644 --- a/internal/horizontest/volumes.go +++ b/internal/horizontest/volumes.go @@ -36,7 +36,6 @@ func GetVolumes( } volumes = util.AppendExtraMountsVolumes(volumes, instance.Spec.ExtraMounts, svc) - volumes = util.AppendExtraConfigmapsVolumes(volumes, instance.Spec.ExtraConfigmapsMounts, util.PublicInfoMode) return volumes } @@ -71,7 +70,6 @@ func GetVolumeMounts( } volumeMounts = util.AppendExtraMountsVolumeMounts(volumeMounts, instance.Spec.ExtraMounts, svc) - volumeMounts = util.AppendExtraConfigmapsVolumeMounts(volumeMounts, instance.Spec.ExtraConfigmapsMounts) return volumeMounts } diff --git a/internal/tempest/volumes.go b/internal/tempest/volumes.go index 405254de..644afeba 100644 --- a/internal/tempest/volumes.go +++ b/internal/tempest/volumes.go @@ -39,7 +39,6 @@ func GetVolumes( } volumes = util.AppendExtraMountsVolumes(volumes, instance.Spec.ExtraMounts, svc) - volumes = util.AppendExtraConfigmapsVolumes(volumes, instance.Spec.ExtraConfigmapsMounts, util.ScriptsVolumeDefaultMode) return volumes } @@ -72,7 +71,6 @@ func GetVolumeMounts( } volumeMounts = util.AppendExtraMountsVolumeMounts(volumeMounts, instance.Spec.ExtraMounts, svc) - volumeMounts = util.AppendExtraConfigmapsVolumeMounts(volumeMounts, instance.Spec.ExtraConfigmapsMounts) return volumeMounts } diff --git a/internal/tobiko/volumes.go b/internal/tobiko/volumes.go index 44679f00..dbb70802 100644 --- a/internal/tobiko/volumes.go +++ b/internal/tobiko/volumes.go @@ -71,7 +71,6 @@ func GetVolumes( } volumes = util.AppendExtraMountsVolumes(volumes, instance.Spec.ExtraMounts, svc) - volumes = util.AppendExtraConfigmapsVolumes(volumes, instance.Spec.ExtraConfigmapsMounts, util.PublicInfoMode) return volumes } @@ -115,7 +114,6 @@ func GetVolumeMounts( } volumeMounts = util.AppendExtraMountsVolumeMounts(volumeMounts, instance.Spec.ExtraMounts, svc) - volumeMounts = util.AppendExtraConfigmapsVolumeMounts(volumeMounts, instance.Spec.ExtraConfigmapsMounts) return volumeMounts } diff --git a/internal/util/volumes.go b/internal/util/volumes.go index b3c257be..e286457c 100644 --- a/internal/util/volumes.go +++ b/internal/util/volumes.go @@ -213,32 +213,6 @@ func AppendExtraMountsVolumes( return volumes } -// AppendExtraConfigmapsVolumes appends volumes from ExtraConfigmapsMounts spec -func AppendExtraConfigmapsVolumes( - volumes []corev1.Volume, - extraConfigmaps []testv1beta1.ExtraConfigmapsMounts, - defaultMode int32, -) []corev1.Volume { - for _, vol := range extraConfigmaps { - mode := defaultMode - extraVol := corev1.Volume{ - Name: vol.Name, - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - DefaultMode: &mode, - LocalObjectReference: corev1.LocalObjectReference{ - Name: vol.Name, - }, - }, - }, - } - - volumes = append(volumes, extraVol) - } - - return volumes -} - // CreateVolumeMount creates a basic VolumeMount func CreateVolumeMount(name string, mountPath string, readOnly bool) corev1.VolumeMount { return corev1.VolumeMount{ @@ -287,22 +261,3 @@ func AppendExtraMountsVolumeMounts( return volumeMounts } - -// AppendExtraConfigmapsVolumeMounts appends volume mounts from ExtraConfigmapsMounts spec -func AppendExtraConfigmapsVolumeMounts( - volumeMounts []corev1.VolumeMount, - extraConfigmaps []testv1beta1.ExtraConfigmapsMounts, -) []corev1.VolumeMount { - for _, vol := range extraConfigmaps { - extraMount := corev1.VolumeMount{ - Name: vol.Name, - MountPath: vol.MountPath, - SubPath: vol.SubPath, - ReadOnly: true, - } - - volumeMounts = append(volumeMounts, extraMount) - } - - return volumeMounts -}