Skip to content

Commit b4084cc

Browse files
committed
Run go-makefile-maker and helmify
1 parent 368e038 commit b4084cc

File tree

7 files changed

+28
-8
lines changed

7 files changed

+28
-8
lines changed

.golangci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ linters:
145145
enable-all: true
146146
nolintlint:
147147
require-specific: true
148+
modernize:
149+
disable:
150+
# omitzero requires removing omitempty tags in kubernetes api struct types which are nested, which is intepreted by controller-gen and breaks the CRDs.
151+
- omitzero
148152
perfsprint:
149153
# modernize generates nicer fix code
150154
concat-loop: false

charts/openstack-hypervisor-operator/templates/deployment.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ spec:
6060
}}
6161
securityContext: {{- toYaml .Values.controllerManager.manager.containerSecurityContext
6262
| nindent 10 }}
63+
nodeSelector: {{- toYaml .Values.controllerManager.nodeSelector | nindent 8 }}
6364
securityContext: {{- toYaml .Values.controllerManager.podSecurityContext | nindent
6465
8 }}
65-
serviceAccountName: {{ include "openstack-hypervisor-operator.fullname" . }}-controller-manager
66+
serviceAccountName: {{ include "openstack-hypervisor-operator.serviceAccountName"
67+
. }}
6668
terminationGracePeriodSeconds: 10
69+
tolerations: {{- toYaml .Values.controllerManager.tolerations | nindent 8 }}
70+
topologySpreadConstraints: {{- toYaml .Values.controllerManager.topologySpreadConstraints
71+
| nindent 8 }}

charts/openstack-hypervisor-operator/templates/leader-election-rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ roleRef:
4949
name: '{{ include "openstack-hypervisor-operator.fullname" . }}-leader-election-role'
5050
subjects:
5151
- kind: ServiceAccount
52-
name: '{{ include "openstack-hypervisor-operator.fullname" . }}-controller-manager'
52+
name: '{{ include "openstack-hypervisor-operator.serviceAccountName" . }}'
5353
namespace: '{{ .Release.Namespace }}'

charts/openstack-hypervisor-operator/templates/manager-rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,5 @@ roleRef:
9797
name: '{{ include "openstack-hypervisor-operator.fullname" . }}-manager-role'
9898
subjects:
9999
- kind: ServiceAccount
100-
name: '{{ include "openstack-hypervisor-operator.fullname" . }}-controller-manager'
100+
name: '{{ include "openstack-hypervisor-operator.serviceAccountName" . }}'
101101
namespace: '{{ .Release.Namespace }}'

charts/openstack-hypervisor-operator/templates/metrics-auth-rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ roleRef:
3030
name: '{{ include "openstack-hypervisor-operator.fullname" . }}-metrics-auth-role'
3131
subjects:
3232
- kind: ServiceAccount
33-
name: '{{ include "openstack-hypervisor-operator.fullname" . }}-controller-manager'
33+
name: '{{ include "openstack-hypervisor-operator.serviceAccountName" . }}'
3434
namespace: '{{ .Release.Namespace }}'
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
{{ if .Values.serviceAccount.create }}
12
apiVersion: v1
23
kind: ServiceAccount
34
metadata:
4-
name: {{ include "openstack-hypervisor-operator.fullname" . }}-controller-manager
5+
name: {{ include "openstack-hypervisor-operator.serviceAccountName" . }}
56
labels:
67
{{- include "openstack-hypervisor-operator.labels" . | nindent 4 }}
8+
{{- with .Values.serviceAccount.annotations }}
79
annotations:
8-
{{- toYaml .Values.controllerManager.serviceAccount.annotations | nindent 4 }}
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
12+
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
13+
{{- end }}

charts/openstack-hypervisor-operator/values.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ controllerManager:
2626
requests:
2727
cpu: 10m
2828
memory: 64Mi
29+
nodeSelector: {}
2930
podSecurityContext:
3031
runAsNonRoot: true
3132
replicas: 1
32-
serviceAccount:
33-
annotations: {}
33+
tolerations: []
34+
topologySpreadConstraints: []
3435
kubernetesClusterDomain: cluster.local
3536
metricsService:
3637
ports:
@@ -41,3 +42,8 @@ metricsService:
4142
type: ClusterIP
4243
secret:
4344
servicePassword: ""
45+
serviceAccount:
46+
annotations: {}
47+
automount: true
48+
create: true
49+
name: ""

0 commit comments

Comments
 (0)