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

Replace init-certs webhook initContainer with Helm template #5558

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ddl-ebrown
Copy link
Contributor

@ddl-ebrown ddl-ebrown commented Jul 12, 2024

Tracking issue

Why are the changes needed?

Removes unnecessary webhook initContainer

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

@ddl-ebrown ddl-ebrown force-pushed the replace-webhook-cert-with-Helm-functions branch from ba968ac to 0ca2557 Compare July 12, 2024 04:25
@ddl-ebrown ddl-ebrown changed the title Replace init-certs webhook job with Helm template Replace init-certs webhook initContainer with Helm template Jul 12, 2024
@ddl-ebrown ddl-ebrown force-pushed the replace-webhook-cert-with-Helm-functions branch from 0ca2557 to 3fd4ed9 Compare July 12, 2024 04:28
Copy link

codecov bot commented Jul 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.98%. Comparing base (81afb76) to head (7070739).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5558   +/-   ##
=======================================
  Coverage   60.98%   60.98%           
=======================================
  Files         796      796           
  Lines       51647    51647           
=======================================
  Hits        31498    31498           
  Misses      17249    17249           
  Partials     2900     2900           
Flag Coverage Δ
unittests-datacatalog 69.31% <ø> (ø)
unittests-flyteadmin 58.73% <ø> (ø)
unittests-flytecopilot 17.79% <ø> (ø)
unittests-flytectl 67.44% <ø> (ø)
unittests-flyteidl 79.06% <ø> (ø)
unittests-flyteplugins 61.85% <ø> (ø)
unittests-flytepropeller 57.42% <ø> (ø)
unittests-flytestdlib 65.68% <ø> (ø)

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.

@ddl-ebrown ddl-ebrown force-pushed the replace-webhook-cert-with-Helm-functions branch from 3fd4ed9 to 74a5b67 Compare July 12, 2024 05:30
@@ -56,7 +56,8 @@ ${GOPATH:-~/go}/bin/helm-docs -c ${DIR}/../charts/

# This section is used by GitHub workflow to ensure that the generation step was run
if [ -n "$DELTA_CHECK" ]; then
DIRTY=$(git status --porcelain)
# find only deleted or removed lines, not replaced values
DIRTY=$(git diff --word-diff | grep "^[{\[]")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The CI check needs to be updated to understand that some values may change when regenerating Helm charts

An alternative approach would be to add values.yaml entries and plumb them through -- but that feels a bit overkill

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like a more fine-grained comparison. What do you think @eapolinario?

 - Replicates the functionality from the webhook init-certs cli command
   from Flyte:

   https://github.com/flyteorg/flyte/blob/master/flytepropeller/pkg/webhook/init_cert.go

   This produces a ca.crt, tls.crt and tls.key value needed for the
   webhook, rather than needing to create a container that needs to have
   network and Kubernetes access.

 - Uses the Helm lookup helper to prevent regenerating on upgrades

 - Update CI check to only fail when lines are deleted or removed from
   the generated Helm output, not when values are modified

Signed-off-by: ddl-ebrown <[email protected]>
@ddl-ebrown ddl-ebrown force-pushed the replace-webhook-cert-with-Helm-functions branch from 74a5b67 to 7070739 Compare July 12, 2024 17:51
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.

I just reproduced this and can confirm that not only the secret is created but propeller works correctly for a wf execution.

Thanks so much, I think it helps with lower startup times for the backend.

@ddl-ebrown
Copy link
Contributor Author

I just reproduced this and can confirm that not only the secret is created but propeller works correctly for a wf execution.

Thanks so much, I think it helps with lower startup times for the backend.

Great - thanks for double checking things on your end!

We've been using this patch in our automated / CI deployments since I put up this PR and things are also working great on our side as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Approved yet unmerged PRs
Development

Successfully merging this pull request may close these issues.

2 participants