Skip to content

Commit 4e5ccbc

Browse files
Merge pull request #339 from kstrenkova/deprecate-extra-config-maps
Add warning for ExtraConfigmapsMounts deprecation
2 parents 9813b98 + 56866b3 commit 4e5ccbc

18 files changed

+208
-24
lines changed

api/bases/test.openstack.org_ansibletests.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,14 @@ spec:
106106
description: Run ansible playbook with -vvvv
107107
type: boolean
108108
extraConfigmapsMounts:
109-
description: Extra configmaps for mounting inside the pod
109+
description: |-
110+
Extra configmaps for mounting inside the pod
111+
WARNING: This parameter will be deprecated!
112+
Please use ExtraMounts parameter instead!
110113
items:
114+
description: |-
115+
WARNING: This parameter will be deprecated!
116+
Please use ExtraMounts parameter instead!
111117
properties:
112118
mountPath:
113119
description: Path within the container at which the volume should
@@ -1446,8 +1452,14 @@ spec:
14461452
description: Run ansible playbook with -vvvv
14471453
type: boolean
14481454
extraConfigmapsMounts:
1449-
description: Extra configmaps for mounting inside the pod
1455+
description: |-
1456+
Extra configmaps for mounting inside the pod
1457+
WARNING: This parameter will be deprecated!
1458+
Please use ExtraMounts parameter instead!
14501459
items:
1460+
description: |-
1461+
WARNING: This parameter will be deprecated!
1462+
Please use ExtraMounts parameter instead!
14511463
properties:
14521464
mountPath:
14531465
description: Path within the container at which the volume

api/bases/test.openstack.org_horizontests.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,14 @@ spec:
9595
This allows the user to debug any potential troubles with `oc rsh`.
9696
type: boolean
9797
extraConfigmapsMounts:
98-
description: Extra configmaps for mounting inside the pod
98+
description: |-
99+
Extra configmaps for mounting inside the pod
100+
WARNING: This parameter will be deprecated!
101+
Please use ExtraMounts parameter instead!
99102
items:
103+
description: |-
104+
WARNING: This parameter will be deprecated!
105+
Please use ExtraMounts parameter instead!
100106
properties:
101107
mountPath:
102108
description: Path within the container at which the volume should

api/bases/test.openstack.org_tempests.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,14 @@ spec:
9696
This allows the user to debug any potential troubles with `oc rsh`.
9797
type: boolean
9898
extraConfigmapsMounts:
99-
description: Extra configmaps for mounting inside the pod
99+
description: |-
100+
Extra configmaps for mounting inside the pod
101+
WARNING: This parameter will be deprecated!
102+
Please use ExtraMounts parameter instead!
100103
items:
104+
description: |-
105+
WARNING: This parameter will be deprecated!
106+
Please use ExtraMounts parameter instead!
101107
properties:
102108
mountPath:
103109
description: Path within the container at which the volume should
@@ -1784,8 +1790,14 @@ spec:
17841790
by the test-operator for tests execution.
17851791
type: string
17861792
extraConfigmapsMounts:
1787-
description: Extra configmaps for mounting inside the pod
1793+
description: |-
1794+
Extra configmaps for mounting inside the pod
1795+
WARNING: This parameter will be deprecated!
1796+
Please use ExtraMounts parameter instead!
17881797
items:
1798+
description: |-
1799+
WARNING: This parameter will be deprecated!
1800+
Please use ExtraMounts parameter instead!
17891801
properties:
17901802
mountPath:
17911803
description: Path within the container at which the volume

api/bases/test.openstack.org_tobikoes.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,14 @@ spec:
7777
This allows the user to debug any potential troubles with `oc rsh`.
7878
type: boolean
7979
extraConfigmapsMounts:
80-
description: Extra configmaps for mounting inside the pod
80+
description: |-
81+
Extra configmaps for mounting inside the pod
82+
WARNING: This parameter will be deprecated!
83+
Please use ExtraMounts parameter instead!
8184
items:
85+
description: |-
86+
WARNING: This parameter will be deprecated!
87+
Please use ExtraMounts parameter instead!
8288
properties:
8389
mountPath:
8490
description: Path within the container at which the volume should
@@ -1440,8 +1446,14 @@ spec:
14401446
by the test-operator for tests execution.
14411447
type: string
14421448
extraConfigmapsMounts:
1443-
description: Extra configmaps for mounting inside the pod
1449+
description: |-
1450+
Extra configmaps for mounting inside the pod
1451+
WARNING: This parameter will be deprecated!
1452+
Please use ExtraMounts parameter instead!
14441453
items:
1454+
description: |-
1455+
WARNING: This parameter will be deprecated!
1456+
Please use ExtraMounts parameter instead!
14451457
properties:
14461458
mountPath:
14471459
description: Path within the container at which the volume

api/v1beta1/ansibletest_webhook.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ func (r *AnsibleTest) ValidateCreate() (admission.Warnings, error) {
8888
},
8989
)
9090
}
91+
92+
if workflowStep.ExtraConfigmapsMounts != nil {
93+
allWarnings = append(allWarnings, "The ExtraConfigmapsMounts parameter will be" +
94+
"deprecated! Please use ExtraMounts parameter instead!")
95+
}
96+
}
97+
98+
if len(r.Spec.ExtraConfigmapsMounts) > 0 {
99+
allWarnings = append(allWarnings, "The ExtraConfigmapsMounts parameter will be" +
100+
"deprecated! Please use ExtraMounts parameter instead!")
91101
}
92102

