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

Support for TLS Functionality with Gateway API via Workload Identity #306

Open
wants to merge 53 commits into
base: main
Choose a base branch
from

Conversation

jaiveerk
Copy link
Collaborator

Description

This PR adds support for a managed TLS experience with the Gateway API via workload identity.

Fixes # (issue)
Feature # (details)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Unit tests. e2e tests will be added after DNS functionality has been merged.

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Is it a breaking change which will impact consuming tool(s)?

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@jaiveerk jaiveerk changed the title Support for TLS Functionality with Gateway API via Workload Identity [Draft] Support for TLS Functionality with Gateway API via Workload Identity Oct 28, 2024
@jaiveerk
Copy link
Collaborator Author

/ok-to-test sha=03d8910

@jaiveerk
Copy link
Collaborator Author

/ok-to-test sha=0474374

@jaiveerk
Copy link
Collaborator Author

/ok-to-test sha=908e6c3


if listenerIsKvEnabled(listener) {
var clientId string
clientId, err = retrieveClientIdFromListener(ctx, g.client, req.Namespace, listener.TLS.Options)
Copy link
Collaborator

Choose a reason for hiding this comment

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

the client id should come from the SA.

We need some way of triggering a reconcile if the SA changes their client id too

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done via sa indexer

}

gateways := &gatewayv1.GatewayList{}
err := mgr.GetClient().List(context.TODO(), gateways, client.MatchingFields{serviceAccountIndexName: sa.Name})
Copy link
Collaborator

Choose a reason for hiding this comment

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

need to consider namespaces


saSet := map[string]struct{}{}

for _, listener := range gateway.Spec.Listeners {
Copy link
Collaborator

Choose a reason for hiding this comment

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

need to consider namespaces

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we consider namespaces when requeuing requests for Gateways - see line 60.

All we can do within this function is pull names from the Gateway resources - verification via the client naturally happens when we're grabbing the actual gateways tied to each serviceaccount

@OliverMKing
Copy link
Collaborator

/ok-to-test sha=2c034aa

@jaiveerk jaiveerk changed the title Support for TLS Functionality with Gateway API via Workload Identity [DRAFT] Support for TLS Functionality with Gateway API via Workload Identity Dec 11, 2024
@jaiveerk jaiveerk added the draft label Dec 11, 2024
@jaiveerk jaiveerk changed the title [DRAFT] Support for TLS Functionality with Gateway API via Workload Identity Support for TLS Functionality with Gateway API via Workload Identity Dec 11, 2024
@jaiveerk jaiveerk removed the draft label Dec 11, 2024
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