Repository navigation
🌐Deploying external-DNS݁ - #230
Merged
Merged
Conversation
Contributor
|
This requires #234 to be merged before this can be merged. |
clee231
force-pushed
the
umapyoi-eDNS
branch
from
November 25, 2026 21:09
8786338 to
dabd888
Compare
Closed
This was referenced Nov 30, 2026
Closed
clee231
added a commit
that referenced
this pull request
Dec 1, 2026
This pull request introduces Kubernetes manifests to support Azure Workload Identity and OIDC discovery within the Umapyoi infrastructure. The changes add ArgoCD applications for managing these components and define all necessary resources for securely serving OIDC discovery documents in the cluster. # Azure Workload Identity Integration: - Adds a new ArgoCD `Application` (`azure-workload-identity-webhook`) to deploy the Azure Workload Identity webhook via Helm, including resource constraints and automated sync policies. - Creates the required `Namespace` (`azure-workload-identity-system`) for the webhook deployment. # OIDC Discovery Service: - Adds a new ArgoCD `Application` (`workload-identity-oidc`) to deploy OIDC discovery resources from the repository, with automated sync and server-side apply enabled. - Defines all Kubernetes resources needed to serve OIDC discovery documents: - Namespace, ServiceAccount, RBAC (ClusterRole/Binding) for publishing discovery docs. - NGINX Deployment (with initContainer to fetch discovery docs), Service, ConfigMap for NGINX config. - Shared Cilium Ingress behind the Umapyoi public tunnel for HTTPS at `k8s-oidc.umapyoi.acmuic.org`, using a cert-manager TLS secret. ## Umapyoi public DNS Terraform creates `umapyoi.acmuic.org`, delegates it from `acmuic.org`, and publishes A and AAAA aliases for `tunnel.umapyoi.acmuic.org` against the existing Azure gateway public IP resources. It points the `k8s-oidc` CNAME at that hostname so Entra can reach discovery before ExternalDNS starts. The ACM app cluster's ExternalDNS configuration excludes this delegated zone. When federation is enabled, the dedicated managed identity trusts `system:serviceaccount:external-dns:externaldns` from this issuer. It has Reader on `acm-general` for zone discovery and DNS Zone Contributor on the child zone. Apply this PR and configure the API server issuer, public JWKS URI, before deploying [#230](#230). The FRP client cutover is tracked in [#239](#239). Apply the DNS additions here before switching the client. The initial rollout stages the overlapping FRP trust roots and uses a namespaced ACME Issuer for discovery HTTPS. Azure token exchange is disabled pending the cluster signing-key maintenance. --------- Co-authored-by: Lam Nguyen <lamtnguyen989@gmail.com>
|
Terraform plan in azure/terraform/stacks/acm-general in the prod workspace Plan: 8 to add, 0 to change, 0 to destroy. Changes to Outputs.Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# azurerm_dns_a_record.umapyoi_tunnel will be created
+ resource "azurerm_dns_a_record" "umapyoi_tunnel" {
+ fqdn = (known after apply)
+ id = (known after apply)
+ name = "tunnel"
+ resource_group_name = "acm-general"
+ tags = {
+ "SIG" = "SIGSysAdmin"
+ "owner" = "clee231@acmuic.org"
+ "project" = "umapyoi"
}
+ target_resource_id = "************************************************************************************************************************************************"
+ ttl = 300
+ zone_name = "umapyoi.acmuic.org"
}
# azurerm_dns_aaaa_record.umapyoi_tunnel will be created
+ resource "azurerm_dns_aaaa_record" "umapyoi_tunnel" {
+ fqdn = (known after apply)
+ id = (known after apply)
+ name = "tunnel"
+ resource_group_name = "acm-general"
+ tags = {
+ "SIG" = "SIGSysAdmin"
+ "owner" = "clee231@acmuic.org"
+ "project" = "umapyoi"
}
+ target_resource_id = "************************************************************************************************************************************************"
+ ttl = 300
+ zone_name = "umapyoi.acmuic.org"
}
# azurerm_dns_cname_record.umapyoi_oidc will be created
+ resource "azurerm_dns_cname_record" "umapyoi_oidc" {
+ fqdn = (known after apply)
+ id = (known after apply)
+ name = "k8s-oidc"
+ record = "tunnel.umapyoi.acmuic.org"
+ resource_group_name = "acm-general"
+ tags = {
+ "SIG" = "SIGSysAdmin"
+ "owner" = "clee231@acmuic.org"
+ "project" = "umapyoi"
}
+ ttl = 300
+ zone_name = "umapyoi.acmuic.org"
}
# azurerm_dns_ns_record.umapyoi will be created
+ resource "azurerm_dns_ns_record" "umapyoi" {
+ fqdn = (known after apply)
+ id = (known after apply)
+ name = "umapyoi"
+ records = (known after apply)
+ resource_group_name = "acm-general"
+ tags = {
+ "SIG" = "SIGSysAdmin"
+ "owner" = "clee231@acmuic.org"
+ "project" = "umapyoi"
}
+ ttl = 300
+ zone_name = "acmuic.org"
}
# azurerm_dns_zone.umapyoi will be created
+ resource "azurerm_dns_zone" "umapyoi" {
+ id = (known after apply)
+ max_number_of_record_sets = (known after apply)
+ name = "umapyoi.acmuic.org"
+ name_servers = (known after apply)
+ number_of_record_sets = (known after apply)
+ resource_group_name = "acm-general"
+ tags = {
+ "SIG" = "SIGSysAdmin"
+ "owner" = "clee231@acmuic.org"
+ "project" = "umapyoi"
}
+ soa_record (known after apply)
}
# azurerm_role_assignment.umapyoi_externaldns_contributor will be created
+ resource "azurerm_role_assignment" "umapyoi_externaldns_contributor" {
+ id = (known after apply)
+ name = (known after apply)
+ principal_id = (known after apply)
+ principal_type = "ServicePrincipal"
+ role_definition_id = (known after apply)
+ role_definition_name = "DNS Zone Contributor"
+ scope = (known after apply)
+ skip_service_principal_aad_check = (known after apply)
}
# azurerm_role_assignment.umapyoi_externaldns_reader will be created
+ resource "azurerm_role_assignment" "umapyoi_externaldns_reader" {
+ id = (known after apply)
+ name = (known after apply)
+ principal_id = (known after apply)
+ principal_type = "ServicePrincipal"
+ role_definition_id = (known after apply)
+ role_definition_name = "Reader"
+ scope = "/subscriptions/2f98793b-7e2f-4f03-ac5b-7b2ec934dcd7/resourceGroups/acm-general"
+ skip_service_principal_aad_check = (known after apply)
}
# azurerm_user_assigned_identity.umapyoi_externaldns will be created
+ resource "azurerm_user_assigned_identity" "umapyoi_externaldns" {
+ client_id = (known after apply)
+ id = (known after apply)
+ location = "northcentralus"
+ name = "umapyoi-externaldns"
+ principal_id = (known after apply)
+ resource_group_name = "acm-general"
+ tags = {
+ "SIG" = "SIGSysAdmin"
+ "owner" = "clee231@acmuic.org"
+ "project" = "umapyoi"
}
+ tenant_id = (known after apply)
}
Plan: 8 to add, 0 to change, 0 to destroy.
Changes to Outputs:
+ umapyoi_externaldns_client_id = (known after apply)✅ Plan applied in Terraform Apply on Azure #69 Outputsazurerm_dns_zone_acm_uic = {
id = "/subscriptions/2f98793b-7e2f-4f03-ac5b-7b2ec934dcd7/resourceGroups/acm-general/providers/Microsoft.Network/dnsZones/acmuic.org"
max_number_of_record_sets = 10000
name = "acmuic.org"
name_servers = [
"ns1-06.azure-dns.com.",
"ns2-06.azure-dns.net.",
"ns3-06.azure-dns.org.",
"ns4-06.azure-dns.info.",
]
number_of_record_sets = 85
resource_group_name = "acm-general"
tags = {}
timeouts = null
}
default_resource_group = "acm-general"
externaldns_sp_clientid = "f995b4bc-00a0-4912-9a1a-da9f74407cb8"
externaldns_sp_keyid = "4851f036-2284-446d-80b5-cd53d66bdb54"
externaldns_sp_password = (sensitive value)
pfsense_service_principal_id = "/servicePrincipals/732cd17c-42d8-4463-be7f-ca627b6eee87"
pfsense_service_principal_password = (sensitive value)
subscription_id = "2f98793b-7e2f-4f03-ac5b-7b2ec934dcd7"
tenant_id = "cad5e02f-bae4-42d6-a06e-4377dd3e386f"
umapyoi_externaldns_client_id = "6af90cb0-e759-4346-a799-f5fdadffc9d8" |
|
Terraform plan in azure/terraform/stacks/sysadmin-demo in the prod workspace No changes. Your infrastructure matches the configuration.✅ Plan applied in Terraform Apply on Azure #69 |
clee231
added a commit
that referenced
this pull request
Dec 1, 2026
Move the Umapyoi FRP client to `tunnel.umapyoi.acmuic.org`. The client uses this name for both its control connection and the TLS server name. The gateway VM and public addresses stay in service throughout the rename. ## Before merging - Apply #234 and confirm the new A and AAAA records resolve to the gateway's existing addresses. #230 reserves this name in ExternalDNS and updates the application CNAME example. - The live TCP 7000 listener now presents the rotated certificate for both hostnames. The existing client token was preserved and both FRP proxies reconnected using the overlapping trust bundle. Merging triggers the Argo CD client rollout with the final CA bundle. The Cilium chart explicitly configures ADS for the agent and Envoy, and the OIDC Ingress allows HTTP-01 challenges to reach cert-manager. Keep the old DNS records until both FRP proxies reconnect, public application traffic passes, and other consumers have migrated. The [cutover and rollback instructions](https://github.com/acm-uic/IaC/blob/codex/umapyoi-tunnel-hostname/azure/terraform/stacks/frp-gateway/OPERATIONS.md#move-the-tunnel-hostname) include the final parent-zone cleanup. ## Verification Kustomize and KubeLinter passed for the client. The isolated FRP 0.72.0 smoke test passed with the new tunnel hostname for IPv4 and IPv6 HTTP/HTTPS and after client and server restarts. OpenTofu formatting and validation passed for the gateway stack.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Scaffold the deployment of
external-dnsThe Umapyoi controller creates and updates records in
umapyoi.acmuic.orgwith a cluster-specific TXT owner ID. Terraform owns the OIDC issuer record and the A/AAAA records fortunnel.umapyoi.acmuic.org. Both names are excluded from reconciliation. The Azure ConfigMap is in the controller'sexternal-dnsnamespace.Merge and apply #234 first. Before the first Argo CD sync, verify the public issuer and bind the
externaldnsservice account to the new managed identity's Azure-assigned client ID. The rollout instructions include the commands.The initial rollout uses zero controller replicas pending the cluster signing-key maintenance and activation of the Azure federated credential.