Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CRD creation with .status field #1481

Closed
lblackstone opened this issue Mar 2, 2021 · 4 comments · Fixed by #2183
Closed

Support CRD creation with .status field #1481

lblackstone opened this issue Mar 2, 2021 · 4 comments · Fixed by #2183
Assignees
Labels
kind/enhancement Improvements or new features language/python resolution/fixed This issue was fixed
Milestone

Comments

@lblackstone
Copy link
Member

lblackstone commented Mar 2, 2021

Some CRDs contain an erroneous .status field that cause an error when they are deployed by Pulumi. Although .status is not a valid input field, it would be better for us to ignore this input and allow the resource creation rather than simply returning an error. (kubectl deploys these CRDs, and ignores the status field)

The current error message looks something like this:

TypeError: __init__() got an unexpected keyword argument 'status'

Here's an example CRD with this issue: https://github.com/nginxinc/kubernetes-ingress/blob/f69bdc80b7269fe24c137ac82ff35a5b28377ec5/deployments/helm-chart/crds/k8s.nginx.org_globalconfigurations.yaml#L51-L56

@georgyo
Copy link

georgyo commented Apr 26, 2021

While investigating #1541, it seems that this only affects python. Neither the go or typescript interfaces care about the .status field.

@logileifs
Copy link

I'm running into this same issue when trying to install https://projectcontour.io/quickstart/contour.yaml with Pulumi.
It would be great if the status would be ignored to avoid a rather messy workaround 🙃

@logileifs
Copy link

This is also preventing me from installing Traefik helm chart.
Example code:

ingress = helm.Chart(
		"traefik",
		helm.ChartOpts(
			chart="traefik",
			values={"service": {"type": "NodePort"}},
			fetch_opts=helm.FetchOpts(
				repo="https://helm.traefik.io/traefik"
			)
		),
		pulumi.ResourceOptions(provider=k8s_provider)
	)

Produces error:

File "/Users/logi/.pyenv/versions/localenv/lib/python3.9/site-packages/pulumi_kubernetes/apiextensions/v1/CustomResourceDefinition.py", line 121, in __init__
        __self__._internal_init(resource_name, *args, **kwargs)
    TypeError: _internal_init() got an unexpected keyword argument 'status'
    error: an unhandled error occurred: Program exited with non-zero exit code: 1

@jancespivo
Copy link

Same for kubevela chart

kubevela = kubernetes.helm.v3.Chart(
    "kubevela",
    kubernetes.helm.v3.ChartOpts(
        chart="vela-core",
        fetch_opts=kubernetes.helm.v3.FetchOpts(
            repo="https://charts.kubevela.net/core",
        ),
    ),
    opts=pulumi.ResourceOptions(provider=gke_provider)
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features language/python resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants