{"id":19096498,"url":"https://github.com/sapcc/vcenter-operator","last_synced_at":"2025-04-30T14:13:37.569Z","repository":{"id":41954516,"uuid":"115526543","full_name":"sapcc/vcenter-operator","owner":"sapcc","description":"A kubernetes operator configuring templates derived from vcenters","archived":false,"fork":false,"pushed_at":"2025-03-25T16:11:49.000Z","size":179,"stargazers_count":5,"open_issues_count":11,"forks_count":2,"subscribers_count":52,"default_branch":"master","last_synced_at":"2025-03-30T16:46:47.814Z","etag":null,"topics":["kubernetes","openstack","vsphere"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/sapcc.png","metadata":{"files":{"readme":"README.rst","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":"2017-12-27T13:59:02.000Z","updated_at":"2025-03-13T12:46:36.000Z","dependencies_parsed_at":"2023-10-02T08:44:46.651Z","dependency_job_id":"0ccae07a-9c2e-4540-a130-68e53f8c6a08","html_url":"https://github.com/sapcc/vcenter-operator","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/sapcc%2Fvcenter-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fvcenter-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fvcenter-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fvcenter-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapcc","download_url":"https://codeload.github.com/sapcc/vcenter-operator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249514398,"owners_count":21284536,"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","openstack","vsphere"],"created_at":"2024-11-09T03:36:53.128Z","updated_at":"2025-04-18T15:33:36.958Z","avatar_url":"https://github.com/sapcc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"VCenter Operator\n=============\n\nThe `vcenter-operator` automatically configures and deploys cinder and nova-compute nodes corresponding to the discovered vCenters and clusters.\nIt follows the convention over configuration principle to keep the configuration to a minimum. It relies heavily on other k8s ConfigMaps and Secrets being deployed by `helm-charts/openstack \u003chttps://github.com/sapcc/helm-charts/tree/master/openstack\u003e`_  and should be best deployed with it.\nThe helm-chart for the `vcenter-operator` can be found `here \u003chttps://github.com/sapcc/helm-charts/tree/master/openstack/vcenter-operator\u003e`_.\n\n\nBrief Overview\n-------------------\n#. Initially retrieving information about the k8s cluster it runs on\n#. Polling the vCenters username and password from `vcenter-operator` k8s Secret\n#. Discovering vCenters via DNS (change detection via serials)\n#. Reading the VCenterTemplate Custom Resources from k8s to retrieve all/update templates that need rendering\n#. Re-/connecting to each vCenter and collecting information (ESXI cluster, storage, network)\n    #. Rendering the collected information via jinja2 templates\n    #. Creating a delta if old state exists\n    #. Finally deleted objects get removed, new or modified objects get applied in k8s cluster (server-side-apply)\n    \n#. Wait 10 seconds and start again from step 3.\n\n\nConfiguration\n-------------------\n\nSome basic configuration is however necessary. The `vcenter-operator` has to be deployed in a way that it allows it to deploy and modify resources within the configured target namespace.\nThe following values are required to be stored in a k8s Secret named `vcenter-operator` in the same namespace as the running pod, and expects the following values:\n\n\nnamespace\n    The namespace to deploy into\n\nusername\n    The username to use to log on the vCenter\n\npassword\n    A password used as a seed for the `master-password algorithm \u003chttps://masterpassword.app/masterpassword-algorithm.pdf\u003e`_ to generate long-form passwords specific for each vCenter discovered.\n\ntsig_key\n    A transaction signature key used to authenticate the communication with the DNS-service and retrieve DNS-messages\n\n\nConventions\n-------------------\n\nThe `vcenter-operator` relies on the following conventions:\n\n- The operator relies on having dns as a kubernetes service with the labels `component=mdns,type=backend`, and polls the DNS behind it.\n\n- When the domain can not be obtained via the kube config, it polls the last search domain of the `resolv.conf`.\n\n- Within that domain, the vCenter is expected to match `vc-[a-z]+-[0-9]+`.\n\n- The operator expects to be able to log on with username and the long form password derived by the given user and password for the fully-qualified domain name of the vCenter.\n\n- Within the vCenter, the name of the VSphere datacenter will be used as the availability-zone name (in lower-case) for each entity child.\n\n- Within a Datacenter, clusters prefixed with `production` will be used as compute nodes. The name of the compute-host will be the `nova-compute-\u003csuffix\u003e`, where `suffix` is whatever stands after `production` in the cluster-name.\n\n- Within that cluster, the nova storage will be derived by looking for mounted storage prefixed by `eph`. The longest common prefix will be used as a search pattern for the storage of the compute node.\n\n- The first Port-group within that cluster prefixed with `br-` will be used for the vm networking, and the suffix determines the physical name of the network.\n\n- A cluster prefixed with `storage` will cause the creation of a cinder nodes with the name `cinder-volume-vmware-\u003csuffix\u003e`. This is only provisional and should be replaced by one per datacenter.\n\n\nTesting\n-------------------\n\nThe `vcenter-operator` can be tested as follows:\n\n- Create a venv and install the dependencies in editable mode `pip install -e .`\n- Setup your environment to have access to the desired k8s cluster to test on\n- Run the operator in dry run mode `vcenter-operator --dry-run`\n- This will log the rendered templates and also test the apply functionality in dry-run mode\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fvcenter-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapcc%2Fvcenter-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fvcenter-operator/lists"}