-
Notifications
You must be signed in to change notification settings - Fork 727
feat: add support for certificate fetching via SDS ref secret #8745
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
Open
zirain
wants to merge
8
commits into
envoyproxy:main
Choose a base branch
from
zirain:sds-ref
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
686328d
feat: add support for certificate fetching and rotation via SDS ref s…
zirain 5c67cda
fix
zirain c1faf4d
fix review comments
zirain 01f79ab
fix lint
zirain d4d8430
add EnableSDSSecretRef in EnvoyGateway
zirain 1505c01
fix gen
zirain bbd5ef0
rename
zirain 352c946
Merge branch 'main' into sds-ref
zirain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,9 @@ import ( | |
| ) | ||
|
|
||
| const ( | ||
| // SDSSecretType is the type for secrets that reference SDS configuration | ||
| SDSSecretType = "gateway.envoyproxy.io/sds" | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we make this opt in at EnvoyGateway or EnvoyProxy level ? |
||
| // DefaultDeploymentReplicas is the default number of deployment replicas. | ||
| DefaultDeploymentReplicas = 1 | ||
| // DefaultDeploymentCPUResourceRequests for deployment cpu resource | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| envoyProxyForGatewayClass: | ||
| apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: EnvoyProxy | ||
| metadata: | ||
| namespace: envoy-gateway-system | ||
| name: test | ||
| spec: | ||
| backendTLS: | ||
| clientCertificateRef: | ||
| kind: Secret | ||
| name: sds-client-cert-default | ||
| alpnProtocols: | ||
| # without this, need to enforce mTLS with PeerAuthentication | ||
| - istio | ||
| gateways: | ||
| - apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: Gateway | ||
| metadata: | ||
| namespace: envoy-gateway | ||
| name: gateway-1 | ||
| spec: | ||
| gatewayClassName: envoy-gateway-class | ||
| listeners: | ||
| - name: http | ||
| protocol: HTTP | ||
| port: 80 | ||
| allowedRoutes: | ||
| namespaces: | ||
| from: All | ||
| backends: | ||
| - apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: Backend | ||
| metadata: | ||
| name: spire-uds | ||
| namespace: envoy-gateway-system | ||
| spec: | ||
| endpoints: | ||
| - unix: | ||
| path: /var/run/secrets/workload-spiffe-uds/socket | ||
| type: Endpoints | ||
| backendTLSPolicies: | ||
| - apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
| kind: BackendTLSPolicy | ||
| metadata: | ||
| name: policy-btls | ||
| namespace: default | ||
| spec: | ||
| targetRefs: | ||
| - kind: Service | ||
| name: service-1 | ||
| validation: | ||
| caCertificateRefs: | ||
| - name: sds-client-cert-rootca | ||
| kind: Secret | ||
| hostname: example.com | ||
| httpRoutes: | ||
| - apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| name: httproute-1 | ||
| namespace: default | ||
| spec: | ||
| parentRefs: | ||
| - namespace: envoy-gateway | ||
| name: gateway-1 | ||
| sectionName: http | ||
| rules: | ||
| - matches: | ||
| - path: | ||
| type: Exact | ||
| value: "/exact" | ||
| backendRefs: | ||
| - name: service-1 | ||
| port: 8080 | ||
| secrets: | ||
| - apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: sds-client-cert-default | ||
| namespace: envoy-gateway-system | ||
| type: gateway.envoyproxy.io/sds | ||
| data: | ||
| # /var/run/secrets/workload-spiffe-uds/socket | ||
| url: L3Zhci9ydW4vc2VjcmV0cy93b3JrbG9hZC1zcGlmZmUtdWRzL3NvY2tldA== | ||
| name: ZGVmYXVsdA== # base64 for "default" | ||
| - apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: sds-client-cert-rootca | ||
| namespace: default | ||
| type: gateway.envoyproxy.io/sds | ||
| data: | ||
| # /var/run/secrets/workload-spiffe-uds/socket | ||
| url: L3Zhci9ydW4vc2VjcmV0cy93b3JrbG9hZC1zcGlmZmUtdWRzL3NvY2tldA== | ||
| secretName: Uk9PVENB # base64 for "ROOTCA" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are gating the broader "fetching certificates from third-party SDS" feature, not just the specific "SDS secret type"?
It might makes sense to use a more general name like
EnableThirdPartySDShere.cc @arkodg