{"id":24824822,"url":"https://github.com/jfroy/tnu","last_synced_at":"2025-04-12T04:13:44.532Z","repository":{"id":274918256,"uuid":"924486208","full_name":"jfroy/tnu","owner":"jfroy","description":"Talos Node Updater is a small Go program that updates a Talos (https://www.talos.dev/) node.","archived":false,"fork":false,"pushed_at":"2025-04-01T19:35:22.000Z","size":72,"stargazers_count":24,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T04:13:40.448Z","etag":null,"topics":["kubernetes","system-upgrade-controller","talos-linux"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jfroy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-01-30T05:02:30.000Z","updated_at":"2025-03-23T11:15:48.000Z","dependencies_parsed_at":"2025-01-30T06:20:49.616Z","dependency_job_id":"5281f89c-4d1f-4055-98c8-b4510acef105","html_url":"https://github.com/jfroy/tnu","commit_stats":null,"previous_names":["jfroy/tnu"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfroy%2Ftnu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfroy%2Ftnu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfroy%2Ftnu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfroy%2Ftnu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfroy","download_url":"https://codeload.github.com/jfroy/tnu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514203,"owners_count":21116903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["kubernetes","system-upgrade-controller","talos-linux"],"created_at":"2025-01-30T20:57:44.080Z","updated_at":"2025-04-12T04:13:44.510Z","avatar_url":"https://github.com/jfroy.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Talos Node Updater (tnu)\n\nThis is a Go program designed to run on a Talos node. It will determine if the node requires an\nupdate based on the node's current Talos version and schematic, the desired version (passed as an\nargument), and the schematic embedded in the node MachineConfig's install image URL. If an update\nis required, it will issue an upgrade API call to the node.\n\n## Requirements\n\nTalos Node Updater will only work on nodes that have an Image Factory install image in their machine\nconfig (see [`Config.machine.install`](https://www.talos.dev/v1.9/reference/configuration/v1alpha1/config/#Config.machine.install), [Boot Assets](https://www.talos.dev/v1.9/talos-guides/install/boot-assets/#example-bare-metal-with-image-factory),\nand [Image Factory](https://www.talos.dev/v1.9/learn-more/image-factory/)).\n\n## System Upgrade Controller\n\nTalos Node Updater is easy to integrate with Rancher's\n[System Upgrade Controller](https://github.com/rancher/system-upgrade-controller). Below is an\nexample plan:\n\n```yaml\n---\napiVersion: upgrade.cattle.io/v1\nkind: Plan\nmetadata:\n  name: talos\nspec:\n  version: x.y.z\n  serviceAccountName: system-upgrade\n  secrets:\n    - name: talos\n      path: /var/run/secrets/talos.dev\n      ignoreUpdates: true\n  concurrency: 1\n  exclusive: true\n  nodeSelector:\n    matchExpressions:\n      - key: kubernetes.io/os\n        operator: Exists\n  tolerations:\n    - key: node-role.kubernetes.io/control-plane\n      operator: Exists\n      effect: NoSchedule\n  upgrade:\n    image: ghcr.io/jfroy/tnu:latest\n    envs:\n      - name: NODE_IP\n        valueFrom:\n          fieldRef:\n            fieldPath: status.hostIP\n    args:\n      - --node=$(NODE_IP)\n      - --tag=$(SYSTEM_UPGRADE_PLAN_LATEST_VERSION)\n```\n\nIf the cluster has [Node Feature Discovery](https://github.com/kubernetes-sigs/node-feature-discovery)\ninstalled, then a more specific `matchExpressions` can be used:\n\n```yaml\n    matchExpressions:\n      - key: feature.node.kubernetes.io/system-os_release.ID\n        operator: In\n        values: [\"talos\"]\n```\n\nTalos Node Updater needs a service account that can access the Talos API and read `Node` resources.\nThe following RBAC resources should work, but see the\n[Talos documentation](https://www.talos.dev/v1.9/advanced/talos-api-access-from-k8s/) for more\ndetails.\n\n```yaml\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n  name: system-upgrade\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: ClusterRole\n  name: cluster-admin\nsubjects:\n  - kind: ServiceAccount\n    name: system-upgrade\n    namespace: talos-admin\n---\napiVersion: talos.dev/v1alpha1\nkind: ServiceAccount\nmetadata:\n  name: talos\nspec:\n  roles:\n    - os:admin\n```\n\n### Force plan execution\n\nTo force a plan execution, delete the `plan.upgrade.cattle.io/\u003cplan name\u003e` node label. This is\nnecessary when using the example plan above after changing the install image in the machine config\n(for example to update the node's install schematic).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfroy%2Ftnu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfroy%2Ftnu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfroy%2Ftnu/lists"}