93103
if r.Spec.Privileged {

api/v1beta1/common.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import (
2222
corev1 "k8s.io/api/core/v1"
2323
)
2424

25+
// WARNING: This parameter will be deprecated!
26+
// Please use ExtraMounts parameter instead!
2527
type ExtraConfigmapsMounts struct {
2628
// +operator-sdk:csv:customresourcedefinitions:type=spec
2729
// +kubebuilder:validation:Required
@@ -84,6 +86,8 @@ type CommonOptions struct {
8486
// +operator-sdk:csv:customresourcedefinitions:type=spec
8587
// +kubebuilder:validation:Optional
8688
// Extra configmaps for mounting inside the pod
89+
// WARNING: This parameter will be deprecated!
90+
// Please use ExtraMounts parameter instead!
8791
ExtraConfigmapsMounts []ExtraConfigmapsMounts `json:"extraConfigmapsMounts,omitempty"`
8892

8993
// +operator-sdk:csv:customresourcedefinitions:type=spec
@@ -172,6 +176,8 @@ type WorkflowCommonOptions struct {
172176
// +operator-sdk:csv:customresourcedefinitions:type=spec
173177
// +kubebuilder:validation:Optional
174178
// Extra configmaps for mounting inside the pod
179+
// WARNING: This parameter will be deprecated!
180+
// Please use ExtraMounts parameter instead!
175181
ExtraConfigmapsMounts *[]ExtraConfigmapsMounts `json:"extraConfigmapsMounts,omitempty"`
176182

177183
// +kubebuilder:validation:Optional

api/v1beta1/horizontest_webhook.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ func (r *HorizonTest) ValidateCreate() (admission.Warnings, error) {
6363

6464
var allWarnings admission.Warnings
6565

66+
if len(r.Spec.ExtraConfigmapsMounts) > 0 {
67+
allWarnings = append(allWarnings, "The ExtraConfigmapsMounts parameter will be" +
68+
"deprecated! Please use ExtraMounts parameter instead!")
69+
}
70+
6671
if r.Spec.Privileged {
6772
allWarnings = append(allWarnings, fmt.Sprintf(WarnPrivilegedModeOn, "HorizonTest"))
6873
}

api/v1beta1/tempest_webhook.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,16 @@ func (r *Tempest) ValidateCreate() (admission.Warnings, error) {
129129
},
130130
)
131131
}
132+
133+
if workflowStep.ExtraConfigmapsMounts != nil {
134+
allWarnings = append(allWarnings, "The ExtraConfigmapsMounts parameter will be" +
135+
"deprecated! Please use ExtraMounts parameter instead!")
136+
}
137+
}
138+
139+
if len(r.Spec.ExtraConfigmapsMounts) > 0 {
140+
allWarnings = append(allWarnings, "The ExtraConfigmapsMounts parameter will be" +
141+
"deprecated! Please use ExtraMounts parameter instead!")
132142
}
133143

134144
if r.Spec.Privileged {

api/v1beta1/tobiko_webhook.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ func (r *Tobiko) ValidateCreate() (admission.Warnings, error) {
9696
},
9797
)
9898
}
99+
100+
if workflowStep.ExtraConfigmapsMounts != nil {
101+
allWarnings = append(allWarnings, "The ExtraConfigmapsMounts parameter will be" +
102+
"deprecated! Please use ExtraMounts parameter instead!")
103+
}
104+
}
105+
106+
if len(r.Spec.ExtraConfigmapsMounts) > 0 {
107+
allWarnings = append(allWarnings, "The ExtraConfigmapsMounts parameter will be" +
108+
"deprecated! Please use ExtraMounts parameter instead!")
99109
}
100110

101111
if r.Spec.Privileged {

config/crd/bases/test.openstack.org_ansibletests.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,14 @@ spec:
106106
description: Run ansible playbook with -vvvv
107107
type: boolean
108108
extraConfigmapsMounts:
109-
description: Extra configmaps for mounting inside the pod
109+
description: |-
110+
Extra configmaps for mounting inside the pod
111+
WARNING: This parameter will be deprecated!
112+
Please use ExtraMounts parameter instead!
110113
items:
114+
description: |-
115+
WARNING: This parameter will be deprecated!
116+
Please use ExtraMounts parameter instead!
111117
properties:
112118
mountPath:
113119
description: Path within the container at which the volume should
@@ -1446,8 +1452,14 @@ spec:
14461452
description: Run ansible playbook with -vvvv
14471453
type: boolean
14481454
extraConfigmapsMounts:
1449-
description: Extra configmaps for mounting inside the pod
1455+
description: |-
1456+
Extra configmaps for mounting inside the pod
1457+
WARNING: This parameter will be deprecated!
1458+
Please use ExtraMounts parameter instead!
14501459
items:
1460+
description: |-
1461+
WARNING: This parameter will be deprecated!
1462+
Please use ExtraMounts parameter instead!
14511463
properties:
14521464
mountPath:
14531465
description: Path within the container at which the volume

0 commit comments

Comments
 (0)