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

Add Flink Operator Bakery #21

Merged
merged 44 commits into from
Sep 22, 2022
Merged

Add Flink Operator Bakery #21

merged 44 commits into from
Sep 22, 2022

Conversation

yuvipanda
Copy link
Collaborator

@yuvipanda yuvipanda commented Sep 1, 2022

This needs to:

  • Create a Flink cluster by setting up a CRD to a kubernetes
    cluster, as that is where the container image used for
    execution is specified
  • Use kubectl port-forward to proxy to the flink cluster,
    so we can actually talk to it
  • Figure out how to cleanup the port-forward once it's done
  • Validate that kubectl is installed
  • Add tests

This uses https://github.com/apache/flink-kubernetes-operator,
as that is the most actively developed, community governed
operator.

Ref #19

@yuvipanda yuvipanda changed the title Add very basic flink runner Add very basic flink bakery Sep 2, 2022
@yuvipanda yuvipanda changed the title Add very basic flink bakery Add very basic Flink Operator Bakery Sep 2, 2022
@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2022

Codecov Report

Merging #21 (8e85229) into main (d4ba504) will decrease coverage by 12.43%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##             main      #21       +/-   ##
===========================================
- Coverage   98.51%   86.08%   -12.44%     
===========================================
  Files          11       12        +1     
  Lines         270      309       +39     
===========================================
  Hits          266      266               
- Misses          4       43       +39     
Impacted Files Coverage Δ
pangeo_forge_runner/bakery/flink.py 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

This needs to:

- Create a Flink cluster by setting up a CRD to a kubernetes
  cluster, as that is where the container image used for
  execution is specified
- Use `kubectl port-forward` to proxy to the flink cluster,
  so we can actually talk to it

This uses https://github.com/apache/flink-kubernetes-operator,
as that is the most actively developed, community governed
operator.

Ref #19
It doesn't just work with *any* Flink cluster, but
sets up one Flink cluster per job
Hopefully this can be reached both by whatever is in
the k8s cluster as well as code running locally
You can't depend on a non-session fixture in a session
fixture. Local IP isn't gonna change per test anyway
Without this, the 'status' field of the CRD is just not
populated at all and kubectl wait fully fails
So it doesn't actually try to retrieve 'job_id'. This is
gross, and should be fixed
There was an explicit message about kubectl not working
due to socat not being found
Could be the reason this doesn't run on GHA
Maybe this is what is needed?
Otherwise, flinkoperator errors
@codecov
Copy link

codecov bot commented Sep 22, 2022

Codecov Report

Merging #21 (8b90539) into main (36380ff) will decrease coverage by 0.42%.
The diff coverage is 95.55%.

@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
- Coverage   98.51%   98.09%   -0.43%     
==========================================
  Files          11       12       +1     
  Lines         270      315      +45     
==========================================
+ Hits          266      309      +43     
- Misses          4        6       +2     
Impacted Files Coverage Δ
pangeo_forge_runner/bakery/flink.py 95.55% <95.55%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@yuvipanda
Copy link
Collaborator Author

image

Unfortunately the coverage drop is minor, and for testing the failure modes when kubectl / gcloud isn't present. I'm just going to ignore that and merge, as projeect codecov is only down by -0.43%.

@yuvipanda yuvipanda changed the title Add very basic Flink Operator Bakery Add Flink Operator Bakery Sep 22, 2022
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.

2 participants