{"id":16612670,"url":"https://github.com/cgwalters/openshift-machine-bootimage-updater","last_synced_at":"2025-03-10T19:45:37.989Z","repository":{"id":140640076,"uuid":"362618219","full_name":"cgwalters/openshift-machine-bootimage-updater","owner":"cgwalters","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-28T22:05:08.000Z","size":3535,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-12T22:58:26.168Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/cgwalters.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":"2021-04-28T22:04:31.000Z","updated_at":"2022-08-19T21:46:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"2cd5d6a7-cb3a-4dd5-bb31-2eab1fc104a4","html_url":"https://github.com/cgwalters/openshift-machine-bootimage-updater","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgwalters%2Fopenshift-machine-bootimage-updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgwalters%2Fopenshift-machine-bootimage-updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgwalters%2Fopenshift-machine-bootimage-updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgwalters%2Fopenshift-machine-bootimage-updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cgwalters","download_url":"https://codeload.github.com/cgwalters/openshift-machine-bootimage-updater/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242917446,"owners_count":20206514,"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":[],"created_at":"2024-10-12T01:43:07.989Z","updated_at":"2025-03-10T19:45:37.962Z","avatar_url":"https://github.com/cgwalters.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PoC code to update bootimages in OpenShift 4\n\nSee https://github.com/openshift/enhancements/pull/201\n\n## Status\n\nTested and working in GCP from a cluster installed as 4.5 and upgraded in place to 4.6.\n\nOther platforms:\n\n - AWS: Code written but not tested yet\n\n## Usage\n\nYour cluster must be using an OpenShift release channel that ends in `-4.6`; for example, `stable-4.6`.\n\nFirst, a good thing to do would be to create a backup of your machinesets:\n\n```\n$ oc -n openshift-machine-api get -o yaml machineset \u003e machinesets.yaml\n```\n\nLet's create an admin service account for this, then run it as a pod:\n\n```\n$ oc project kube-system\n$ oc create sa bootimage-updater\n$ oc adm policy add-cluster-role-to-user cluster-admin -z bootimage-updater\n$ oc run --restart=Never --serviceaccount=bootimage-updater --image=registry.svc.ci.openshift.org/cgwalters/openshift-update-bootimages update-bootimages \n```\n\nLook at the logs:\n```\n$ oc logs pod/update-bootimages\n```\n\nIf that succeeded, in order to test that this fully works, try [scaling up one of your machinesets](https://docs.openshift.com/container-platform/4.6/machine_management/manually-scaling-machineset.html).\n\n## How it works\n\nWe first translate e.g. `worker-user-data` to Ignition spec 3x, creating a new `worker-user-data-ignv3`.\n\nThen we loop over all the machinesets, and update them to use the new user-data secret plus the updated bootimage.\n\n## Reverting/debugging\n\nSee [this FAQ entry](https://github.com/openshift/machine-api-operator/blob/master/FAQ.md#i-created-a-machine-but-it-never-joined-the-cluster) if the scaled up node doesn't join.\n\nIf you want to revert; at this time, we don't automatically back up the machinesets; hopefully you did that above.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgwalters%2Fopenshift-machine-bootimage-updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcgwalters%2Fopenshift-machine-bootimage-updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgwalters%2Fopenshift-machine-bootimage-updater/lists"}