Skyscanner / kms-issuer

KMS issuer is a cert-manager Certificate Request controller that uses AWS KMS to sign the certificate request.
Apache License 2.0
62 stars 18 forks source link

Fix helm chart #112

Closed duboisf closed 2 years ago

duboisf commented 2 years ago

The deployment template was producing an invalid deployment when using a nodeSelector:

helm upgrade --install kms-issuer2 kms-issuer/kms-issuer --namespace kms-issuer-system --create-namespace --set 'nodeSelector.purpose=infra' Release "kms-issuer2" does not exist. Installing it now.
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Deployment.spec.template): unknown field "nodeSelector" in io.k8s.api.core.v1.PodTemplateSpec

The nodeSelector, affinity and tolerations keys were under spec.template instead of spec.template.spec.

With this fix it works:

pwd; helm upgrade --install kms-issuer . --namespace kms-issuer-system --create-namespace --set 'nodeSelector.purpose=infra,tolerations[0].effect=NoSchedule,tolerations[0].key=dedicated,tolerations[0].operator=Equal,tolerations[0].value=infra'
/home/fred/git/third_party/kms-issuer/charts/kms-issuer
Release "kms-issuer" does not exist. Installing it now.
NAME: kms-issuer
LAST DEPLOYED: Thu Jul 14 12:21:57 2022
NAMESPACE: kms-issuer-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
maruina commented 2 years ago

Hey @duboisf, thanks for your contribution! If you also bump the chart version at https://github.com/Skyscanner/kms-issuer/blob/main/charts/kms-issuer/Chart.yaml#L18 we should have the tests passing as well