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

event grid namespaces infrastructure and access #86

Merged
merged 2 commits into from
May 16, 2024

Conversation

geoberle
Copy link
Collaborator

@geoberle geoberle commented Apr 30, 2024

this PR introduces a bicep templates to create the regional cloud infrastructure required by maestro and defined in SD-DDR-0024.

the general infrastructure part is managed in the maestro-infra.bicep module. it is included into the svc-cluster.bicep template as proposed in SD-DDR-0030.

  • create an eventgrid MQTT broker
  • creates a keyvault for the client certificates that are used for authentication
    • right now, only self-signed certificates are supported, which is fine for DEV
    • for int/prod OneCertV2 will be used
  • defines the basic authentication configuration for eventgrid (MQTT client groups, topic spaces, topic access templates)

authentication and authorization for a maestro server or consumer is managed via the maestro-eventgrid-access.bicep module. it is responsible for:

  • creating a client certificate for authn in key vault
  • grants key vault access to the certificate to a managed identity (used for CSI secret store to access the secret from the cluster)
  • registers an MQTT client in the EventGrid client registry and assigns proper access

the maestro-server.bicep module dresses up a Service Cluster for the installation of the Maestro server. it leverages maestro-eventgrid-access.bicep to define the broker access and places some manifests on the AKS cluster:

  • a Secret containing EventGrid details like the hostname
  • a CSI SecretProviderClass CR to access the client certificate for broker access

part of https://issues.redhat.com/browse/ARO-7244

What this PR does

introduce bicep config for maestro regional infrastructure.

Jira: https://issues.redhat.com/browse/ARO-7244

Special notes for your reviewer

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

  • PR: The PR description is expressive enough and will help future contributors
  • Code: Write code that humans can understand and Keep it simple
  • Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
  • Upgrade: Impact of this change on upgrade flows was considered and addressed if required
  • Deployment: The deployment process was considered and addressed if required
  • Testing: New code requires new unit tests.
  • Documentation: Is the documentation updated? Either in the doc located in focus area, in the README or in the code itself.
  • Customers: Is this change affecting customers? Is the release plan considered?

Copy link

github-actions bot commented May 7, 2024

Please rebase pull request.

@geoberle
Copy link
Collaborator Author

geoberle commented May 8, 2024

@microsoft-github-policy-service agree company="Red Hat"

@geoberle geoberle force-pushed the maestro-eventgrid branch from a4de6d6 to 0b85144 Compare May 8, 2024 11:48
Copy link

github-actions bot commented May 8, 2024

Please rebase pull request.

@geoberle geoberle marked this pull request as ready for review May 8, 2024 16:32
@geoberle geoberle force-pushed the maestro-eventgrid branch from 4170632 to 600a7b0 Compare May 8, 2024 16:36
@geoberle geoberle force-pushed the maestro-eventgrid branch from 96632dc to e19d68c Compare May 9, 2024 13:04
@geoberle geoberle changed the title [draft] setting up event grid namespaces infrastructure and access event grid namespaces infrastructure and access May 9, 2024
@geoberle geoberle force-pushed the maestro-eventgrid branch 4 times, most recently from 09e0f73 to 11c7d56 Compare May 16, 2024 12:36
this PR introduces a bicep templates to create the regional cloud infrastructure required by maestro and defined in [SD-DDR-0024](https://docs.google.com/document/d/1JUbv0Zco--SPpWH7pIsuzuKTUtq2S4WovAoPuAt5PPI/edit).

the general infrastructure part is managed in the `maestro-infra.bicep` module. it is included into the `svc-cluster.bicep` template as proposed in SD-DDR-0030.

* create an eventgrid MQTT broker
* creates a keyvault for the client certificates that are used for authentication
  * right now, only self-signed certificates are supported, which is fine for DEV
  * for int/prod OneCertV2 will be used
* defines the basic authentication configuration for eventgrid (MQTT client groups, topic spaces, topic access templates)

authentication and authorization for a maestro server or consumer is managed via the `maestro-eventgrid-access.bicep` module. it is responsible for:

* creating a client certificate for authn in key vault
* grants key vault access to the certificate to a managed identity (used for CSI secret store to access the secret from the cluster)
* registers an MQTT client in the EventGrid client registry and assigns proper access

the `maestro-server.bicep` module dresses up a Service Cluster for the installation of the Maestro server. it leverages `maestro-eventgrid-access.bicep` to define the broker access and places some manifests on the AKS cluster:

* a `Secret` containing EventGrid details like the hostname
* a CSI `SecretProviderClass` CR to access the client certificate for broker access

part of https://issues.redhat.com/browse/ARO-7244

Signed-off-by: Gerd Oberlechner <[email protected]>
@geoberle geoberle force-pushed the maestro-eventgrid branch from 11c7d56 to 83eeac6 Compare May 16, 2024 12:42
mjlshen
mjlshen previously approved these changes May 16, 2024
@@ -253,7 +253,7 @@ resource aksCluster 'Microsoft.ContainerService/managedClusters@2024-01-01' = {
enabled: true
config: {
enableSecretRotation: 'true'
rotationPollInterval: '24h'
rotationPollInterval: '5m'
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this an intentional change? The change makes sense to me, I don't know why it was 24h previously, but just want to make sure

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 can discuss around the value. i think the default is 2m

@mjlshen mjlshen merged commit 893f39e into Azure:main May 16, 2024
4 checks passed
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