diff --git a/api/bases/operator.openstack.org_openstacks.yaml b/api/bases/operator.openstack.org_openstacks.yaml index 69e727b234..fed0060b0e 100644 --- a/api/bases/operator.openstack.org_openstacks.yaml +++ b/api/bases/operator.openstack.org_openstacks.yaml @@ -136,7 +136,7 @@ spec: - manila - mariadb - neutron - - nova + - workloads - octavia - openstack-baremetal - ovn diff --git a/api/go.mod b/api/go.mod index bac8757a69..43a32f01be 100644 --- a/api/go.mod +++ b/api/go.mod @@ -119,6 +119,9 @@ require ( sigs.k8s.io/yaml v1.6.0 // indirect ) +// Temporarily point to fork for testing nova->workloads rename +replace github.com/openstack-k8s-operators/nova-operator/api => github.com/amartyasinha/nova-operator/api v0.0.0-20260825094446-8ca07beb350d + // mschuppert: map to latest commit from release-4.20 tag // must consistent within modules and service operators replace github.com/openshift/api => github.com/openshift/api v0.0.0-20260710141509-36dec0bfafe4 //allow-merging diff --git a/api/go.sum b/api/go.sum index b96e5df47b..5ddfaeb132 100644 --- a/api/go.sum +++ b/api/go.sum @@ -1,5 +1,7 @@ github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/amartyasinha/nova-operator/api v0.0.0-20260825094446-8ca07beb350d h1:zPo/7X5fNeqKl9EMCQ61CmqA52Z9fWTIxIDngJI4ghU= +github.com/amartyasinha/nova-operator/api v0.0.0-20260825094446-8ca07beb350d/go.mod h1:6Kk+XtByMkeQj7cKrRQxHsWFCHCyq1o0i4ls/niFBW4= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= @@ -164,8 +166,6 @@ github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20260815095432- github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20260815095432-ee0e4a46015e/go.mod h1:f3KPR3QM0jPbWGhXougv1BxnW+Bnc2vLE4TvBlYTLdo= github.com/openstack-k8s-operators/neutron-operator/api v0.6.1-0.20260815100037-cd2ac3283266 h1:JlEZxQLMck1GrXbYSX7BCZVWe2JGWVpLftG0/BX0DmM= github.com/openstack-k8s-operators/neutron-operator/api v0.6.1-0.20260815100037-cd2ac3283266/go.mod h1:MqaSkvkEeMCLR3/tVAPg8jlB7nJw2pHymfGJ9mNgjHg= -github.com/openstack-k8s-operators/nova-operator/api v0.6.1-0.20260814001024-80a63d2d555f h1:p71R2Iji6NPJHlJ9S0DeVqo58n+9GFgojheYIP/fYS4= -github.com/openstack-k8s-operators/nova-operator/api v0.6.1-0.20260814001024-80a63d2d555f/go.mod h1:/xrb6NvHRgj38XXz5RJjtqsrLBEgkaZ+6WTPpL5X3Rw= github.com/openstack-k8s-operators/octavia-operator/api v0.6.1-0.20260815074607-ebcbe88dc375 h1:A+BwSwm/oSOvBEbPz3tQwhi4ucvRceSBepk3tZ91STU= github.com/openstack-k8s-operators/octavia-operator/api v0.6.1-0.20260815074607-ebcbe88dc375/go.mod h1:BtUafbYGalxauqo4tRJRSDeas7OXWsPQgZLKR1JrXhc= github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.6.1-0.20260815053044-b1de07d3dec3 h1:Mrx9sDELzfO8JJEeeSbMdCWqdpG3SfY9ZTVlDLBklJ8= diff --git a/api/operator/v1beta1/openstack_types.go b/api/operator/v1beta1/openstack_types.go index 5c10b0bb67..37a73f82ff 100644 --- a/api/operator/v1beta1/openstack_types.go +++ b/api/operator/v1beta1/openstack_types.go @@ -39,7 +39,7 @@ const ( ManilaOperatorName = "manila" MariaDBOperatorName = "mariadb" NeutronOperatorName = "neutron" - NovaOperatorName = "nova" + NovaOperatorName = "workloads" OctaviaOperatorName = "octavia" OpenStackBaremetalOperatorName = "openstack-baremetal" OvnOperatorName = "ovn" @@ -184,7 +184,7 @@ type OpenStackSpec struct { type OperatorSpec struct { // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Enum:=openstack;barbican;cinder;designate;glance;heat;horizon;infra;ironic;keystone;manila;mariadb;neutron;nova;octavia;openstack-baremetal;ovn;swift;telemetry;test;watcher + // +kubebuilder:validation:Enum:=openstack;barbican;cinder;designate;glance;heat;horizon;infra;ironic;keystone;manila;mariadb;neutron;workloads;octavia;openstack-baremetal;ovn;swift;telemetry;test;watcher // Name of the service operators. Name string `json:"name"` diff --git a/bindata/crds/nova.openstack.org_novaapis.yaml b/bindata/crds/nova.openstack.org_novaapis.yaml index 97c8f3b9c9..2db2a9382b 100644 --- a/bindata/crds/nova.openstack.org_novaapis.yaml +++ b/bindata/crds/nova.openstack.org_novaapis.yaml @@ -508,7 +508,7 @@ spec: description: |- Secret is the name of the Secret instance containing password information for the nova-api service. This secret is expected to be - generated by the nova-operator based on the information passed to the + generated by the workloads-operator based on the information passed to the Nova CR. type: string serviceAccount: diff --git a/bindata/crds/nova.openstack.org_novacells.yaml b/bindata/crds/nova.openstack.org_novacells.yaml index 32f41354d7..b3b21fefc6 100644 --- a/bindata/crds/nova.openstack.org_novacells.yaml +++ b/bindata/crds/nova.openstack.org_novacells.yaml @@ -1562,7 +1562,7 @@ spec: description: |- Secret is the name of the Secret instance containing password information for the nova cell. This secret is expected to be - generated by the nova-operator based on the information passed to the + generated by the workloads-operator based on the information passed to the Nova CR. type: string serviceAccount: diff --git a/bindata/crds/nova.openstack.org_novacomputes.yaml b/bindata/crds/nova.openstack.org_novacomputes.yaml index c17282849e..b03ecff236 100644 --- a/bindata/crds/nova.openstack.org_novacomputes.yaml +++ b/bindata/crds/nova.openstack.org_novacomputes.yaml @@ -321,7 +321,7 @@ spec: description: |- Secret is the name of the Secret instance containing password information for the NovaCompute service. This secret is expected to be - generated by the nova-operator based on the information passed to the + generated by the workloads-operator based on the information passed to the Nova CR. type: string serviceAccount: diff --git a/bindata/crds/nova.openstack.org_novaconductors.yaml b/bindata/crds/nova.openstack.org_novaconductors.yaml index dbe2c26333..55f1f83c78 100644 --- a/bindata/crds/nova.openstack.org_novaconductors.yaml +++ b/bindata/crds/nova.openstack.org_novaconductors.yaml @@ -363,7 +363,7 @@ spec: description: |- Secret is the name of the Secret instance containing password information for the nova-conductor service. This secret is expected to - be generated by the nova-operator based on the information passed to the + be generated by the workloads-operator based on the information passed to the Nova CR. type: string serviceAccount: diff --git a/bindata/crds/nova.openstack.org_novametadata.yaml b/bindata/crds/nova.openstack.org_novametadata.yaml index bc7483528e..a7435d251a 100644 --- a/bindata/crds/nova.openstack.org_novametadata.yaml +++ b/bindata/crds/nova.openstack.org_novametadata.yaml @@ -504,7 +504,7 @@ spec: description: |- Secret is the name of the Secret instance containing password information for the nova-conductor service. This secret is expected to - be generated by the nova-operator based on the information passed to the + be generated by the workloads-operator based on the information passed to the Nova CR. type: string serviceAccount: diff --git a/bindata/crds/nova.openstack.org_novanovncproxies.yaml b/bindata/crds/nova.openstack.org_novanovncproxies.yaml index d2240a56e0..f47688b8dc 100644 --- a/bindata/crds/nova.openstack.org_novanovncproxies.yaml +++ b/bindata/crds/nova.openstack.org_novanovncproxies.yaml @@ -469,7 +469,7 @@ spec: description: |- Secret is the name of the Secret instance containing password information for the nova-novncproxy service. This secret is expected to - be generated by the nova-operator based on the information passed to the + be generated by the workloads-operator based on the information passed to the Nova CR. type: string serviceAccount: diff --git a/bindata/crds/nova.openstack.org_novaschedulers.yaml b/bindata/crds/nova.openstack.org_novaschedulers.yaml index 0391dd22fa..7e5ab88b05 100644 --- a/bindata/crds/nova.openstack.org_novaschedulers.yaml +++ b/bindata/crds/nova.openstack.org_novaschedulers.yaml @@ -337,7 +337,7 @@ spec: description: |- Secret is the name of the Secret instance containing password information for the nova-scheduler service. This secret is expected to - be generated by the nova-operator based on the information passed to the + be generated by the workloads-operator based on the information passed to the Nova CR. type: string serviceAccount: diff --git a/bindata/services/nova-operator-services.yaml b/bindata/services/workloads-operator-services.yaml similarity index 65% rename from bindata/services/nova-operator-services.yaml rename to bindata/services/workloads-operator-services.yaml index c312e63527..ab1fe671d9 100644 --- a/bindata/services/nova-operator-services.yaml +++ b/bindata/services/workloads-operator-services.yaml @@ -10,8 +10,8 @@ metadata: app.kubernetes.io/instance: selfsigned-issuer app.kubernetes.io/managed-by: kustomize app.kubernetes.io/name: issuer - app.kubernetes.io/part-of: nova-operator - name: nova-operator-selfsigned-issuer + app.kubernetes.io/part-of: workloads-operator + name: workloads-operator-selfsigned-issuer namespace: '{{ .OperatorNamespace }}' spec: selfSigned: {} @@ -20,9 +20,9 @@ apiVersion: v1 kind: Service metadata: labels: - app.kubernetes.io/name: nova-operator + app.kubernetes.io/name: workloads-operator control-plane: controller-manager - name: nova-operator-controller-manager-metrics-service + name: workloads-operator-controller-manager-metrics-service namespace: '{{ .OperatorNamespace }}' spec: ports: @@ -31,7 +31,7 @@ spec: protocol: TCP targetPort: 8443 selector: - app.kubernetes.io/name: nova-operator + app.kubernetes.io/name: workloads-operator control-plane: controller-manager --- apiVersion: cert-manager.io/v1 @@ -42,17 +42,17 @@ metadata: app.kubernetes.io/created-by: openstack-operator app.kubernetes.io/instance: metrics-certs app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: nova-operator - name: nova-operator-metrics-certs + app.kubernetes.io/name: workloads-operator + name: workloads-operator-metrics-certs namespace: '{{ .OperatorNamespace }}' spec: dnsNames: - - nova-operator-metrics-service.{{ .OperatorNamespace }}.svc - - nova-operator-metrics-service.{{ .OperatorNamespace }}.svc.cluster.local + - workloads-operator-metrics-service.{{ .OperatorNamespace }}.svc + - workloads-operator-metrics-service.{{ .OperatorNamespace }}.svc.cluster.local issuerRef: kind: Issuer - name: nova-operator-selfsigned-issuer + name: workloads-operator-selfsigned-issuer privateKey: algorithm: ECDSA size: 256 - secretName: nova-operator-metrics-server-cert + secretName: workloads-operator-metrics-server-cert diff --git a/config/crd/bases/operator.openstack.org_openstacks.yaml b/config/crd/bases/operator.openstack.org_openstacks.yaml index 69e727b234..fed0060b0e 100644 --- a/config/crd/bases/operator.openstack.org_openstacks.yaml +++ b/config/crd/bases/operator.openstack.org_openstacks.yaml @@ -136,7 +136,7 @@ spec: - manila - mariadb - neutron - - nova + - workloads - octavia - openstack-baremetal - ovn diff --git a/config/operator/bundle-rbac/nova-operator-leader-election-role.yaml b/config/operator/bundle-rbac/workloads-operator-leader-election-role.yaml similarity index 91% rename from config/operator/bundle-rbac/nova-operator-leader-election-role.yaml rename to config/operator/bundle-rbac/workloads-operator-leader-election-role.yaml index 10ca45a330..6d6133a59f 100644 --- a/config/operator/bundle-rbac/nova-operator-leader-election-role.yaml +++ b/config/operator/bundle-rbac/workloads-operator-leader-election-role.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: nova-operator-leader-election-role + name: workloads-operator-leader-election-role rules: - apiGroups: - "" diff --git a/config/operator/bundle-rbac/nova-operator-leader-election-rolebinding.yaml b/config/operator/bundle-rbac/workloads-operator-leader-election-rolebinding.yaml similarity index 60% rename from config/operator/bundle-rbac/nova-operator-leader-election-rolebinding.yaml rename to config/operator/bundle-rbac/workloads-operator-leader-election-rolebinding.yaml index 95022d65d0..171a0c0e95 100644 --- a/config/operator/bundle-rbac/nova-operator-leader-election-rolebinding.yaml +++ b/config/operator/bundle-rbac/workloads-operator-leader-election-rolebinding.yaml @@ -2,11 +2,11 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: nova-operator-leader-election-rolebinding + name: workloads-operator-leader-election-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: nova-operator-leader-election-role + name: workloads-operator-leader-election-role subjects: - kind: ServiceAccount - name: nova-operator-controller-manager + name: workloads-operator-controller-manager diff --git a/config/operator/bundle-rbac/nova-operator-manager-role.yaml b/config/operator/bundle-rbac/workloads-operator-manager-role.yaml similarity index 96% rename from config/operator/bundle-rbac/nova-operator-manager-role.yaml rename to config/operator/bundle-rbac/workloads-operator-manager-role.yaml index 59e9981c11..4edca57711 100644 --- a/config/operator/bundle-rbac/nova-operator-manager-role.yaml +++ b/config/operator/bundle-rbac/workloads-operator-manager-role.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: nova-operator-manager-role + name: workloads-operator-manager-role rules: - apiGroups: - "" @@ -280,6 +280,14 @@ rules: - securitycontextconstraints verbs: - use +- apiGroups: + - security.openshift.io + resourceNames: + - nonroot-v2 + resources: + - securitycontextconstraints + verbs: + - use - apiGroups: - topology.openstack.org resources: diff --git a/config/operator/bundle-rbac/nova-operator-manager-rolebinding.yaml b/config/operator/bundle-rbac/workloads-operator-manager-rolebinding.yaml similarity index 67% rename from config/operator/bundle-rbac/nova-operator-manager-rolebinding.yaml rename to config/operator/bundle-rbac/workloads-operator-manager-rolebinding.yaml index a012588e51..b70846c3f4 100644 --- a/config/operator/bundle-rbac/nova-operator-manager-rolebinding.yaml +++ b/config/operator/bundle-rbac/workloads-operator-manager-rolebinding.yaml @@ -2,12 +2,12 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: nova-operator-manager-rolebinding + name: workloads-operator-manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: nova-operator-manager-role + name: workloads-operator-manager-role subjects: - kind: ServiceAccount - name: nova-operator-controller-manager + name: workloads-operator-controller-manager namespace: openstack-operators diff --git a/config/operator/bundle-rbac/nova-operator-metrics-auth-role.yaml b/config/operator/bundle-rbac/workloads-operator-metrics-auth-role.yaml similarity index 85% rename from config/operator/bundle-rbac/nova-operator-metrics-auth-role.yaml rename to config/operator/bundle-rbac/workloads-operator-metrics-auth-role.yaml index 85ecb5ca48..5da28bd638 100644 --- a/config/operator/bundle-rbac/nova-operator-metrics-auth-role.yaml +++ b/config/operator/bundle-rbac/workloads-operator-metrics-auth-role.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: nova-operator-operator-metrics-auth-role + name: workloads-operator-operator-metrics-auth-role rules: - apiGroups: - authentication.k8s.io diff --git a/config/operator/bundle-rbac/nova-operator-metrics-auth-rolebinding.yaml b/config/operator/bundle-rbac/workloads-operator-metrics-auth-rolebinding.yaml similarity index 62% rename from config/operator/bundle-rbac/nova-operator-metrics-auth-rolebinding.yaml rename to config/operator/bundle-rbac/workloads-operator-metrics-auth-rolebinding.yaml index f935ec578c..3fe151bef1 100644 --- a/config/operator/bundle-rbac/nova-operator-metrics-auth-rolebinding.yaml +++ b/config/operator/bundle-rbac/workloads-operator-metrics-auth-rolebinding.yaml @@ -2,12 +2,12 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: nova-operator-operator-metrics-auth-rolebinding + name: workloads-operator-operator-metrics-auth-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: nova-operator-operator-metrics-auth-role + name: workloads-operator-operator-metrics-auth-role subjects: - kind: ServiceAccount - name: nova-operator-operator-controller-manager + name: workloads-operator-operator-controller-manager namespace: openstack-operators diff --git a/config/operator/bundle-rbac/nova-operator-metrics-reader.yaml b/config/operator/bundle-rbac/workloads-operator-metrics-reader.yaml similarity index 79% rename from config/operator/bundle-rbac/nova-operator-metrics-reader.yaml rename to config/operator/bundle-rbac/workloads-operator-metrics-reader.yaml index d1ac90da9f..6b4b45b033 100644 --- a/config/operator/bundle-rbac/nova-operator-metrics-reader.yaml +++ b/config/operator/bundle-rbac/workloads-operator-metrics-reader.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: nova-operator-operator-metrics-reader + name: workloads-operator-operator-metrics-reader rules: - nonResourceURLs: - /metrics diff --git a/config/operator/bundle-rbac/nova-operator-serviceaccount.yaml b/config/operator/bundle-rbac/workloads-operator-serviceaccount.yaml similarity index 71% rename from config/operator/bundle-rbac/nova-operator-serviceaccount.yaml rename to config/operator/bundle-rbac/workloads-operator-serviceaccount.yaml index d9db32a4dd..d075c5182a 100644 --- a/config/operator/bundle-rbac/nova-operator-serviceaccount.yaml +++ b/config/operator/bundle-rbac/workloads-operator-serviceaccount.yaml @@ -2,4 +2,4 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: nova-operator-controller-manager + name: workloads-operator-controller-manager diff --git a/config/operator/deployment/kustomization.yaml b/config/operator/deployment/kustomization.yaml index 6196d7818a..dc87b41063 100644 --- a/config/operator/deployment/kustomization.yaml +++ b/config/operator/deployment/kustomization.yaml @@ -16,7 +16,7 @@ images: newTag: latest patches: - patch: '[{"op": "replace", "path": "/spec/template/spec/containers/0/env/0", "value": - {"name": "OPENSTACK_RELEASE_VERSION", "value": "0.7.0-1784642723"}}]' + {"name": "OPENSTACK_RELEASE_VERSION", "value": "19.0.0-1787651873"}}]' target: kind: Deployment name: openstack-operator-controller-init diff --git a/config/operator/manager_operator_images.yaml b/config/operator/manager_operator_images.yaml index bc2b51263e..a1450f53f3 100644 --- a/config/operator/manager_operator_images.yaml +++ b/config/operator/manager_operator_images.yaml @@ -37,8 +37,8 @@ spec: value: quay.io/openstack-k8s-operators/mariadb-operator@sha256:68c13707abfb5bc4bdac0e3fd20979c59c940ac8aaaab5c7b11a472d7243379e - name: RELATED_IMAGE_NEUTRON_OPERATOR_MANAGER_IMAGE_URL value: quay.io/openstack-k8s-operators/neutron-operator@sha256:299c0d38979676b5348977d65f0b0244df983d2ddad91e8f8f7939316ed3bc31 - - name: RELATED_IMAGE_NOVA_OPERATOR_MANAGER_IMAGE_URL - value: quay.io/openstack-k8s-operators/nova-operator@sha256:d52b8ade84ba1aaa61a38dc3b72a1a63b1812a095206511b4f5f829bc403b7cc + - name: RELATED_IMAGE_WORKLOADS_OPERATOR_MANAGER_IMAGE_URL + value: quay.io/amartyasinha/workloads-operator@sha256:b152cc0dc8cc135fb7ce9c7d11a4ac5149275a03d1fe43d2916716595e22c585 - name: RELATED_IMAGE_OCTAVIA_OPERATOR_MANAGER_IMAGE_URL value: quay.io/openstack-k8s-operators/octavia-operator@sha256:286a7a19ed07bef549a5e434460207067095a665e0762b2a3e2ff88345ffe68b - name: RELATED_IMAGE_OPENSTACK_BAREMETAL_OPERATOR_MANAGER_IMAGE_URL diff --git a/docs/assemblies/ctlplane_resources.adoc b/docs/assemblies/ctlplane_resources.adoc index 5979fcd349..7c40fce41f 100644 --- a/docs/assemblies/ctlplane_resources.adoc +++ b/docs/assemblies/ctlplane_resources.adoc @@ -11388,7 +11388,7 @@ NovaAPISpec defines the desired state of NovaAPI | true | secret -| Secret is the name of the Secret instance containing password information for the nova-api service. This secret is expected to be generated by the nova-operator based on the information passed to the Nova CR. +| Secret is the name of the Secret instance containing password information for the nova-api service. This secret is expected to be generated by the workloads-operator based on the information passed to the Nova CR. | string | true @@ -11649,7 +11649,7 @@ NovaCellSpec defines the desired state of NovaCell | true | secret -| Secret is the name of the Secret instance containing password information for the nova cell. This secret is expected to be generated by the nova-operator based on the information passed to the Nova CR. +| Secret is the name of the Secret instance containing password information for the nova cell. This secret is expected to be generated by the workloads-operator based on the information passed to the Nova CR. | string | true @@ -11945,7 +11945,7 @@ NovaComputeSpec defines the desired state of NovaCompute | true | secret -| Secret is the name of the Secret instance containing password information for the NovaCompute service. This secret is expected to be generated by the nova-operator based on the information passed to the Nova CR. +| Secret is the name of the Secret instance containing password information for the NovaCompute service. This secret is expected to be generated by the workloads-operator based on the information passed to the Nova CR. | string | true @@ -12135,7 +12135,7 @@ NovaConductorSpec defines the desired state of NovaConductor | true | secret -| Secret is the name of the Secret instance containing password information for the nova-conductor service. This secret is expected to be generated by the nova-operator based on the information passed to the Nova CR. +| Secret is the name of the Secret instance containing password information for the nova-conductor service. This secret is expected to be generated by the workloads-operator based on the information passed to the Nova CR. | string | true @@ -12361,7 +12361,7 @@ NovaMetadataSpec defines the desired state of NovaMetadata | true | secret -| Secret is the name of the Secret instance containing password information for the nova-conductor service. This secret is expected to be generated by the nova-operator based on the information passed to the Nova CR. +| Secret is the name of the Secret instance containing password information for the nova-conductor service. This secret is expected to be generated by the workloads-operator based on the information passed to the Nova CR. | string | true @@ -12591,7 +12591,7 @@ NovaNoVNCProxySpec defines the desired state of NovaNoVNCProxy | true | secret -| Secret is the name of the Secret instance containing password information for the nova-novncproxy service. This secret is expected to be generated by the nova-operator based on the information passed to the Nova CR. +| Secret is the name of the Secret instance containing password information for the nova-novncproxy service. This secret is expected to be generated by the workloads-operator based on the information passed to the Nova CR. | string | true @@ -12828,7 +12828,7 @@ NovaSchedulerSpec defines the desired state of NovaScheduler | Field | Description | Scheme | Required | secret -| Secret is the name of the Secret instance containing password information for the nova-scheduler service. This secret is expected to be generated by the nova-operator based on the information passed to the Nova CR. +| Secret is the name of the Secret instance containing password information for the nova-scheduler service. This secret is expected to be generated by the workloads-operator based on the information passed to the Nova CR. | string | true diff --git a/docs/build_docs.sh b/docs/build_docs.sh index 18e3b843d0..d444e789a9 100755 --- a/docs/build_docs.sh +++ b/docs/build_docs.sh @@ -15,7 +15,7 @@ DATAPLANE_PATHS=( "api/dataplane/v1beta1/common.go" ) -# Getting APIs from Services (use find to support multi-group operators like nova-operator) +# Getting APIs from Services (use find to support multi-group operators like workloads-operator) SERVICE_PATH=($(MODCACHE=$(go env GOMODCACHE) awk '/openstack-k8s-operators/ && ! /lib-common/ && ! /openstack-operator/ && ! /infra/ && ! /replace/ {print ENVIRON["MODCACHE"] "/" $1 "@" $2}' api/go.mod)) for SERVICE in ${SERVICE_PATH[@]};do CTLPLANE_PATHS+=($(find ${SERVICE} -path "*/v1beta1/*_types.go")) diff --git a/go.mod b/go.mod index f34a590d2f..21fbce7880 100644 --- a/go.mod +++ b/go.mod @@ -156,6 +156,9 @@ require ( replace github.com/openstack-k8s-operators/openstack-operator/api => ./api //allow-merging +// Temporarily point to fork for testing nova->workloads rename +replace github.com/openstack-k8s-operators/nova-operator/api => github.com/amartyasinha/nova-operator/api v0.0.0-20260825094446-8ca07beb350d + // mschuppert: map to latest commit from release-4.20 tag // must consistent within modules and service operators replace github.com/openshift/api => github.com/openshift/api v0.0.0-20260710141509-36dec0bfafe4 //allow-merging diff --git a/go.sum b/go.sum index 0072a3ee92..cfe331e77a 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,8 @@ cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4= cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/amartyasinha/nova-operator/api v0.0.0-20260825094446-8ca07beb350d h1:zPo/7X5fNeqKl9EMCQ61CmqA52Z9fWTIxIDngJI4ghU= +github.com/amartyasinha/nova-operator/api v0.0.0-20260825094446-8ca07beb350d/go.mod h1:6Kk+XtByMkeQj7cKrRQxHsWFCHCyq1o0i4ls/niFBW4= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -194,8 +196,6 @@ github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20260815095432- github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20260815095432-ee0e4a46015e/go.mod h1:f3KPR3QM0jPbWGhXougv1BxnW+Bnc2vLE4TvBlYTLdo= github.com/openstack-k8s-operators/neutron-operator/api v0.6.1-0.20260815100037-cd2ac3283266 h1:JlEZxQLMck1GrXbYSX7BCZVWe2JGWVpLftG0/BX0DmM= github.com/openstack-k8s-operators/neutron-operator/api v0.6.1-0.20260815100037-cd2ac3283266/go.mod h1:MqaSkvkEeMCLR3/tVAPg8jlB7nJw2pHymfGJ9mNgjHg= -github.com/openstack-k8s-operators/nova-operator/api v0.6.1-0.20260814001024-80a63d2d555f h1:p71R2Iji6NPJHlJ9S0DeVqo58n+9GFgojheYIP/fYS4= -github.com/openstack-k8s-operators/nova-operator/api v0.6.1-0.20260814001024-80a63d2d555f/go.mod h1:/xrb6NvHRgj38XXz5RJjtqsrLBEgkaZ+6WTPpL5X3Rw= github.com/openstack-k8s-operators/octavia-operator/api v0.6.1-0.20260815074607-ebcbe88dc375 h1:A+BwSwm/oSOvBEbPz3tQwhi4ucvRceSBepk3tZ91STU= github.com/openstack-k8s-operators/octavia-operator/api v0.6.1-0.20260815074607-ebcbe88dc375/go.mod h1:BtUafbYGalxauqo4tRJRSDeas7OXWsPQgZLKR1JrXhc= github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.6.1-0.20260815053044-b1de07d3dec3 h1:Mrx9sDELzfO8JJEeeSbMdCWqdpG3SfY9ZTVlDLBklJ8= diff --git a/hack/export_operator_related_images.sh b/hack/export_operator_related_images.sh index 2362380341..5778fe777c 100644 --- a/hack/export_operator_related_images.sh +++ b/hack/export_operator_related_images.sh @@ -12,7 +12,7 @@ export RELATED_IMAGE_KEYSTONE_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-o export RELATED_IMAGE_MANILA_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/manila-operator@sha256:d3f293155e7d53f9ea983c3b3c4826f2aafa8bc3875416db4a86b77e3e88979f export RELATED_IMAGE_MARIADB_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/mariadb-operator@sha256:68c13707abfb5bc4bdac0e3fd20979c59c940ac8aaaab5c7b11a472d7243379e export RELATED_IMAGE_NEUTRON_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/neutron-operator@sha256:299c0d38979676b5348977d65f0b0244df983d2ddad91e8f8f7939316ed3bc31 -export RELATED_IMAGE_NOVA_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/nova-operator@sha256:d52b8ade84ba1aaa61a38dc3b72a1a63b1812a095206511b4f5f829bc403b7cc +export RELATED_IMAGE_WORKLOADS_OPERATOR_MANAGER_IMAGE_URL=quay.io/amartyasinha/workloads-operator@sha256:b152cc0dc8cc135fb7ce9c7d11a4ac5149275a03d1fe43d2916716595e22c585 export RELATED_IMAGE_OCTAVIA_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/octavia-operator@sha256:286a7a19ed07bef549a5e434460207067095a665e0762b2a3e2ff88345ffe68b export RELATED_IMAGE_OPENSTACK_BAREMETAL_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/openstack-baremetal-operator@sha256:41806556b53c0af7fe79c0abb8433273a78f4a2a618cf6dafaea89c5b2c80be8 export RELATED_IMAGE_OVN_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/ovn-operator@sha256:adae9b33ab4a73c20a52b675f7fc1a3eb9089b4b27f719c68540102a6d214ac9 diff --git a/internal/controller/operator/openstack_controller.go b/internal/controller/operator/openstack_controller.go index 39536f1c2c..19c986af31 100644 --- a/internal/controller/operator/openstack_controller.go +++ b/internal/controller/operator/openstack_controller.go @@ -263,6 +263,11 @@ func (r *OpenStackReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( Log.Error(err, "Failed to cleanup placement-operator resources") } + // cleanup nova-operator (renamed to workloads-operator) + if err := r.cleanupNovaOperator(ctx, instance); err != nil { + Log.Error(err, "Failed to cleanup nova-operator resources") + } + // Check if OPENSTACK_RELEASE_VERSION has changed - if so, delete all owned resources // This is a one-time fix to handle incompatible upgrades shouldReinstall := false @@ -1246,7 +1251,7 @@ func (r *OpenStackReconciler) cleanupRabbitMQClusterOperator(ctx context.Context // cleanupPlacementOperator removes the old placement-operator // resources that are no longer needed since Placement is now managed -// by the nova-operator. +// by the workloads-operator. func (r *OpenStackReconciler) cleanupPlacementOperator(ctx context.Context, instance *operatorv1beta1.OpenStack) error { Log := r.GetLogger(ctx) @@ -1285,8 +1290,54 @@ func (r *OpenStackReconciler) cleanupPlacementOperator(ctx context.Context, inst // resource names. // PlacementAPI CRD is NOT deleted because it is now owned and managed - // by the nova-operator. PlacementAPI instances are expected to continue - // existing under nova-operator management. + // by the workloads-operator. PlacementAPI instances are expected to continue + // existing under workloads-operator management. + + return nil +} + +// cleanupNovaOperator removes the old nova-operator +// resources that are no longer needed since the operator has been renamed +// to workloads-operator. +func (r *OpenStackReconciler) cleanupNovaOperator(ctx context.Context, instance *operatorv1beta1.OpenStack) error { + Log := r.GetLogger(ctx) + + // Namespaced resources (scoped to the OpenStack CR namespace only) + namespacedResources := []struct { + gvk schema.GroupVersionKind + name string + }{ + {schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "Deployment"}, "nova-operator-controller-manager"}, + {schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ServiceAccount"}, "nova-operator-controller-manager"}, + {schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Service"}, "nova-operator-controller-manager-metrics-service"}, + {schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "Role"}, "nova-operator-leader-election-role"}, + {schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBinding"}, "nova-operator-leader-election-rolebinding"}, + {schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1", Kind: "Issuer"}, "nova-operator-selfsigned-issuer"}, + {schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1", Kind: "Certificate"}, "nova-operator-metrics-certs"}, + } + + for _, res := range namespacedResources { + obj := &uns.Unstructured{} + obj.SetGroupVersionKind(res.gvk) + obj.SetName(res.name) + obj.SetNamespace(instance.Namespace) + if err := r.Delete(ctx, obj); err != nil { + if !apierrors.IsNotFound(err) { + return fmt.Errorf("failed to delete %s %s: %w", res.gvk.Kind, res.name, err) + } + } else { + Log.Info("Deleted nova-operator resource", "kind", res.gvk.Kind, "name", res.name) + } + } + + // Cluster-scoped RBAC (ClusterRoles, ClusterRoleBindings) is left in + // place intentionally. Without a running operator and ServiceAccount + // they are inert, and deleting them could break a user-installed + // nova-operator in another namespace that shares the same resource names. + + // Nova/Placement/Cyborg CRDs are NOT deleted because they are now owned + // and managed by the workloads-operator. Instances are expected to continue + // existing under workloads-operator management. return nil } diff --git a/internal/openstack/nova.go b/internal/openstack/nova.go index c6c6b00624..92b777346a 100644 --- a/internal/openstack/nova.go +++ b/internal/openstack/nova.go @@ -409,14 +409,14 @@ func ReconcileNova(ctx context.Context, instance *corev1beta1.OpenStackControlPl op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), nova, func() error { // 1) // Nova.Spec.APIDatabaseInstance and each NovaCell.CellDatabaseInstance - // are defaulted to "openstack" in nova-operator and the MariaDB created + // are defaulted to "openstack" in workloads-operator and the MariaDB created // by openstack-operator is also named "openstack". This works but // in production we might want to have separate DB service instances // per cell. // // 2) // Each NovaCell.CellMessageBusInstance in defaulted to "rabbitmq" by - // nova-operator and openstack-operator creates RabbitMQCluster named + // workloads-operator and openstack-operator creates RabbitMQCluster named // "rabbitmq" as well. This will not work as sharing rabbitmq // between cells will prevent the nova-computes to register itself // for the proper cell. Basically each cell will be merged to one,