Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "openstack-hypervisor-operator.fullname" . }}-ha-service-role
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Quote the templated ClusterRole name to avoid YAML parse/lint failure.

Line 4 is parsed as invalid YAML by linters before Helm rendering.

Proposed fix
-  name: {{ include "openstack-hypervisor-operator.fullname" . }}-ha-service-role
+  name: '{{ include "openstack-hypervisor-operator.fullname" . }}-ha-service-role'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
name: {{ include "openstack-hypervisor-operator.fullname" . }}-ha-service-role
name: '{{ include "openstack-hypervisor-operator.fullname" . }}-ha-service-role'
🧰 Tools
🪛 YAMLlint (1.38.0)

[error] 4-4: syntax error: expected , but found ''

(syntax)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/openstack-hypervisor-operator/templates/ha-service-rbac.yaml` at line
4, The ClusterRole name using the Helm template include
"openstack-hypervisor-operator.fullname" (the value that produces "<include
...>-ha-service-role") must be quoted to avoid YAML parse/lint errors; update
the metadata name in ha-service-rbac.yaml (the resource that sets name: {{
include "openstack-hypervisor-operator.fullname" . }}-ha-service-role) to wrap
the entire templated expression in quotes so linters see a valid YAML string.

labels:
{{- include "openstack-hypervisor-operator.labels" . | nindent 4 }}
rules:
- apiGroups:
- kvm.cloud.sap
resources:
- hypervisors
verbs:
- get
- list
- watch
- update
- apiGroups:
- kvm.cloud.sap
resources:
- hypervisors/status
verbs:
- get
- update
7 changes: 0 additions & 7 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,6 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "Eviction")
os.Exit(1)
}
if err = (&controller.HypervisorInstanceHaController{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "HypervisorInstanceHa")
os.Exit(1)
}

if err = (&controller.HypervisorOffboardingReconciler{
Client: mgr.GetClient(),
Expand Down
160 changes: 0 additions & 160 deletions internal/controller/hypervisor_instance_ha_controller.go

This file was deleted.

Loading
Loading