Skip to content

docs(06-aruba): lead §7.4 with four-MR composition (Database/DBaaSUser/DatabaseGrant) - #198

Merged
ricCap merged 6 commits into
mainfrom
docs/aruba-dbaas-provider-gaps
May 18, 2026
Merged

ricCap merged 6 commits into
mainfrom
docs/aruba-dbaas-provider-gaps

Conversation

@ricCap

@ricCap ricCap commented May 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Today's workshop run surfaced that module 06 §7.4 didn't match reality. The original text told participants:

Crossplane has written the connection details to a Secret named <pair-id>-mysql-conn in default. Inspect what keys are inside…

…with expected [endpoint, password, port, username]. The Pod example then envFroms that Secret straight into a mysql client.

None of that works today: provider-arubacloud's upjet config doesn't yet publish connection details for DBaaS, and the upstream Terraform provider's arubacloud_dbaas resource doesn't return endpoint/port/admin_* from create either. The Secret is created but empty.

After debugging end-to-end against the workshop's Aruba project, the Crossplane-native four-MR composition does work: DBaaS + Database + DBaaSUser + DatabaseGrant. Only one piece of data isn't auto-discoverable through MRs — the DBaaS's private endpoint — which still requires a console click on the Networking tab.

What this PR changes

§7.4 is rewritten to lead with the Crossplane-native composition:

  1. Capture the DBaaS Aruba ID (and projectId from the workshop ConfigMap) once.
  2. Apply Database + DBaaSUser together, with the user password supplied via a Secret you create (Aruba enforces password rules server-side).
  3. Apply DatabaseGrant after both are Ready, referencing .status.atProvider.id from each.
  4. Read the DBaaS endpoint from Aruba console's Networking tab — the one remaining manual hop, called out via an "Under the hood" callout pointing at the provider gap.
  5. Build the connection Secret with endpoint + 3306 + the names/password from steps 2–3.
  6. Run the existing mysql-client ping Pod — the Pod itself is unchanged, with one fix ($database appended to the mysql invocation so it actually USEs the schema).

§7.5 is updated to delete the new MRs in reverse-dependency order (grant → user → database → dbaas) so each child gets a clean Aruba prune before its parent disappears.

§7.6 "Go deeper" is trimmed: the runnable YAML it used to carry is now the main path, so it's replaced with a forward-looking pointer to wrapping the four MRs in an AppDatabase XR once the upstream provider grows dbaasIdRef / databaseRef / userIdRef cross-resource references and starts publishing the endpoint to the connection Secret.

Time-box bumped 7m → 12m for the extra MRs + waits.

Italian translation

Same edits mirrored to docs/i18n/it/.../07-provider-arubacloud.mdx, with translation_source_commit bumped to the latest English commit. task docs:i18n:check should pass.

Follow-up issues (out of scope for this PR)

Against Arubacloud/terraform-provider-arubacloud and ricCap/provider-arubacloud:

  1. Expose endpoint / port / admin_username / admin_password from arubacloud_dbaas create so the DBaaS connection Secret gets populated automatically.
  2. Add AdditionalConnectionDetailsFn mappings on dbaas / database / dbaasuser upjet configs once the upstream attributes exist.
  3. Add *Ref cross-resource references on Database / DBaaSUser / DatabaseGrant so dbaasId / database / userId become declarative pointers instead of literal-ID paste.
  4. Retry on Technical (transport-level, EOF) errors, not just Transient. DBaaSUser / DatabaseGrant Create should also wrap in CreateWithTransientRetry like Database does.

Once 1+2+3 land, §7.4 collapses to a single AppDatabase XR apply (§7.6 already foreshadows this).

Test plan

  • Workshop owner follows §7.4 step-by-step against a real DBaaS and reaches ok / 1 from kubectl logs <pod>.
  • task docs:i18n:check passes.
  • Docs site renders without broken MDX (the "Under the hood" :::note matches existing usage elsewhere).
  • task verify:pair PAIR=<pair-id> after §7.5 cleanup shows no leftover Database / DBaaSUser / DatabaseGrant.

