-
Notifications
You must be signed in to change notification settings - Fork 116
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 dependsOn for YAML ConfigFile/ConfigGroup #1833
Comments
This issue is fixed with the new "v2" implementations. It is now possible to directly depend on a |
I am encountering a TypeError when attempting to specify multiple dependencies in my Pulumi Python script. The issue arises when I add both a Helm chart and a service account as dependencies to a ConfigFile. Below is the code snippet and the corresponding errors: from pulumi_kubernetes.yaml.v2 import ConfigFile
from pulumi_kubernetes.helm.v3 import Chart, ChartOpts, FetchOpts
external_secrets_chart = Chart(
"external-secrets",
ChartOpts(
chart="external-secrets",
version="0.9.17",
namespace=eso_namespace.metadata.apply(lambda meta: meta.name),
values={
"installCRDs": True,
"webhook": {"port": 9443},
},
fetch_opts=FetchOpts(
repo="https://charts.external-secrets.io"
)
),
opts=pulumi.ResourceOptions(provider=k8s_provider)
)
service_account = ServiceAccount('sa',
metadata={
'name': 'sa',
'namespace': another_namespace.metadata.apply(lambda meta: meta.name),
'annotations': {
'eks.amazonaws.com/role-arn': role.arn
}
},
opts=pulumi.ResourceOptions(provider=k8s_provider))
# ConfigFile for the AWS secret store with multiple dependencies
secret_store = ConfigFile('aws-secret-store',
file='secret-store.yaml',
opts=pulumi.ResourceOptions(provider=k8s_provider,
depends_on=[external_secrets_chart.ready, service_account])
)
external_secrets = ConfigFile('external-secrets',
file='external-secrets.yaml',
opts=pulumi.ResourceOptions(provider=k8s_provider, depends_on=[secret_store])) Error:
Additional Tests and Errors1. Single Dependency (No Error, But Does Not Ensure Full Readiness of the Chart): secret_store = ConfigFile('aws-secret-store',
file='secret-store.yaml',
opts=pulumi.ResourceOptions(provider=k8s_provider,
depends_on=external_secrets_chart.ready)
) 2. With depends_on adjusted to include direct resource references (Fails): secret_store = ConfigFile('aws-secret-store',
file='eks/external_secrets/secret-store.yaml',
opts=pulumi.ResourceOptions(provider=k8s_provider,
depends_on=[external_secrets_chart, service_account])
) Error:
3. Using resources attribute (Fails): secret_store = ConfigFile('aws-secret-store',
file='eks/external_secrets/secret-store.yaml',
opts=pulumi.ResourceOptions(provider=k8s_provider,
depends_on=[external_secrets_chart.resources, service_account])
) Error:
I need to ensure that the script waits for both the Helm chart and the service account. Could someone assist in resolving this issue? |
@Haknt can you please create a new Github issue for your problem? |
@Haknt please try the "v4" version of |
Hello!
Issue details
The same underlying problem from #861 also affects our YAML support. Longer term, we intend to fix the ComponentResource dependencies, but for now, we may want to add a Ready parameter like we did for the Helm.Chart resource.
See also: #1773
Affected area/feature
The text was updated successfully, but these errors were encountered: