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

[Apache Airflow addon] Dependency added for EFS #719

Merged
merged 3 commits into from
Jun 13, 2023

Conversation

youngjeong46
Copy link
Collaborator

Issue #, if available:

Description of changes: Dependency for EFS Kubernetes resources (storageclass and PVC) added so that they are provisioned after namespace creation.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@youngjeong46 youngjeong46 changed the title Dependency added for EFS [Apache Airflow addon] Dependency added for EFS Jun 9, 2023
Copy link
Collaborator

@shapirov103 shapirov103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@youngjeong46 please see my comment

@@ -217,6 +217,8 @@ function populateValues(clusterInfo: ClusterInfo, ns: KubernetesManifest, helmOp
overwrite: true,
});

efsResources.node.addDependency(ns);
Copy link
Collaborator

@shapirov103 shapirov103 Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

efs storage class is not a namespace resource - created at the global. So adding dependency to the namespace is irrelevant for it but it is revelant for the PVC.

The error that we saw was: either chart or PVC or both are created before the storage class is created.

We need the following dependencies:

efs storage class depends efs csi driver - it is a global resource so no dependencies on ns, pvc, chart
PVC depends on storage class and ns
chart depends on PVC/storage class/ns

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I interpreting this correctly:

For the chart, we would only need to add Dependency for the PVC - if I implement PVC node dependency on sc and ns, by transitivity, sc and ns would provision before the chart.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that seems right. The storage class may require dependency on the EFS CSI driver most likely. I am curious if CSI driver dependency is critical for this case, this will have to be tested.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to add CSI driver as dependency? addons are Construct promises, which do not use IDependable interface.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit confused with this question since we had this conversation in the past, I attribute it to the case of Mondays. I believe this is your code based on the discussion we had.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Case of the Mondays it is.

shapirov103
shapirov103 previously approved these changes Jun 12, 2023
Copy link
Collaborator

@shapirov103 shapirov103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it, awesome stuff! Will run e2e, hope everything checks out.

@shapirov103
Copy link
Collaborator

/do-e2e-tests

Copy link

@aws-ia-ci aws-ia-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

end to end tests passed

@shapirov103 shapirov103 merged commit 16a0812 into main Jun 13, 2023
@shapirov103 shapirov103 deleted the bugfix/apache-airflow branch June 28, 2024 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants