{"id":47819546,"url":"https://github.com/hops-ops/gitops-stack","last_synced_at":"2026-05-23T12:00:37.601Z","repository":{"id":343346645,"uuid":"1177303944","full_name":"hops-ops/gitops-stack","owner":"hops-ops","description":"GitopsStack via ArgoCD XR","archived":false,"fork":false,"pushed_at":"2026-05-18T08:54:45.000Z","size":76,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-18T09:26:08.696Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"KCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hops-ops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-09T22:40:56.000Z","updated_at":"2026-05-18T07:09:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hops-ops/gitops-stack","commit_stats":null,"previous_names":["hops-ops/gitops-stack"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/hops-ops/gitops-stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Fgitops-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Fgitops-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Fgitops-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Fgitops-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hops-ops","download_url":"https://codeload.github.com/hops-ops/gitops-stack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Fgitops-stack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33394672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-03T19:03:09.430Z","updated_at":"2026-05-23T12:00:37.589Z","avatar_url":"https://github.com/hops-ops.png","language":"KCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitops-stack\n\nA single Crossplane resource that provisions a complete GitOps foundation: ArgoCD, a GitHub repository, and ArgoCD Applications wired to continuously sync from the repo.\n\n## Why GitOps Stack?\n\n**Without GitOps Stack:**\n- 3 manual steps per cluster: install ArgoCD, create a repo, wire the two together\n- ArgoCD Applications referencing wrong repo URLs or paths after copy-paste\n- Deleting ArgoCD before its Applications causes orphaned resources and finalizer deadlocks\n- GitHub repo creation is a manual, out-of-band process with inconsistent naming/settings\n- No single source of truth for \"what GitOps infrastructure does this cluster have?\"\n\n**With GitOps Stack:**\n- One resource, one API — ArgoCD, GitHub repo, and Applications all wired automatically\n- Repo URL derived from org + cluster name — rename the cluster and everything adjusts\n- Safe deletion ordering enforced via Usage resources (projects app deletes before ArgoCD)\n- GitHub repo created with consistent settings (topics, visibility, branch cleanup, templates)\n- Optional Crossplane integration deploys configurations and provider configs via ArgoCD\n\n## What Gets Deployed\n\n```\n                    ┌──────────────────────────────────┐\n                    │          GitopsStack XR           │\n                    └───────────────┬──────────────────┘\n                                    │\n                    ┌───────────────┼───────────────┐\n                    ▼                               ▼\n             ┌────────────┐                ┌────────────────┐\n             │   ArgoCD   │                │ GitHub Repo    │\n             │   (Helm)   │                │ (upjet-github) │\n             └──────┬─────┘                └────────────────┘\n                    │ ready\n         ┌──────────┼──────────────────┐\n         ▼          ▼                  ▼\n  ┌────────────┐ ┌─────────────┐ ┌──────────────────┐\n  │  Projects  │ │ Crossplane  │ │ Crossplane Apps   │\n  │    App     │ │ AppProject  │ │ (configs +        │\n  │            │ │             │ │  provider-configs) │\n  └────────────┘ └─────────────┘ └──────────────────┘\n                  └── only if crossplane.enabled ──┘\n```\n\n**Up to 7 composed resources:** 1 Helm Release + 1 GitHub Repository + up to 4 Kubernetes Objects + 1 Usage protection\n\n| Resource | Type | Purpose |\n|----------|------|---------|\n| ArgoCD | Helm Release (`argo-cd` v9.4.3) | Continuous delivery platform |\n| GitHub Repository | `repo.github.m.upbound.io` | GitOps source repository |\n| Projects Application | Kubernetes Object (ArgoCD Application) | Syncs ArgoCD projects from the repo |\n| Deletion Usage | Usage | Ensures projects app deletes before ArgoCD |\n| Crossplane AppProject | Kubernetes Object (ArgoCD AppProject) | Scoped ArgoCD project for Crossplane |\n| Crossplane Configs App | Kubernetes Object (ArgoCD Application) | Syncs Crossplane configurations |\n| Crossplane Provider Configs App | Kubernetes Object (ArgoCD Application) | Syncs Crossplane provider configs |\n\n## The Journey\n\n### Stage 1: Getting Started\n\nTwo fields required. Everything else has sensible defaults.\n\n```yaml\napiVersion: hops.ops.com.ai/v1alpha1\nkind: GitopsStack\nmetadata:\n  name: gitops\n  namespace: default\nspec:\n  clusterName: my-cluster\n  repository:\n    org: hops-ops\n```\n\nThis deploys:\n- ArgoCD into the `argocd` namespace with CRDs, monitoring, and service monitors enabled\n- GitHub repo `hops-ops/my-cluster-gitops` (private, auto-initialized)\n- Projects Application syncing from `.gitops/deploy` in the repo (once ArgoCD is ready)\n\n### Stage 2: Customizing for Your Team\n\nAdd labels, use a template repo, tune ArgoCD.\n\n```yaml\napiVersion: hops.ops.com.ai/v1alpha1\nkind: GitopsStack\nmetadata:\n  name: gitops\n  namespace: default\nspec:\n  clusterName: production\n  labels:\n    team: platform\n    environment: production\n  repository:\n    org: hops-ops\n    name: production-gitops\n    description: GitOps for production cluster\n    topics: [gitops, argocd, production]\n    template:\n      owner: hops-ops\n      repository: platform-gitops-template\n  argocd:\n    values:\n      server:\n        ingress:\n          enabled: true\n          hostname: argocd.example.com\n```\n\nWhen `template` is set, the repo is created from the template instead of auto-init.\n\n### Stage 3: Crossplane Integration\n\nEnable ArgoCD-managed Crossplane resources for full platform automation.\n\n```yaml\nspec:\n  clusterName: production\n  repository:\n    org: hops-ops\n  applications:\n    projects:\n      path: .gitops/deploy\n    crossplane:\n      enabled: true\n```\n\nThis adds 3 ArgoCD resources (gated on ArgoCD readiness):\n- **AppProject** `crossplane` — scoped project allowing all sources and destinations\n- **Application** `crossplane-configurations` — syncs from `resources/crossplane/configurations`\n- **Application** `crossplane-provider-configs` — syncs from `resources/crossplane/provider-configs`\n\nSync waves ensure ordering: AppProject (-1) → configurations (0) → provider-configs (1).\n\n### Stage 4: Local Development\n\nFor Colima/kind/minikube — use `default` provider configs instead of cluster-named ones.\n\n```yaml\napiVersion: hops.ops.com.ai/v1alpha1\nkind: GitopsStack\nmetadata:\n  name: gitops\n  namespace: default\nspec:\n  clusterName: local\n  helmProviderConfigRef:\n    name: default\n  kubernetesProviderConfigRef:\n    name: default\n  githubProviderConfigRef:\n    name: default\n  repository:\n    org: hops-ops\n```\n\n### Stage 5: Full Override\n\nWhen you need complete control over ArgoCD's Helm values (bypassing all defaults):\n\n```yaml\nspec:\n  argocd:\n    overrideAllValues:\n      crds:\n        install: false\n      server:\n        replicas: 3\n```\n\n`overrideAllValues` replaces **all** defaults — chart defaults, monitoring config, everything. Use `values` for additive changes instead.\n\n## Creation Order\n\nResources are created as their dependencies become ready:\n\n```mermaid\ngraph TD\n    XR[GitopsStack XR] --\u003e argocd[ArgoCD Helm Release]\n    XR --\u003e repo[GitHub Repository]\n\n    argocd -.-\u003e|ready| projects[Projects Application]\n    argocd -.-\u003e|ready| xp-project[Crossplane AppProject]\n    xp-project -.-\u003e|wave -1| xp-configs[Crossplane Configs App]\n    xp-configs -.-\u003e|wave 0| xp-pconfigs[Crossplane Provider Configs App]\n```\n\nArgoCD and the GitHub repo start immediately. All Applications wait for ArgoCD to be ready.\n\n## Deletion Order\n\nUsage resources enforce safe teardown — dependents delete before the resources they depend on:\n\n```mermaid\ngraph LR\n    projects[Projects Application] --\u003e|blocks| argocd[ArgoCD]\n    xp-pconfigs[Provider Configs App] -.- free1[ ]\n    xp-configs[Configs App] -.- free2[ ]\n    xp-project[AppProject] -.- free3[ ]\n    repo[GitHub Repo] -.- free4[ ]\n\n    style free1 fill:none,stroke:none\n    style free2 fill:none,stroke:none\n    style free3 fill:none,stroke:none\n    style free4 fill:none,stroke:none\n```\n\n| Phase | Deletes | Waits for |\n|-------|---------|-----------|\n| 1 | GitHub repo, Crossplane apps, AppProject | nothing — immediate |\n| 2 | Projects Application | nothing — immediate |\n| 3 | ArgoCD | Projects Application gone |\n\nThe Usage ensures ArgoCD CRDs stay alive until all ArgoCD Application CRs are cleaned up.\n\n## Spec Reference\n\n| Field | Type | Required | Default | Description |\n|-------|------|----------|---------|-------------|\n| `clusterName` | string | yes | — | Target cluster name; drives naming defaults |\n| `namespace` | string | no | `argocd` | Namespace for ArgoCD and applications |\n| `labels` | map | no | `{}` | Custom labels merged with defaults |\n| `managementPolicies` | []string | no | `[\"*\"]` | Crossplane management policies |\n| `helmProviderConfigRef.name` | string | no | `clusterName` | Helm ProviderConfig name |\n| `helmProviderConfigRef.kind` | string | no | `ProviderConfig` | `ProviderConfig` or `ClusterProviderConfig` |\n| `kubernetesProviderConfigRef.name` | string | no | `clusterName` | Kubernetes ProviderConfig name |\n| `kubernetesProviderConfigRef.kind` | string | no | `ProviderConfig` | `ProviderConfig` or `ClusterProviderConfig` |\n| `githubProviderConfigRef.name` | string | no | `default` | GitHub ProviderConfig name |\n| `githubProviderConfigRef.kind` | string | no | `ProviderConfig` | `ProviderConfig` or `ClusterProviderConfig` |\n| `argocd.name` | string | no | `argocd` | Helm release name |\n| `argocd.namespace` | string | no | `namespace` | Per-component namespace override |\n| `argocd.values` | object | no | `{}` | Helm values merged with defaults |\n| `argocd.overrideAllValues` | object | no | — | Helm values replacing all defaults |\n| `repository.org` | string | yes | — | GitHub organization |\n| `repository.name` | string | no | `{clusterName}-gitops` | Repository name |\n| `repository.description` | string | no | auto-generated | Repository description |\n| `repository.visibility` | string | no | `private` | `public`, `private`, or `internal` |\n| `repository.autoInit` | boolean | no | `true` | Create initial commit (ignored when template is set) |\n| `repository.template.owner` | string | no | — | Template repo owner |\n| `repository.template.repository` | string | no | — | Template repo name |\n| `repository.topics` | []string | no | `[]` | Repository topics |\n| `repository.deleteBranchOnMerge` | boolean | no | `true` | Auto-delete head branches on merge |\n| `applications.apps.enabled` | boolean | no | `true` | Deploy the root app-of-apps Application |\n| `applications.apps.path` | string | no | `apps` | Path in repo to sync |\n| `applications.crossplane.enabled` | boolean | no | `false` | Deploy Crossplane integration apps |\n\n**ArgoCD chart defaults** (merged with `argocd.values`):\n\n```yaml\ncrds:\n  install: true\nglobal:\n  monitoring:\n    enabled: true\n    serviceMonitor:\n      enabled: true\n```\n\n## Status\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `status.ready` | boolean | `true` when all composed resources report Ready |\n| `status.repository.url` | string | Full URL of the created GitHub repository |\n\n## Dependencies\n\n| Kind | Package | Version |\n|------|---------|---------|\n| Function | crossplane-contrib/function-auto-ready | \u003e=v0.6.1 |\n| Provider | crossplane-contrib/provider-helm | \u003e=v1 |\n| Provider | crossplane-contrib/provider-kubernetes | \u003e=v1 |\n| Provider | crossplane-contrib/provider-upjet-github | \u003e=v0.19.0 |\n\n## Development\n\n```bash\nmake render          # Render all examples\nmake render:minimal  # Render a single example\nmake validate        # Validate all rendered output\nmake test            # Run KCL unit tests (12 tests)\nmake e2e             # Run E2E tests (requires GitHub App credentials)\nmake build           # Build the Crossplane package\nmake publish tag=v1  # Build and push to registry\n```\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhops-ops%2Fgitops-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhops-ops%2Fgitops-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhops-ops%2Fgitops-stack/lists"}