https://pulumi.com logo
#python
Title
# python
n

numerous-eye-91601

08/15/2023, 4:33 PM
I'm trying to use the SecretPatch resource and getting an error after it applies for the first time. Curious if anyone knows how to implement it correctly?
Copy code
kubernetes:core/v1:SecretPatch (cluster-dev-argo-externaldns-secret-patch):
    error: error reading from server: EOF

  pulumi:pulumi:Stack (aws-eks-dev):
    panic: fatal: An assertion has failed: path: [stringData]  |  v: <nil>  | old: <nil>  |  oldInput: <nil>
    goroutine 610 [running]:
Copy code
SecretPatch(
    f"{self.name}-argo-externaldns-secret-patch",
    metadata={
        "name": f"{self.name}",
        "namespace": "argocd",
        "annotations": {
            "external-dns-sa-arn": iam_role.arn
        },
    },
    opts=pulumi.ResourceOptions(
        depends_on=[
            role_attach,
            argo_cluster_secret,
        ],
        provider=self.cluster_provider,
    ),
)
d

dry-keyboard-94795

08/15/2023, 5:05 PM
The usage looks correct. Have you enabled Server Side Apply?
n

numerous-eye-91601

08/15/2023, 5:35 PM
yeah I have that enabled on the k8s provider currently:
Copy code
self.cluster_provider = Provider(
            resource_name=name,
            kubeconfig=cluster.kubeconfig,
            opts=pulumi.ResourceOptions(depends_on=[cluster]),
            enable_server_side_apply=True,
        )
d

dry-keyboard-94795

08/15/2023, 5:36 PM
Not sure then. I've used it in the past to set string_data. Given it's mentioned in the error, what happens if you provide an empty dict?
n

numerous-eye-91601

08/15/2023, 5:43 PM
hm, that's a good suggestion. seems like it does clear that error! does seem like the labels are going to be deleted in the original secret though so need to figure that out now 🤔
d

dry-keyboard-94795

08/15/2023, 5:44 PM
Interesting, the labels should definitely not delete. Worth raising issues for both on github
n

numerous-eye-91601

08/15/2023, 5:49 PM
interestingly seems like it was just in the
pulumi up
details diff but the labels are still there. running it through again to verify the behavior but will make a ticket for the secret data issue. appreciate the help!