ministryofjustice / analytics-platform

Parent repository for the MOJ Analytics Platform
MIT License
14 stars 1 forks source link

App build fails with message about the label #115

Closed davidread closed 4 years ago

davidread commented 4 years ago

An app build fails with message about the label:

Error: UPGRADE FAILED: Deployment.apps "criminal-fines-app-webapp" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"app":"criminal-fines-app-webapp"}: selector does not match template labels

https://concourse.services.alpha.mojanalytics.xyz/teams/main/pipelines/criminal-fines-app/jobs/deploy/builds/20

First seen in build on 5/12/19

xoen commented 4 years ago

This is caused by this "bug"/constraint in k8s which disallow mutating labels: https://github.com/kubernetes/kubernetes/issues/26202#issuecomment-357518145

I've reverted the webapp change to the labels recently which should help: https://github.com/ministryofjustice/analytics-platform-helm-charts/pull/414

xoen commented 4 years ago

I'm closing this issue and we can always keep an eye on it. We may or may not get few more of these errors but hopefully not (play with the labels could be a feasible workaround)

davidread commented 4 years ago

@sh31 says it's fixed in the chart. Not sure if it is fixed for the next build of this app though - need to check. And if it is fails we can add the label manually.

davidread commented 4 years ago

This has built fine the following time too, so all good now. Thanks @xoen