Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard workscope/k8sKubernetes commands, Helm charts, pods, services, and policiessource/agentFiled by an agenttype/featureType feature: a new functionvalue/mediumValue Medium
Description
Problem
Checked at devops-cli main 3f8f7a9.
- The private repository dan-petty/danielpetty.com will run on this cluster at
danielpetty-com.<domain>. Owner decision 2026-11-21: the k3s cluster is the only hosted deployment of the site. The site repository keeps its own Kustomize manifests (dan-petty/danielpetty.com#29). The platform side does not exist yet:k8s/namespaces.yamlhas no namespace for the site. Each namespace there sets its Pod Security level andargocd.argoproj.io/sync-options: Prune=false,Delete=false(for examplemattermost,k8s/namespaces.yaml:125-134).- No AppProject admits the site repository. Project
homelaballows every cluster-scoped kind (k8s/argocd/apps/projects.yaml:8-10), so a second repository in it could write any cluster-scoped object. Projecttrialis the narrow precedent:clusterResourceWhitelist: [](projects.yaml:206-210). - The event-stream reads
NOTE_API_KEY(the bearer key ofPOST /api/notes) and an optionalGITHUB_TOKEN. Each cluster Secret is a row insrc/devops_cli/k8s/cluster_secrets.py. A person pushes it before the merge of the manifest that reads it (docs/SERVICE_PATTERNS.mdCF4, CF5). DETACHED_STACKS(cluster_secrets.py:34) holds the stacks thatdeploy-stacknever deploys.deploy-stackpushes a detached stack only where a namespace with the name of the stack exists (src/devops_cli/commands/k8s/stack_lifecycle.py:892-905).push-secretsskips each row whose namespace does not exist (src/devops_cli/k8s/secret_push.py:453-470). So the stack of the site takes the name of its namespace.monitoring-default-perimeterlets Alloy reach only the namespaces and ports of its egress list (k8s/monitoring/networkpolicy.yaml). Alloy cannot scrape a new namespace until the list has it.- Argo CD reads a private repository only through a repository Secret. The only one is
argocd/repo-homelab(k8s/README.md:1089), and projecthomelabignores it as an orphan (projects.yaml:115-117). - The GitHub App
devops-cli-argocdis installed on dan-petty/homelab (docs/HOMELAB_REPO_SWITCH.md:133). The CLI token cannot read the repository list of the installation (user/installationsreturns HTTP 403), so it is not known if the installation includes the site repository.
Proposed remedy
Use an Argo CD AppProject and the push-secrets table. Add no new code path.
k8s/namespaces.yaml: namespacedanielpetty-comwith Pod Security enforce, warn and auditrestricted, andPrune=false,Delete=false.k8s/argocd/apps/projects.yaml: a new AppProjectdanielpetty-com:sourceRepos: onlyhttps://github.com/dan-petty/danielpetty.com;destinations: only namespacedanielpetty-com(feat(k8s): add the danielpetty-com-pixelfed namespace and Secrets #6645 adds the Pixelfed namespace);clusterResourceWhitelist: [], and anamespaceResourceBlacklistwithRoleandRoleBinding;orphanedResources.warn: truewith an ignore entry for Secretevent-stream.
- Project
homelab: an orphan ignore entry for Secretrepo-danielpetty-com, as forrepo-homelab. cluster_secrets.py: adddanielpetty-comtoDETACHED_STACKS. Add rowdanielpetty-com/event-streamin stackdanielpetty-com:NOTE_API_KEY: keyringdanielpetty_com_note_api_key, required, generatorurlsafewith 32 bytes;GITHUB_TOKEN: keyringdanielpetty_com_github_token, not required, no generator;- restarts
deployment/event-stream.
k8s/monitoring/networkpolicy.yaml: egress to namespacedanielpetty-comon TCP 9090, the metrics port of feat(event-stream): export harvest metrics on a private port danielpetty.com#28.k8s/README.md: the row in the Cluster Secrets table, and the repository Secretrepo-danielpetty-combesiderepo-homelab.- Change each test first. This pull request adds no Application: feat(argocd): deploy the danielpetty-com event-stream from its repository #6644 adds it after the push.
Premise check: #5134 plan step 12 adds a temporary check that refuses changes to the old environment paths in devops-cli. If that check is on main when you start, stop and return this item with the evidence. The change then goes to dan-petty/homelab.
Acceptance criteria
-
uv run devops ci --check --only k8s,kube-linter,domainpasses. -
kubectl kustomize k8s | yq 'select(.kind == "Namespace" and .metadata.name == "danielpetty-com") | .metadata'shows the threerestrictedlabels andPrune=false,Delete=false. -
yq 'select(.metadata.name == "danielpetty-com") | .spec' k8s/argocd/apps/projects.yamlshows one source repository, one destination,clusterResourceWhitelist: []and the RBAC blacklist. -
uv run devops k8s push-secrets --stack danielpetty-com --dry-runlistsNOTE_API_KEYandGITHUB_TOKENand no value. - A unit test shows that the row generates
NOTE_API_KEYwhen the keyring has no value, and skipsGITHUB_TOKEN. - After the merge and the sync of Application
base:kubectl get ns danielpetty-com -L pod-security.kubernetes.io/enforceshowsrestricted.
Person steps
After the merge and the sync of Application base:
- Optional: put a fine-grained GitHub token with read access to public data only into keyring entry
danielpetty_com_github_token. Without it, the harvester has the lower anonymous rate limit of the GitHub API. - Run
uv run devops k8s push-secrets --stack danielpetty-com --plan, thenuv run devops k8s push-secrets --stack danielpetty-com. Copy the note key from keyring entrydanielpetty_com_note_api_keyinto your note client. - In the installation settings of the GitHub App
devops-cli-argocd, add dan-petty/danielpetty.com to the selected repositories. The App has Contents: read (Argo CD reads the manifests) and Deployments: write (the deploy notifier of feat(argocd): deploy the danielpetty-com event-stream from its repository #6644 writes deployment statuses). - Create the repository Secret
repo-danielpetty-comin namespaceargocd: labelargocd.argoproj.io/secret-type: repository, typegit, URLhttps://github.com/dan-petty/danielpetty.com,project: danielpetty-com, and the App ID, installation ID and private key ofdevops-cli-argocd(the values ofrepo-homelab). Never put this Secret in git. Check:argocd repo list --coreshows the repository asSuccessful.
Dependencies
None. During the homelab switch (#5134), plan step 10 copies the new environment files into dan-petty/homelab.
Metadata
Metadata
Assignees
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard workscope/k8sKubernetes commands, Helm charts, pods, services, and policiessource/agentFiled by an agenttype/featureType feature: a new functionvalue/mediumValue Medium
Activity
dan-petty commentedon Nov 21, 2026
Both configure Argo CD AppProjects in projects.yaml, but 1646 restricts existing projects while the candidate adds a new project for the danielpetty-com site.dan-petty commentedon Nov 21, 2026
Closed as not planned. Owner direction of 2026-11-21: the platform holds no code, row or constant of one service, and Argo CD apps manage the service repositories with best practices. PR #6652 is already closed. Replacements: the tenant chart of dan-petty/infra (dan-petty/infra#10) makes the namespace with its Pod Security labels, a default-deny NetworkPolicy and an AppProject with one source repository, only its own namespaces, no cluster-scoped kind and an allow-list with no Secret or RBAC kind. One services entry in dan-petty/homelab (dan-petty/homelab#85) gives the values, through the services ApplicationSet (dan-petty/infra#11, dan-petty/homelab#80). The service Secrets come from External Secrets Operator in the site repository (ADR #6675, templates dan-petty/infra#12, operator dan-petty/homelab#82, dan-petty/danielpetty.com#29), not from a row in
src/devops_cli/k8s/cluster_secrets.py. Monitoring reaches the namespace by a label (dan-petty/homelab#81). The repository credential is one credential template that the owner makes (person step of dan-petty/homelab#80).