{"id":15065996,"url":"https://github.com/keleustes/armada-operator","last_synced_at":"2026-01-02T18:03:25.102Z","repository":{"id":64303872,"uuid":"187114559","full_name":"keleustes/armada-operator","owner":"keleustes","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-17T03:50:10.000Z","size":798,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T14:07:50.962Z","etag":null,"topics":["airship","armada","helm","kubernetes","openstack","openstack-helm","operator","operator-framework"],"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:29:36.000Z","updated_at":"2023-04-16T23:14:35.000Z","dependencies_parsed_at":"2024-06-20T04:21:13.321Z","dependency_job_id":"9b0133a9-6022-4a64-b750-721de51f58ec","html_url":"https://github.com/keleustes/armada-operator","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keleustes%2Farmada-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keleustes%2Farmada-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keleustes%2Farmada-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keleustes%2Farmada-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keleustes","download_url":"https://codeload.github.com/keleustes/armada-operator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809885,"owners_count":20351407,"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":["airship","armada","helm","kubernetes","openstack","openstack-helm","operator","operator-framework"],"created_at":"2024-09-25T00:59:18.336Z","updated_at":"2026-01-02T18:03:25.031Z","avatar_url":"https://github.com/keleustes.png","language":"Go","readme":"# Kubernetes Operator for Armada and Helm\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## armada-operator code directory structure\n\n###  cmd\n\nContains the main.go for the armada 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.\nThis current version of the operator uses \"act\" for shortname of ArmadaChart,\n\"acg\" as shortname for ArmadaChartGroup and \"amf\" as shortname for ArmadaManifest.\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 armada controller.\n\n###  pkg/helm, pkg/helmv2 and pkg/helmv3\n\nTo get the process doing, some of the code for ArmadaChart handling is coming from the \noperator-sdk helm-operator. That code is relying on tiller component which is gone for Helm3.\nHence the three directory helm (Interface and Common code), helmv2 (tiller) and helmv3.\n\nThe golang package structure is different between helmv2 and helmv3. The Armada Operator will\nmost likely ultimatly have support two branches. In order to delay that milestone, the golang\ncode has been instrumentated with \"v2\" and \"v3\" tags which allows to compile either the\nhelm v3 version of the operator or the helm v3 version.\n\n###  pkg/armada directory\n\nMainly contain the code for ArmadaChartGroup, ArmadaManifest as will ArmadaBackupLocation handling\n\n###  pkg/controller directory\n\nContains the controller and the \"Reconcile\" functions for ArmadaChart, ArmadaChartGroup and ArmadaManifest.\nThere are currently three controllers (act-controller, acg-controller and amf-controller).\n\n# Code changes.\n\n## Adjusting the ArmadaOperator 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 armada-operator\n\nTo keep the directory tree ligthweight, the vendor directory is not checked in in the current repo.\nTODO: Since the operator is only using one git branch, the developer has to comment out the helmv2\nand add the helmv3 in Gopkg.toml if he wants to build the helmv3 version of the operator. This is still WIP.\n\n```bash\ndep ensure\n```\n\nTo build the v2 version\n```bash\nmake docker-build-v2\n```\n\nTo build the v3 version\n```bash\nmake docker-build-v3\n```\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 helm v2 version\n```bash\nmake install-v2\n```\n\nTo install the helm v3 version\n```bash\nmake install-v3\n```\n\n# Testing the armada-controller\n\n##  helm-charts/testchart directory\n\nFor testing purpose the current Docker file includes a dummy chart deliverd under armada-charts.\nThis removes the needs to access external chart repository which is also an aspect of helm changing from 2 to 3.\n\n## examples/armada\n\nIn that directory, the ArmadaChart are enabled by default and the charts\nare installed as soon as the ArmadaChart CRD are created.\n\n### Deployment\n\nUpon creation of the custom resource, the controller will\n- Deploy the Armada Manifest described in the CRD\n- Update status of the custom resources.\n- Add events to the custom resources.\n\n```bash\nkubectl create -f examples/armada\nkubectl describe amf/simple-armada\nkubectl get amf\nkubectl get acg\nkubectl get act\n```\n\n### Test controller reconcilation logic (for depending resources)\n\nUpon deletion of its depending resources, the controller will recreate it,\n\n```bash\nkubectl delete deployment.apps/blog-2-testchart\nkubectl get all\nkubectl describe act blog-2\n```\n\n### Test controller reconcilation logic (for CRD)\n\nWhen deleting the CRD, the corresponding Armada Manifest should be uninstalled.\n\n```bash\nkubectl delete -f simple/armada\n```\n\n## examples/stepbystep\n\nThis directory contains invidual act,acg and amf files which allow the \"step\" by \"step\" testing of the deployment.\n\n## examples/argo\n\nIn that directory, the ArmadaChart (act) are disabled by default and the charts not installed\nautomatically when the act CR are created.\nThis example assumes that the argo controller has been installed. When the \"argo worflow\"\nCR is created, the \"argo controller\" is waked up and it orchestrates the enablement of the ArmadaChart\naccording to the worflow.\n\nNote: You need to have argo installed in your cluster.\n\n```bash\nkubectl apply -f example/argo\n\narmadachart.armada.airshipit.org/blog-1 created\narmadachart.armada.airshipit.org/blog-2 created\nworkflow.argoproj.io/wf-blog-group created\n```\n\nThe first ArmadaChart is installed:\n\n```bash\nkubectl get all\n\npod/armada-operator-cbbc7d7f7-zxj5n     1/1     Running             0          60s\npod/blog-1-testchart-5dd8c474f4-26574   0/1     ContainerCreating   0          6s\npod/wf-blog-group-1193326311            0/1     Completed           0          8s\npod/wf-blog-group-2026876860            0/1     ContainerCreating   0          1s\npod/wf-blog-group-2432013970            0/1     Completed           0          4s\n\nNAME                       TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)    AGE\nservice/armada-operator    ClusterIP   10.98.2.253    \u003cnone\u003e        8383/TCP   57s\nservice/blog-1-testchart   ClusterIP   10.104.240.7   \u003cnone\u003e        80/TCP     6s\nservice/kubernetes         ClusterIP   10.96.0.1      \u003cnone\u003e        443/TCP    7m43s\n\nNAME                               READY   UP-TO-DATE   AVAILABLE   AGE\ndeployment.apps/armada-operator    1/1     1            1           60s\ndeployment.apps/blog-1-testchart   0/1     1            0           6s\n\nNAME                                          DESIRED   CURRENT   READY   AGE\nreplicaset.apps/armada-operator-cbbc7d7f7     1         1         1       60s\nreplicaset.apps/blog-1-testchart-5dd8c474f4   1         1         0       6s\n```\n\nLater both charts have been installed\n\n```bash\nNAME                                    READY   STATUS      RESTARTS   AGE\npod/armada-operator-cbbc7d7f7-zxj5n     1/1     Running     0          44m\npod/blog-1-testchart-5dd8c474f4-26574   1/1     Running     0          43m\npod/blog-2-testchart-57f86dd9c5-xmhd7   1/1     Running     0          43m\npod/wf-blog-group-1193326311            0/1     Completed   0          43m\npod/wf-blog-group-2026876860            0/1     Completed   0          43m\npod/wf-blog-group-2234690393            0/1     Completed   0          43m\npod/wf-blog-group-2432013970            0/1     Completed   0          43m\n\nNAME                       TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE\nservice/armada-operator    ClusterIP   10.98.2.253      \u003cnone\u003e        8383/TCP   44m\nservice/blog-1-testchart   ClusterIP   10.104.240.7     \u003cnone\u003e        80/TCP     43m\nservice/blog-2-testchart   ClusterIP   10.110.160.242   \u003cnone\u003e        80/TCP     43m\nservice/kubernetes         ClusterIP   10.96.0.1        \u003cnone\u003e        443/TCP    51m\n\nNAME                               READY   UP-TO-DATE   AVAILABLE   AGE\ndeployment.apps/armada-operator    1/1     1            1           44m\ndeployment.apps/blog-1-testchart   1/1     1            1           43m\ndeployment.apps/blog-2-testchart   1/1     1            1           43m\n\nNAME                                          DESIRED   CURRENT   READY   AGE\nreplicaset.apps/armada-operator-cbbc7d7f7     1         1         1       44m\nreplicaset.apps/blog-1-testchart-5dd8c474f4   1         1         1       43m\nreplicaset.apps/blog-2-testchart-57f86dd9c5   1         1         1       43m\n```\n\nargo is tracing the steps take to sequence the deployment of the charts:\n\n```bash\nargo get wf-blog-group\n\nName:                wf-blog-group\nNamespace:           default\nServiceAccount:      armada-argo-sa\nStatus:              Succeeded\nCreated:             Fri Mar 22 10:27:28 -0500 (26 seconds ago)\nStarted:             Fri Mar 22 10:27:28 -0500 (26 seconds ago)\nFinished:            Fri Mar 22 10:27:42 -0500 (12 seconds ago)\nDuration:            14 seconds\n\nSTEP                  PODNAME                   DURATION  MESSAGE\n ✔ wf-blog-group\n ├---✔ enable-blog-1  wf-blog-group-1193326311  2s\n ├---✔ blog-1-ready   wf-blog-group-2432013970  3s\n ├---✔ enable-blog-2  wf-blog-group-2026876860  3s\n └---✔ blog-2-ready   wf-blog-group-2234690393  3s\n ```\n\nWe can check the state of the ArmadaChart\n\n```bash\nkubectl get act\n\nNAME     STATE      TARGET STATE   SATISFIED\nblog-1   deployed   deployed       true\nblog-2   deployed   deployed       true\n```\n\nRun the cleanup\n```bash\n\nkubectl delete -f examples/argo\n```\n\n## examples/sequenced\n\nIn that directory, the ArmadaChart (act) are disabled by default and the charts not installed\nautomatically when the act CR are created.\nWhen the \"ArmadaChartGroup\" CR is created, the \"chartgroup controller\" receives an event and it\norchestrate the order of deployment/enablement of the ArmadaChart. The ArmadaChartGroup also\nbecomes owner of the ArmadaChart. \n\nThis is basically the same sequencing that above except that it is implemented using an\nArmadaChartGroup and an ArmadaManifest\n\n## examples/backup\n\nThis directory contains the CR definitions involved during an ArmadaBackup procedure.\n\n- WIP\n\n## examples/restore\n\nThis directory contains the CR definitions involved during an ArmadaRestore procedure.\n\n- WIP\n\n# Appendix\n\n[POCs](./pocs/README.md) contains additional notes regarding successful and failed attempts.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeleustes%2Farmada-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeleustes%2Farmada-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeleustes%2Farmada-operator/lists"}