@@ -105,13 +105,13 @@ func TestWebhook(t *testing.T) {
105105 OldObject : func (t * testing.T , uid string ) []byte {
106106 t .Helper ()
107107 apm := mkApmServer (uid )
108- apm .Spec .Version = "7 .5.1"
108+ apm .Spec .Version = "8 .5.1"
109109 return serialize (t , apm )
110110 },
111111 Object : func (t * testing.T , uid string ) []byte {
112112 t .Helper ()
113113 apm := mkApmServer (uid )
114- apm .Spec .Version = "7 .6.1"
114+ apm .Spec .Version = "8 .6.1"
115115 return serialize (t , apm )
116116 },
117117 Check : test .ValidationWebhookSucceeded ,
@@ -122,32 +122,45 @@ func TestWebhook(t *testing.T) {
122122 OldObject : func (t * testing.T , uid string ) []byte {
123123 t .Helper ()
124124 apm := mkApmServer (uid )
125- apm .Spec .Version = "7 .6.1"
125+ apm .Spec .Version = "8 .6.1"
126126 return serialize (t , apm )
127127 },
128128 Object : func (t * testing.T , uid string ) []byte {
129129 t .Helper ()
130130 apm := mkApmServer (uid )
131- apm .Spec .Version = "7 .5.1"
131+ apm .Spec .Version = "8 .5.1"
132132 return serialize (t , apm )
133133 },
134134 Check : test .ValidationWebhookFailed (
135135 `spec.version: Forbidden: Version downgrades are not supported` ,
136136 ),
137137 },
138+ {
139+ Name : "deprecated version" ,
140+ Operation : admissionv1beta1 .Create ,
141+ Object : func (t * testing.T , uid string ) []byte {
142+ t .Helper ()
143+ apm := mkApmServer (uid )
144+ apm .Spec .Version = "7.4.0"
145+ return serialize (t , apm )
146+ },
147+ Check : test .ValidationWebhookSucceededWithWarnings (
148+ `Version 7.4.0 is EOL and support for it will be removed in a future release of the ECK operator` ,
149+ ),
150+ },
138151 {
139152 Name : "version-downgrade with override" ,
140153 Operation : admissionv1beta1 .Update ,
141154 OldObject : func (t * testing.T , uid string ) []byte {
142155 t .Helper ()
143156 apm := mkApmServer (uid )
144- apm .Spec .Version = "7 .6.1"
157+ apm .Spec .Version = "8 .6.1"
145158 return serialize (t , apm )
146159 },
147160 Object : func (t * testing.T , uid string ) []byte {
148161 t .Helper ()
149162 apm := mkApmServer (uid )
150- apm .Spec .Version = "7 .5.1"
163+ apm .Spec .Version = "8 .5.1"
151164 apm .Annotations = map [string ]string {
152165 commonv1 .DisableDowngradeValidationAnnotation : "true" ,
153166 }
@@ -169,7 +182,7 @@ func mkApmServer(uid string) *apmv1beta1.ApmServer {
169182 UID : types .UID (uid ),
170183 },
171184 Spec : apmv1beta1.ApmServerSpec {
172- Version : "7.6 .1" ,
185+ Version : "7.17 .1" ,
173186 },
174187 }
175188}
0 commit comments