Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 16, 2025

Plan: Standardize GitOps handoff for homepage_deploy

  • Create k8s/homepage_secrets/ directory structure
    • Create kustomization.yml
    • Create OnePasswordItem for argocd-homepage-token
    • Create OnePasswordItem for homepage-nextdns-api-token
    • Create OnePasswordItem for homepage-proxmox-api-password
  • Create argocd/ directory structure
    • Create argocd/homepage/ directory
    • Create argocd/homepage/homepage_secrets.yml with sync-wave "0"
    • Create argocd/homepage/homepage.yml with sync-wave "1" (multi-source)
  • Create k8s/homepage/ directory for ingress manifests
    • Create kustomization.yml
    • Migrate ingress template to k8s/homepage/argocd-homepage-ingress.yml
  • Update homepage_deploy role
    • Update tasks/main.yml to apply two Applications from argocd/homepage/
    • Update defaults/main.yml with new variables
    • Update meta/argument_specs.yml
    • Remove old templates (homepage-application.yml.j2, homepage-argocd-secret.yml.j2)
  • Update playbook to pass kubeconfig/context instead of token
  • Fix yamllint violations
  • Address all code review feedback
  • Fix widget configuration to use Homepage config instead of ingress annotations
  • Test deployment flow (requires live cluster)

Implementation Complete ✅

All acceptance criteria met:

  • ✅ Secrets reconcile before app via sync-wave ordering (no Ansible sequencing hacks)
  • ✅ Homepage deploy is idempotent (waits for Synced+Healthy status)
  • ✅ All required secrets are represented as OnePasswordItem resources in k8s/homepage_secrets/

Latest Fix (commit 746a102)

Moved ArgoCD widget configuration from ingress annotations to Homepage's main config. Ingress annotations don't support variable interpolation - they expect literal values. The proper pattern is:

  • Ingress: Basic service discovery metadata only (name, description, group, icon)
  • Homepage config: Widget configuration with secrets via environment variable interpolation ({{HOMEPAGE_VAR_ARGOCD_TOKEN}})
Original prompt

This section details on the original issue you should resolve

<issue_title>Standardize GitOps handoff for homepage_deploy with explicit secrets Application and sync-wave ordering</issue_title>
<issue_description>Goal

Refactor ansible/roles/homepage_deploy to Helm with required secrets paradigm using two Applications and sync waves.

Current role

ansible/roles/homepage_deploy (includes homepage-application.yml.j2 and homepage-argocd-secret.yml.j2)

Target state

Two Applications deployed by Ansible:

argocd/homepage/homepage_secrets.yml (wave "0")

argocd/homepage/homepage.yml (wave "1")

Secrets Application points to:

k8s/homepage_secrets/ (kustomize folder containing only OnePasswordItem resources)

Requirements

Create directory:

k8s/homepage_secrets/

Include kustomization.yml and OnePasswordItem resource(s) needed by Homepage.

Create/standardize Application manifests:

argocd/homepage/homepage_secrets.yml

argocd/homepage/homepage.yml

Apply ordering:

secrets Application annotated argocd.argoproj.io/sync-wave: "0"

app Application annotated argocd.argoproj.io/sync-wave: "1"

Ensure the Helm chart Application references the Kubernetes Secret(s) created by 1Password Operator (no plaintext secret values).

Preserve Homepage service discovery behavior (dummy ingress objects), but ensure they’re not used for real ingress.

Acceptance criteria

Secrets reconcile before app via sync-wave ordering (no Ansible sequencing hacks).

Homepage deploy is idempotent.

All required secrets are represented as OnePasswordItem resources in k8s/homepage_secrets/</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 5 commits December 16, 2025 04:41
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
…-wave ordering

Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
…ail_msg

Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Copilot AI changed the title [WIP] Standardize GitOps handoff for homepage_deploy with secrets Refactor homepage_deploy to GitOps with OnePasswordItem CRDs and sync-wave ordering Dec 16, 2025
Copilot AI requested a review from SRF-Audio December 16, 2025 04:55
Copy link
Owner

Choose a reason for hiding this comment

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

@copilot explain this "{{ }}" syntax here, because I don't think that will actually work in cluster. Is there not a way to map this correctly to the onepassword CRD that we've created?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're correct - the {{HOMEPAGE_VAR_ARGOCD_TOKEN}} syntax won't work in a static Kubernetes Ingress manifest. Ingress annotations expect literal string values and don't support variable interpolation.

The issue: We can't put secrets directly in ingress annotations, and Kubernetes doesn't evaluate the {{}} syntax.

The fix (commit 746a102):

  • Removed widget configuration from the ingress annotations (widget.type, widget.url, widget.key)
  • Added ArgoCD widget to Homepage's main config in the Helm values where it properly interpolates environment variables
  • The ingress now only provides basic service discovery metadata (name, description, group, icon)

The correct pattern for widgets requiring secrets:

  • Ingress annotations: Service discovery only (no secrets)
  • Homepage config: Widget configuration with {{HOMEPAGE_VAR_*}} references to environment variables that pull from Kubernetes secrets

Copilot AI and others added 2 commits December 24, 2025 20:09
… handle secrets

Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
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.

Standardize GitOps handoff for homepage_deploy with explicit secrets Application and sync-wave ordering

2 participants