https://pulumi.com logo
Title
f

famous-jelly-72366

06/05/2020, 2:54 PM
helm chart transformations can come in pretty handy, using it to get around apiVersion deprecation warnings when using cert-manager on k8s 1.18
👍 2
j

jolly-bear-34819

06/05/2020, 3:05 PM
I tried that but there is no option for "deleteBeforeReplace"
f

famous-jelly-72366

06/05/2020, 3:10 PM
ok, for me it just updated in place, FWIW: here is my xform:
(o: any) => {
  if (o.apiVersion) {
    const xforms: Record<string, string> = {
      "<http://rbac.authorization.k8s.io/v1beta1|rbac.authorization.k8s.io/v1beta1>":
        "<http://rbac.authorization.k8s.io/v1|rbac.authorization.k8s.io/v1>",
      "<http://apiextensions.k8s.io/v1beta1|apiextensions.k8s.io/v1beta1>": "<http://apiextensions.k8s.io/v1|apiextensions.k8s.io/v1>",
    };
    if (Object.keys(xforms).includes(o.apiVersion)) {
      o.apiVersion = xforms[o.apiVersion];
    }
  }
}
👍 1