gorgeous-lunch-7514
01/08/2024, 4:55 PMdry-keyboard-94795
01/08/2024, 5:39 PMdry-keyboard-94795
01/08/2024, 5:40 PMgorgeous-lunch-7514
01/08/2024, 5:42 PMteleport-kube-agent-updater
when I log the objects in transformations so I assume something else is happening under the hood that I can’t see
Apply failed with 1 conflict: conflict with "teleport-kube-agent-updater" using apps/v1: .spec.template.spec.containers[name="teleport"].image
dry-keyboard-94795
01/08/2024, 5:55 PMgorgeous-lunch-7514
01/08/2024, 5:57 PMdry-keyboard-94795
01/08/2024, 5:57 PMdry-keyboard-94795
01/08/2024, 5:57 PMdry-keyboard-94795
01/08/2024, 5:58 PMgorgeous-lunch-7514
01/08/2024, 5:58 PMgorgeous-lunch-7514
01/08/2024, 5:58 PMconst teleport = new k8s.helm.v3.Chart(
teleportAppName,
{
chart: "teleport-kube-agent",
version: "13.4.14",
namespace: config.clusterSvcsNamespaceName,
fetchOpts: {
repo: "<https://charts.releases.teleport.dev>",
},
values: {
roles: "kube,db",
authToken: "xxxx",
proxyAddr: "xxxxx.teleport.sh:443",
kubeClusterName: config.stackName,
labels: {
"teleport.internal/resource-id": "xxxxx",
},
enterprise: true,
updater: {
enabled: true,
releaseChannel: "stable/cloud",
},
highAvailability: {
replicaCount: 2,
podDisruptionBudget: {
enabled: true,
minAvailable: 1,
},
},
awsDatabases: [{
types: ["rds"],
regions: ["eu-west-2"],
tags: {
"*": "*",
},
}],
annotations: {
serviceAccount: {
"<http://eks.amazonaws.com/role-arn|eks.amazonaws.com/role-arn>": config.oidcProviderRoleArn,
},
},
},
transformations: [
(obj: any) => {
if (
(obj.type === "Deployment" && obj.metadata.name === "teleport-agent-updater") ||
(obj.kind === "StatefulSet" && obj.metadata.name === "teleport-agent")) {
console.log(`Ignoring changes to ${obj.type} ${obj.metadata.name}`);
return {
props: obj.props,
opts: pulumi.mergeOptions(obj.kind, { ignoreChanges: ['spec.template.spec.containers[*].image'] }),
};
}
console.log(obj);
return undefined;
},
],
},
{
provider: provider,
ignoreChanges: ["spec.template.spec.containers[*].image"],
}
);
gorgeous-lunch-7514
01/08/2024, 5:59 PMdry-keyboard-94795
01/08/2024, 6:00 PMobj.kind == 'Deployment'
, instead of .type
gorgeous-lunch-7514
01/08/2024, 6:00 PMtype
if I do transformations via the opts argdry-keyboard-94795
01/08/2024, 6:00 PMdry-keyboard-94795
01/08/2024, 6:01 PMopts
is the second parameter of the transformer, which you modifygorgeous-lunch-7514
01/08/2024, 6:04 PMdry-keyboard-94795
01/08/2024, 6:04 PMgorgeous-lunch-7514
01/08/2024, 6:06 PMgorgeous-lunch-7514
01/08/2024, 6:06 PM