@@ -117,6 +117,7 @@ func (u *runtimeAttachPlugin) Install(opt *InstallOptions, v Values) (Values, er
117117 }
118118 // normalize the key in the secret to make sure we are not violating kube naming conventions
119119 name := strings .ReplaceAll (opt .RuntimeEnvironment , "/" , "." )
120+ name = strings .ReplaceAll (name , "@" , "." )
120121 currentVenonaConf .Runtimes [fmt .Sprintf ("%s.runtime.yaml" , name )] = rc
121122 runtimes := map [string ]string {}
122123 for name , runtime := range currentVenonaConf .Runtimes {
@@ -201,17 +202,16 @@ func (u *runtimeAttachPlugin) Delete(deleteOpt *DeleteOptions, v Values) error {
201202 u .logger .Error (fmt .Sprintf ("Cannot read venonaconf: %v " , err ))
202203 return err
203204 }
204- name := strings .ReplaceAll (deleteOpt .RuntimeEnvironment , "/" , "." )
205+ name := strings .ReplaceAll (deleteOpt .RuntimeEnvironment , "/" , "." )
205206 name = fmt .Sprintf ("%s.runtime.yaml" , name )
206207 if _ , ok := currentVenonaConf .Runtimes [name ]; ok {
207- delete (currentVenonaConf .Runtimes , name )
208+ delete (currentVenonaConf .Runtimes , name )
208209 }
209210
210-
211- // If only one runtime is defined, remove the secret , otherwise remove the entry and persist
211+ // If only one runtime is defined, remove the secret , otherwise remove the entry and persist
212212 shouldDelete := true
213213 if len (currentVenonaConf .Runtimes ) > 0 {
214-
214+
215215 runtimes := map [string ]string {}
216216 for name , runtime := range currentVenonaConf .Runtimes {
217217 // marshel prior persist
@@ -220,15 +220,14 @@ func (u *runtimeAttachPlugin) Delete(deleteOpt *DeleteOptions, v Values) error {
220220 u .logger .Error (fmt .Sprintf ("Cannot marshal merged venonaconf: %v " , err ))
221221 return err
222222 }
223-
223+
224224 runtimes [name ] = base64 .StdEncoding .EncodeToString ([]byte (d ))
225225 }
226-
227226
228227 shouldDelete = false
229228 v ["venonaConf" ] = runtimes
230229
231- cs .CoreV1 ().Secrets (deleteOpt .AgentNamespace ).Delete (runtimeSecretName , & metav1.DeleteOptions {})
230+ cs .CoreV1 ().Secrets (deleteOpt .AgentNamespace ).Delete (runtimeSecretName , & metav1.DeleteOptions {})
232231
233232 err = install (& installOptions {
234233 logger : u .logger ,
@@ -243,9 +242,7 @@ func (u *runtimeAttachPlugin) Delete(deleteOpt *DeleteOptions, v Values) error {
243242
244243 }
245244
246-
247-
248- if shouldDelete {
245+ if shouldDelete {
249246 opt := & deleteOptions {
250247 templates : templates .TemplatesMap (),
251248 templateValues : v ,
@@ -258,7 +255,7 @@ func (u *runtimeAttachPlugin) Delete(deleteOpt *DeleteOptions, v Values) error {
258255 return uninstall (opt )
259256 }
260257 return nil
261-
258+
262259}
263260
264261func (u * runtimeAttachPlugin ) Upgrade (_ * UpgradeOptions , v Values ) (Values , error ) {
0 commit comments