You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Ignoring propagating invalid labels in app to values.yaml during deployment (#2734)
* ignoring app labels while propagating to kubernetes during deployment
* comment added for treating label key as qualified name
* fixed - was using labelKey instead of labelValue in logging
* log change
* trimming space while setting labels in app
// if labelKey or labelValue is empty then don't add in labels
305
+
iflen(labelKey) ==0||len(labelValue) ==0 {
306
+
impl.logger.Warnw("Ignoring label to propagate to app level", "labelKey", labelKey, "labelValue", labelValue, "appId", appId)
307
+
continue
308
+
}
309
+
310
+
// if labelKey is not satisfying the label key criteria don't add in labels
311
+
// label key must be a 'qualified name' (https://github.com/kubernetes/website/issues/17969)
312
+
errs:=validation.IsQualifiedName(labelKey)
313
+
iflen(errs) >0 {
314
+
impl.logger.Warnw("Ignoring label to propagate to app level", "message", fmt.Sprintf("Validation error - label key - %s is not satisfying the label key criteria", labelKey), "appId", appId)
315
+
continue
316
+
}
317
+
318
+
// if labelValue is not satisfying the label value criteria don't add in labels
319
+
errs=validation.IsValidLabelValue(labelValue)
320
+
iflen(errs) >0 {
321
+
impl.logger.Warnw("Ignoring label to propagate to app level", "message", fmt.Sprintf("Validation error - label value - %s is not satisfying the label value criteria", labelValue), "appId", appId)
0 commit comments