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

Flyte-core add support for ingressClassName in ingress #4805

Merged

Conversation

ddl-ebrown
Copy link
Contributor

@ddl-ebrown ddl-ebrown commented Jan 31, 2024

Tracking issue

https://github.com/flyteorg/flyte/issues/

Why are the changes needed?

What changes were proposed in this pull request?

How was this patch tested?

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Jan 31, 2024
@ddl-ebrown ddl-ebrown changed the title Add support for ingressClassName in ingress Flyte-core add support for ingressClassName in ingress Feb 1, 2024
Copy link
Contributor

@davidmirror-ops davidmirror-ops left a comment

Choose a reason for hiding this comment

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

Other than the key name, it LGTM

Thanks!

@@ -424,6 +424,8 @@ common:
# -- Specify your Secret (with sensitive data) or pseudo-manifest (without sensitive data). See https://github.com/godaddy/kubernetes-external-secrets
secretManifest: {}
ingress:
# --- Sets the ingressClassName
class:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer to keep this key name as ingressClassName. flyte-binary uses that structure too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You got it!

{{- end }}
{{- with .Values.common.ingress.separateGrpcIngressAnnotations }}
{{- toYaml . | nindent 4}}
{{- $annotations := .Values.common.ingress.annotations | deepCopy -}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice. Thank you!

Copy link

codecov bot commented Feb 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4223a83) 58.98% compared to head (bae6982) 59.12%.
Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4805      +/-   ##
==========================================
+ Coverage   58.98%   59.12%   +0.13%     
==========================================
  Files         644      644              
  Lines       55146    52789    -2357     
==========================================
- Hits        32529    31209    -1320     
+ Misses      20043    19006    -1037     
  Partials     2574     2574              
Flag Coverage Δ
unittests 58.50% <ø> (-0.49%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

 - ingressClassName field was added in k8s 1.18, and effectively
   replaces the unofficially supported annotation `ingress.class`

   https://kubernetes.io/docs/concepts/services-networking/ingress/#deprecated-annotation

Signed-off-by: ddl-ebrown <[email protected]>
 - It's possible to have no annotations set for the ingress, which ends
   up rendering an annotations:

   This can make some validators unhappy, so rewrite the rendering to
   only emit annotations: when the collection is not empty

Signed-off-by: ddl-ebrown <[email protected]>
@ddl-ebrown ddl-ebrown force-pushed the add-ingressClassName-support branch from 8b526d8 to bae6982 Compare February 6, 2024 03:33
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 8, 2024
@davidmirror-ops davidmirror-ops merged commit 0bc0a89 into flyteorg:master Feb 9, 2024
51 checks passed
katrogan pushed a commit that referenced this pull request Feb 20, 2024
* Add support for ingressClassName in ingress

 - ingressClassName field was added in k8s 1.18, and effectively
   replaces the unofficially supported annotation `ingress.class`

   https://kubernetes.io/docs/concepts/services-networking/ingress/#deprecated-annotation

Signed-off-by: ddl-ebrown <[email protected]>

* Flyte-core don't render empty ingress annotations

 - It's possible to have no annotations set for the ingress, which ends
   up rendering an annotations:

   This can make some validators unhappy, so rewrite the rendering to
   only emit annotations: when the collection is not empty

Signed-off-by: ddl-ebrown <[email protected]>

---------

Signed-off-by: ddl-ebrown <[email protected]>
Signed-off-by: Katrina Rogan <[email protected]>
yubofredwang pushed a commit to yubofredwang/flyte that referenced this pull request Mar 26, 2024
* Add support for ingressClassName in ingress

 - ingressClassName field was added in k8s 1.18, and effectively
   replaces the unofficially supported annotation `ingress.class`

   https://kubernetes.io/docs/concepts/services-networking/ingress/#deprecated-annotation

Signed-off-by: ddl-ebrown <[email protected]>

* Flyte-core don't render empty ingress annotations

 - It's possible to have no annotations set for the ingress, which ends
   up rendering an annotations:

   This can make some validators unhappy, so rewrite the rendering to
   only emit annotations: when the collection is not empty

Signed-off-by: ddl-ebrown <[email protected]>

---------

Signed-off-by: ddl-ebrown <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants