happy-soccer-64223
11/15/2020, 9:09 PMdeployment, err := MyCustomGen(name)
err = MyCustomDeploymentPatch(deployment)
I might be missing something bu i don't see how it's feasible with the pulumi-sdk. My question basically is how can we do two-pass modification on any object.billowy-army-68599
11/15/2020, 10:54 PMhappy-soccer-64223
11/16/2020, 12:19 AMbillowy-army-68599
11/16/2020, 12:19 AMhappy-soccer-64223
11/16/2020, 12:20 AM&appsv1.DeploymentArgs{
Metadata: metav1.ObjectMetaArgs{
Annotations: annotations,
Namespace: pulumi.String(namespace),
Name: pulumi.String(app.Name),
},
Spec: appsv1.DeploymentSpecArgs{
Selector: &metav1.LabelSelectorArgs{
MatchLabels: labels,
},
Strategy: appsv1.DeploymentStrategyArgs{
RollingUpdate: appsv1.RollingUpdateDeploymentArgs{
MaxSurge: pulumi.String("35%"),
MaxUnavailable: pulumi.String("0%"),
},
},
Template: &corev1.PodTemplateSpecArgs{
Metadata: &metav1.ObjectMetaArgs{
Labels: labels,
},
Spec: &corev1.PodSpecArgs{
Containers: containers,
},
},
},
}
billowy-army-68599
11/16/2020, 12:25 AMlabels
(the variable) defined? MatchLabels
takes a StringMap
which should be iterablehappy-soccer-64223
11/16/2020, 12:28 AMpkg/mutations/deployment.go:117:8: d.Spec.Selector undefined (type "<http://github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/apps/v1|github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/apps/v1>".DeploymentSpecPtrInput has no field or method Selector
billowy-army-68599
11/16/2020, 12:31 AMhappy-soccer-64223
11/16/2020, 12:32 AM