https://pulumi.com logo
#kubernetes
Title
# kubernetes
m

microscopic-arm-19649

08/11/2020, 12:10 PM
Q: Hey can some one clarify what is the impact of using k8s.yaml.ConfigGroup instead of using the pulumi API to declare the K8s resources?
b

bright-policeman-55860

08/11/2020, 1:39 PM
It will just transform that YAML into resources, so the end result will be the same
Here's an example of that with a single YAML file that contains multiple documents:
g

gorgeous-egg-16927

08/11/2020, 2:57 PM
Both approaches will create the same resources, but there are several advantages to using the API directly: 1. You have more control over resource ordering 2. It’s easier to access resource values 3. It’s easier to refactor into components to abstract away details as needed
m

microscopic-arm-19649

08/11/2020, 9:54 PM
Thanks for your feedback. Looks the approach with yaml.ConfigGroup helps me with this issue https://github.com/pulumi/pulumi-kubernetes/issues/1242 Looks the pulumi system to control the PVC resource keeps waiting for PVC to be ready. but for the PVC to be ready needs the deployment resource to be deployed
g

gorgeous-egg-16927

08/11/2020, 10:18 PM
Ah, thanks for the update. You should also be able to work around this issue by setting the
<http://pulumi.com/skipAwait|pulumi.com/skipAwait>
annotation on the PVC. We occasionally run into circular dependencies like this, and that annotation tells Pulumi not to wait for it. https://www.pulumi.com/blog/improving-kubernetes-management-with-pulumis-await-logic/#new-annotations-to-customize-kubernetes-await-logic
👍 1
m

microscopic-arm-19649

08/11/2020, 10:55 PM
Thanks alot for the tip, it works
🎉 1
4 Views