ripe-dinner-40604
08/01/2019, 8:46 PMkubernetes:<http://rbac.authorization.k8s.io:ClusterRoleBinding|rbac.authorization.k8s.io:ClusterRoleBinding> (argo-binding):
error: Failed to check for changes in resource /argo-binding because of an error computing the JSON patch describing the resource changes: unrecognized type: string
Relevant code:
// Create resources for Argo from its YAML manifests
const argo = new k8s.yaml.ConfigFile("argo",
{
file: "<https://raw.githubusercontent.com/argoproj/argo/stable/manifests/install.yaml>",
transformations: [
(obj: any) => {
// Convert `argo` to the unique namespace generated above
if (obj.kind == "ClusterRoleBinding") {
obj.subjects[0].namespace = argoNamespace.apply(val => `${val.toString()}`)
console.log(obj)
}
}
],
},
{
providers: { "kubernetes": mainCluster.provider },
},
);
Debug output
{
apiVersion: '<http://rbac.authorization.k8s.io/v1|rbac.authorization.k8s.io/v1>',
kind: 'ClusterRoleBinding',
metadata: { name: 'argo-binding' },
roleRef: {
apiGroup: '<http://rbac.authorization.k8s.io|rbac.authorization.k8s.io>',
kind: 'ClusterRole',
name: 'argo-cluster-role'
},
subjects: [ { kind: 'ServiceAccount', name: 'argo', namespace: [OutputImpl] } ]
}
${val}
instead of toString yields the same errormicroscopic-florist-22719
ripe-dinner-40604
08/01/2019, 8:55 PMmicroscopic-florist-22719
gorgeous-egg-16927
08/02/2019, 3:14 AMripe-dinner-40604
08/02/2019, 9:18 PM