Skip to content

[firestartr-bootstrap] Several fixes for new errors found#403

Merged
juanjosevazquezgil merged 21 commits intomainfrom
fix/399-firestartr-bootstrap-errors-detected-in-the-bootstrap-of-a-new-customer
Feb 16, 2026
Merged

[firestartr-bootstrap] Several fixes for new errors found#403
juanjosevazquezgil merged 21 commits intomainfrom
fix/399-firestartr-bootstrap-errors-detected-in-the-bootstrap-of-a-new-customer

Conversation

@frmadem frmadem changed the title Ensure org is in lowercase for AWS [firestartr-bootstrap] Ensure org is in lowercase for AWS Feb 15, 2026
@frmadem frmadem changed the title [firestartr-bootstrap] Ensure org is in lowercase for AWS [firestartr-bootstrap] Several fixes for new errors found Feb 15, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request addresses multiple issues discovered during the Firestartr bootstrap process for new customers. The main focus is on fixing hardcoded values, ensuring proper credential separation between admin and operator operations, enforcing lowercase organization names for AWS Parameter Store references, and correcting the default group assignment for domain and system resources.

Changes:

  • Added DefaultGroup field to allow proper ownership assignment for default domains and systems (fixes issue #402)
  • Implemented GhOrgLowerCase field to enforce lowercase organization names in AWS Parameter Store paths (addresses issue #400)
  • Separated GitHub App credentials into admin (GithubApp) and operator (GithubAppOperator) credentials with dedicated secret stores (fixes issue #399)
  • Removed unnecessary BotName field and references from the codebase
  • Fixed ArgoCD application path formatting to remove duplicate parameters

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
firestartr-bootstrap/types.go Added DefaultGroup field to Bootstrap struct; added GithubAppOperator field to CredsFile; removed BotName field; updated GitHub App YAML tag from githubApp to github
firestartr-bootstrap/templates/initial_claims.tmpl Updated domain and system owners from {{ $.Org }}-all to {{ $.DefaultGroup }}
firestartr-bootstrap/schemas/credentials-file.json Updated schema to use github instead of githubApp; removed owner and botName requirements; kept only prefappBotPat and operatorPat
firestartr-bootstrap/schemas/bootstrap-file.json Added defaultGroup property and marked it as required
firestartr-bootstrap/main.go Added GhOrgLowerCase field; implemented lowercase conversion for org names; updated credential owner assignment; used lowercased org in calculateParameters
firestartr-bootstrap/kubernetes.go Added operator secrets file constant and credential mapping; implemented separate credential population for operator GitHub App; applied PEM escaping for both credential sets
firestartr-bootstrap/helm.go Updated operator Helm values to use GithubAppOperator credentials instead of admin credentials
firestartr-bootstrap/external_secrets/operator_secrets.tmpl New template for operator-specific secrets with AWS Parameter Store integration
firestartr-bootstrap/commands.go Removed BotName assignment statements
firestartr-bootstrap/argocd.go Fixed ArgoCD application path formatting by removing duplicate parameters and updating base path
firestartr-bootstrap/README.md Updated documentation for defaultGroup parameter; removed documentation for obsolete githubApp.owner and githubApp.botName fields; updated schema references from githubApp to github

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

frmadem and others added 4 commits February 15, 2026 16:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…tstrap-of-a-new-customer' of https://github.com/prefapp/daggerverse into fix/399-firestartr-bootstrap-errors-detected-in-the-bootstrap-of-a-new-customer
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +455 to +457
WithExec([]string{
"gh", "api", fmt.Sprintf("/orgs/%s/teams/%s", m.GhOrg, m.Bootstrap.DefaultGroup),
}).
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

This GitHub API endpoint expects a team slug (and should be URL path-escaped). Passing DefaultGroup verbatim will fail for teams whose display name contains spaces or other characters (the README example uses a space). Either validate/require defaultGroup to be the team slug (e.g., my-group) and document it, or apply url.PathEscape (and/or resolve the slug by name via the API) before calling gh api.

Copilot uses AI. Check for mistakes.
Comment on lines 63 to 68
patchedDir, err := safelyPatchYamlConfig(
ctx,
argoCDRepo.Directory("/repo"),
"kubernetes-sys-services/firestartr-pro/argo-configuration-secrets/values.yaml",
fmt.Sprintf("kubernetes-sys-services/firestartr-%s/argo-configuration-secrets/values.yaml", m.Bootstrap.Env),
m.Bootstrap.Org,
clientAccess,
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

installationIdSecretRef still uses m.Bootstrap.Org in the Parameter Store path, but the rest of the PR introduces GhOrgLowerCase to ensure org references are lowercase for SSM keys. This will reintroduce the original casing bug for the ArgoCD installation-id lookup. Use m.GhOrgLowerCase when building this parameter path.

Copilot uses AI. Check for mistakes.
defaultOrgPermissions: view
defaultBranchStrategy: none
defaultFirestartrGroup: firestartr
defaultGroup: 'my group' # must be an existing group/team or one of the created by the bootstrap process
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

The example defaultGroup: 'my group' is likely not a valid Firestartr GroupClaim / GitHub team slug (spaces will also fail the new gh api /orgs/<org>/teams/<defaultGroup> check). Consider documenting that defaultGroup must be a GitHub team slug (e.g., my-group), and clarify whether this group is expected to already exist (it is not created in templates/initial_claims.tmpl).

Suggested change
defaultGroup: 'my group' # must be an existing group/team or one of the created by the bootstrap process
defaultGroup: my-group # GitHub team slug for the default Firestartr group; must refer to an existing team in the org (it is not created by the bootstrap)

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@juanjosevazquezgil juanjosevazquezgil left a comment

Choose a reason for hiding this comment

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

LGTM!

@juanjosevazquezgil juanjosevazquezgil merged commit af772d7 into main Feb 16, 2026
1 check passed
@juanjosevazquezgil juanjosevazquezgil deleted the fix/399-firestartr-bootstrap-errors-detected-in-the-bootstrap-of-a-new-customer branch February 16, 2026 13:44
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.

[firestartr-bootstrap] Errors detected in the bootstrap of a new customer

3 participants