Skip to content

Commit efda2fc

Browse files
committed
fix: use sessionName as part of version
1 parent 4cd4730 commit efda2fc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/k8s/mutation/webhook.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ func (w *Webhook) Handle(ctx context.Context, req admission.Request) admission.R
121121
deployment.Annotations[IkeSession] = sessionName
122122

123123
lables := findLables(refStatus)
124+
lables["version"] += "-" + sessionName
125+
124126
for k, v := range lables {
125127
logger().Info("Label added", "deployemnt", req.Name, k, v)
126128
deployment.Spec.Template.Labels[k] = v
@@ -205,7 +207,6 @@ func findLables(ref *istiov1alpha1.RefStatus) map[string]string {
205207
for _, target := range ref.Targets {
206208
if *target.Kind == "Deployment" || *target.Kind == "DeploymentConfig" {
207209
lables := target.Labels
208-
lables["version"] += "-test" // TODO: dynamically lookup all target labels
209210
return lables
210211
}
211212
}

0 commit comments

Comments
 (0)