The kubeovn-plunger controller-runtime cache attempted cluster-wide list/watch on Deployments and Pods, which the namespace-scoped Role cannot satisfy. Additionally, the deployments rule relied on resourceNames, which does not restrict list/watch verbs and left the permission effectively unusable. Scope the manager cache to the kube-ovn namespace so list/watch hit the namespaced API, and drop resourceNames from the deployments rule. Wire --kube-ovn-namespace and --ovn-central-name through the Deployment so values are actually consumed. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
36 lines
1,016 B
YAML
36 lines
1,016 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: kube-ovn-plunger
|
|
labels:
|
|
app.kubernetes.io/name: kube-ovn-plunger
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: kube-ovn-plunger
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: kube-ovn-plunger
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
spec:
|
|
serviceAccountName: kube-ovn-plunger
|
|
containers:
|
|
- name: kube-ovn-plunger
|
|
image: "{{ .Values.image }}"
|
|
args:
|
|
{{- if .Values.debug }}
|
|
- --zap-log-level=debug
|
|
{{- else }}
|
|
- --zap-log-level=info
|
|
{{- end }}
|
|
- --metrics-bind-address=:8080
|
|
- --metrics-secure=false
|
|
- --kube-ovn-namespace={{ .Release.Namespace }}
|
|
- --ovn-central-name={{ .Values.ovnCentralName }}
|
|
ports:
|
|
- name: metrics
|
|
containerPort: 8080
|