ricCap added 6 commits May 18, 2026 15:18
The current §7.4 tells participants to inspect the connection
Secret Crossplane "has written" for them, with expected keys
`endpoint` / `port` / `username` / `password`. None of that is
true today: `provider-arubacloud` doesn't yet publish DBaaS
connection details (the underlying Terraform provider's
`arubacloud_dbaas` resource doesn't return those attributes from
the create call, so there's nothing for upjet to publish). The
Secret is created but stays empty, and the example Pod fails
with empty `$port`.

Rewrite §7.4 to match reality: three small manual hops between
the MR being Ready and the SELECT 1 Pod admitting:
1. read the private endpoint from Aruba's console Networking tab,
2. create a database + user via the console "Users and database"
   tab (faster than the four-MR alternative tonight),
3. build the connection Secret by hand with those values.

Step 4 (the mysql-client Pod) is unchanged once steps 1-3 produce
a populated Secret.

Add a "Under the hood" callout naming the provider gap honestly
and pointing at the future state (provider publishes connection
details, MR types support cross-resource refs → section collapses
back to the one-step version).

Time-box bumped 7m → 10m.

Assisted-by: claude-code/claude-opus-4-7
Signed-off-by: Riccardo Capraro <capraroriccardo@gmail.com>
Translation of the §7.4 rewrite from 680af4e: three-step manual
endpoint + user + Secret flow, plus the "Sotto il cofano" callout
naming the provider gap.

Translation_source_commit bumped to 680af4e (the English commit
that introduced this content).

Assisted-by: claude-code/claude-opus-4-7
Signed-off-by: Riccardo Capraro <capraroriccardo@gmail.com>
Replace the hand-wavy "Compose a least-privilege MySQL stack"
bullet in §7.6 "Go deeper" with a working three-MR sequence:
Database + DBaaSUser + DatabaseGrant against the same DBaaS that
§7.3 provisioned. Validated end-to-end against the workshop's
Aruba project today.

Includes the two upstream-fixable caveats so participants who
hit them aren't surprised:
1. No `*Ref` cross-resource references yet — `dbaasId` / `database`
   / `userId` are literal Aruba IDs pasted between apply steps.
2. Aruba password rules enforced server-side — first rejection
   usually fixable by upper + lower + digit + a single special.

The XR/AppDatabase paragraph at the end stays as the long-term
target once both caveats are fixed.

Assisted-by: claude-code/claude-opus-4-7
Signed-off-by: Riccardo Capraro <capraroriccardo@gmail.com>
Translation of the expanded "Per approfondire" follow-up: the
runnable Database + DBaaSUser + DatabaseGrant sequence plus the
two caveats (no *Ref cross-references yet, password rules
enforced server-side).

translation_source_commit bumped to match the English commit.

Assisted-by: claude-code/claude-opus-4-7
Signed-off-by: Riccardo Capraro <capraroriccardo@gmail.com>
Earlier in this PR I'd written §7.4 around three manual console
steps (look up endpoint, create database, create user). After
validating end-to-end against the workshop's Aruba project we
now know the three Crossplane-native MRs (Database, DBaaSUser,
DatabaseGrant) work fine — so the participant-facing flow can
lead with them, not bury them in a "Go deeper" follow-up.

Rewrite §7.4 around the composition:

1. Capture the DBaaS Aruba ID + projectId once.
2. Apply Database + DBaaSUser together (password from a Secret
   the user creates; Aruba enforces password rules server-side).
3. Apply DatabaseGrant after the two are Ready, referencing
   their `.status.atProvider.id` fields.
4. Read the endpoint from Aruba's console Networking tab —
   the one remaining manual hop, because the provider doesn't
   yet publish endpoint/port to the DBaaS MR's connection Secret.
5. Build the connection Secret.
6. Run the existing mysql-client ping Pod (unchanged, plus
   "$database" appended to the mysql command so the connection
   actually selects the schema we just created).

Update §7.5 to delete the new MRs in reverse-dependency order
(grant → user → database → dbaas) so each gets a clean Aruba
prune before its parent disappears.

Trim §7.6 "Go deeper" — the duplicated three-MR YAML is now
the main path, so replace that bullet with a forward-looking
pointer to wrapping all four MRs in an `AppDatabase` XR once
the upstream `*Ref` cross-resource references and connection-
detail publishing land.

Time-box §7.4 bumped 10m → 12m to reflect three additional
kubectl applies + the two `kubectl wait`s.

Assisted-by: claude-code/claude-opus-4-7
Signed-off-by: Riccardo Capraro <capraroriccardo@gmail.com>
Translation of the §7.4 / §7.5 / §7.6 rewrites that move the
Crossplane-native Database + DBaaSUser + DatabaseGrant
composition into the headline workshop path (instead of a
"Per approfondire" follow-up).

translation_source_commit bumped to match the English commit.

Assisted-by: claude-code/claude-opus-4-7
Signed-off-by: Riccardo Capraro <capraroriccardo@gmail.com>
@ricCap ricCap changed the title docs(06-aruba): document manual endpoint + user setup in §7.4 docs(06-aruba): lead §7.4 with four-MR composition (Database/DBaaSUser/DatabaseGrant) May 18, 2026
@ricCap
ricCap merged commit f9f1941 into main May 18, 2026
5 checks passed
@ricCap
ricCap deleted the docs/aruba-dbaas-provider-gaps branch May 18, 2026 13:41
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.

1 participant