{"id":22372309,"url":"https://github.com/keleustes/oslc-operator","last_synced_at":"2026-05-04T11:39:17.439Z","repository":{"id":65197848,"uuid":"187114611","full_name":"keleustes/oslc-operator","owner":"keleustes","description":"Openstack Lifecyle Manager Operator","archived":false,"fork":false,"pushed_at":"2023-10-11T23:36:11.000Z","size":750,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T22:09:33.822Z","etag":null,"topics":["argo","helm","kubernetes","lifecycle","openstack","operator"],"latest_commit_sha":null,"homepage":"https://keleustes.github.io/","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/keleustes.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":"2019-05-16T23:30:07.000Z","updated_at":"2023-04-18T05:12:41.000Z","dependencies_parsed_at":"2024-06-21T11:48:50.151Z","dependency_job_id":"be75afce-ffe8-4411-b24d-f4721bddb17a","html_url":"https://github.com/keleustes/oslc-operator","commit_stats":{"total_commits":21,"total_committers":3,"mean_commits":7.0,"dds":0.1428571428571429,"last_synced_commit":"3a61657da5718eb9804528ffb2a1c72b5f6333a0"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keleustes%2Foslc-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keleustes%2Foslc-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keleustes%2Foslc-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keleustes%2Foslc-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keleustes","download_url":"https://codeload.github.com/keleustes/oslc-operator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245699259,"owners_count":20657987,"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":["argo","helm","kubernetes","lifecycle","openstack","operator"],"created_at":"2024-12-04T20:36:55.434Z","updated_at":"2025-10-23T02:32:10.472Z","avatar_url":"https://github.com/keleustes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubernetes Operator for Openstack LCM\n\n# Introduction\n\nThis README is mainly used a log / wiki of results and challenges encounted during the POC\n\n## operator-sdk vs kubebuilder.\n\nThings to clean up:\nDid not had time to sort how to completly migrate from operator-sdh to kubebuilder.\nMost of the scaffolding is done using the operator-sdk but once the default files are created,\nthe build process mainly relies on kubebuilder\n\n## openstacklcm-operator code directory structure\n\n###  cmd\n\nContains the main.go for the openstacklcm operator\n\n###  pkg/apis/\n\nContains the golang definition of the CRDs. `make generate` will recreate the yaml definitions\nof the CRDs that have to be provided to kubectl in order to deploy the new CRDs.\n\nThe first version of the golang code has generated using tool such as \"schema-generate\" from\nthe schema definition provided with airship-armada project.\n\n###  pkg/services\n\nContains the bulk of the interfaces used by the openstacklcm controller.\n\n###  pkg/osphases\n\nMainly contain the code for xxxPhase handling\n\n###  pkg/oslc directory\n\nMainly contain the code for Oslc (OpenstackServiceLifeCycle) handling\n\n###  pkg/controller directory\n\nContains the controller and the \"Reconcile\" functions for Oslc and xxxPhase.\n\n# Code changes.\n\n## Adjusting the OpenstackServiceLifeCycle CRDs\n\nUpon change of the CRD golang definition, the yaml files have to be regenerated\n\nNote 1: Don't understand yet how to build using operator-sdk operator with the same level of detailes than\ncontroller-gen. Big hack that have to be included in Makefile.\n\nNote 2: The generation tool seems to comply with some of OpenAPI specs. The \"validation\" schema added\nto in the CRD yaml definition does not contain fields using underscore. \nMost of those fields containing underscore where defined such a way in the original airship-armada.\n\n```bash\nmake generate\n```\n\n## Compiling the openstacklcm-operator\n\n```bash\ndep ensure\n```\n\nTo build the version\n```bash\nmake docker-build\n```\n## Run unit test and preintegration tests.\n\nIf you installed kubebuilder on your system, you will have access\nto a standalone apiserver, etcd server and kubectl.\n\nBecause of a lack of time, the current makefile test statement,\nwill attempt to stop your kubelet and associated container in your local\nkubernetes cluster, before starting apiserver, etcdserver.\nTODO: We still need to figure out if it necessary\n\nIn order to run the unit tests and the e2e integration tests:\n```bash\nmake unittest\n```\n\n# Deploying the operator.\n\nNote the current deployment of the operator relies itself on helm.\n\nTo install the version\n```bash\nmake install\n```\n\n# Openstack Service Invidual Phase CRD testing\n\nFor testing purpose the current Docker file includes a dummy chart deliverd under armada-charts.\n\n## Invidual Phase CRD sanity tests as standalone kubernetes objects\n\n```bash\nkubectl apply -f examples/phases/\n\ndeletephase.openstacklcm.airshipit.org/delete created\nginstallphase.openstacklcm.airshipit.org/install created\noperationalphase.openstacklcm.airshipit.org/operational created\nplanningphase.openstacklcm.airshipit.org/planning created\nrollbackphase.openstacklcm.airshipit.org/rollback created\ntestphase.openstacklcm.airshipit.org/test created\ntrafficdrainphase.openstacklcm.airshipit.org/trafficdrain created\ntrafficrolloutphase.openstacklcm.airshipit.org/trafficrollout created\nupgradephase.openstacklcm.airshipit.org/upgrade created\n```\n\n```bash\nkubectl get osupg\nkubectl get osrbck\nkubectl get osroll\nkubectl get osdrain\nkubectl get ostest\nkubectl get osplan\nkubectl get osins\nkubectl get osdlt\n```\n\n```bash\nkubectl describe osupg\nkubectl describe osrbck\nkubectl describe osroll\nkubectl describe osdrain\nkubectl describe ostest\nkubectl describe osplan\nkubectl describe osins\nkubectl describe osdlt\n```\n\n\n```bash\nfor i in `cat phaselist.txt`; do kubectl logs pod/${i}-wf main; done\n ____________________\n\u003c workflow 1: delete \u003e\n --------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n _____________________\n\u003c workflow 1: install \u003e\n ---------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n _________________________\n\u003c workflow 1: operational \u003e\n -------------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n ______________________\n\u003c workflow 1: planning \u003e\n ----------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n ______________________\n\u003c workflow 1: rollback \u003e\n ----------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n __________________\n\u003c workflow 1: test \u003e\n ------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n __________________________\n\u003c workflow 1: trafficdrain \u003e\n --------------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n ____________________________\n\u003c workflow 1: trafficrollout \u003e\n ----------------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n _____________________\n\u003c workflow 1: upgrade \u003e\n ---------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n```\n\n```bash\nkubectl get all\n\nNAME                                         READY   STATUS      RESTARTS   AGE\npod/delete-wf                                0/2     Completed   0          18s\npod/install-wf                               0/2     Completed   0          18s\npod/openstacklcm-operator-6745fc85f4-b5f76   1/1     Running     0          4m46s\npod/operational-wf                           0/2     Completed   0          18s\npod/planning-wf                              0/2     Completed   0          17s\npod/rollback-wf                              0/2     Completed   0          16s\npod/test-wf                                  0/2     Completed   0          15s\npod/trafficdrain-wf                          0/2     Completed   0          14s\npod/trafficrollout-wf                        0/2     Completed   0          14s\npod/upgrade-wf                               0/2     Completed   0          14s\n\nNAME                            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE\nservice/kubernetes              ClusterIP   10.96.0.1       \u003cnone\u003e        443/TCP    34m\nservice/openstacklcm-operator   ClusterIP   10.101.236.32   \u003cnone\u003e        8383/TCP   33m\n\nNAME                                    READY   UP-TO-DATE   AVAILABLE   AGE\ndeployment.apps/openstacklcm-operator   1/1     1            1           4m46s\n\nNAME                                               DESIRED   CURRENT   READY   AGE\nreplicaset.apps/openstacklcm-operator-6745fc85f4   1         1         1       4m46s\n```\n\n```bash\nkubectl delete -f examples/phases/\n\ndeletephase.openstacklcm.airshipit.org \"delete\" deleted\ninstallphase.openstacklcm.airshipit.org \"install\" deleted\noperationalphase.openstacklcm.airshipit.org \"operational\" deleted\nplanningphase.openstacklcm.airshipit.org \"planning\" deleted\nrollbackphase.openstacklcm.airshipit.org \"rollback\" deleted\ntestphase.openstacklcm.airshipit.org \"test\" deleted\ntrafficdrainphase.openstacklcm.airshipit.org \"trafficdrain\" deleted\ntrafficrolloutphase.openstacklcm.airshipit.org \"trafficrollout\" deleted\nupgradephase.openstacklcm.airshipit.org \"upgrade\" deleted\n```\n\n## Invidual Phase CRD sanity tests as part of testservice Helm Chart.\n\n```bash\nkubectl apply -f examples/testservice/\n\ndeletephase.openstacklcm.airshipit.org/delete-phase created\ninstallphase.openstacklcm.airshipit.org/install-phase created\noperationalphase.openstacklcm.airshipit.org/operational-phase created\nplanningphase.openstacklcm.airshipit.org/planning-phase created\nrollbackphase.openstacklcm.airshipit.org/rollback-phase created\ntestphase.openstacklcm.airshipit.org/test-phase created\ntrafficdrainphase.openstacklcm.airshipit.org/trafficdrain-phase created\ntrafficrolloutphase.openstacklcm.airshipit.org/trafficrollout-phase created\nupgradephase.openstacklcm.airshipit.org/upgrade-phase created\n```\n\n```bash\nfor in `kubectl get pod | grep stage | awk '{print $1}' `; do kubectl logs $i main; done\n _________________________________\n/ Executing delete:               \\\n\\ delete-phase-osdlt-delete-stage /\n ---------------------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n ___________________________________\n/ Executing install:                \\\n\\ install-phase-osins-install-stage /\n -----------------------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n _________________________________________\n/ Executing operational:                  \\\n| operational-phase-osops-operational-sta |\n\\ ge                                      /\n -----------------------------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n ______________________________________\n/ Executing planning:                  \\\n\\ planning-phase-osplan-planning-stage /\n --------------------------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n ______________________________________\n/ Executing rollback:                  \\\n\\ rollback-phase-osrbck-rollback-stage /\n --------------------------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n ______________________________\n/ Executing test:              \\\n\\ test-phase-ostest-test-stage /\n ------------------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n _________________________________________\n/ Executing trafficdrain:                 \\\n| trafficdrain-phase-osdrain-trafficdrain |\n\\ -stage                                  /\n -----------------------------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n _________________________________________\n/ Executing trafficrollout:               \\\n| trafficrollout-phase-osroll-trafficroll |\n\\ out-stage                               /\n -----------------------------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n ___________________________________\n/ Executing upgrade:                \\\n\\ upgrade-phase-osupg-upgrade-stage /\n -----------------------------------\n    \\\n     \\\n      \\\n                    ##        .\n              ## ## ##       ==\n           ## ## ## ##      ===\n       /\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"___/ ===\n  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~\n       \\______ o          __/\n        \\    \\        __/\n          \\____\\______/\n```\n\n```bash\nkubectl delete -f examples/testservice/\ndeletephase.openstacklcm.airshipit.org \"delete-phase\" deleted\ninstallphase.openstacklcm.airshipit.org \"install-phase\" deleted\noperationalphase.openstacklcm.airshipit.org \"operational-phase\" deleted\nplanningphase.openstacklcm.airshipit.org \"planning-phase\" deleted\nrollbackphase.openstacklcm.airshipit.org \"rollback-phase\" deleted\ntestphase.openstacklcm.airshipit.org \"test-phase\" deleted\ntrafficdrainphase.openstacklcm.airshipit.org \"trafficdrain-phase\" deleted\ntrafficrolloutphase.openstacklcm.airshipit.org \"trafficrollout-phase\" deleted\nupgradephase.openstacklcm.airshipit.org \"upgrade-phase\" deleted\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeleustes%2Foslc-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeleustes%2Foslc-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeleustes%2Foslc-operator/lists"}