Merge "ovn: implement Daemonset overrides"
This commit is contained in:
commit
6e5477e00a
@ -12,13 +12,15 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- if .Values.manifests.configmap_bin }}
|
{{- define "ovn.configmap.bin" }}
|
||||||
{{- $envAll := . }}
|
{{- $configMapName := index . 0 }}
|
||||||
|
{{- $envAll := index . 1 }}
|
||||||
|
{{- with $envAll }}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: ovn-bin
|
name: {{ $configMapName }}
|
||||||
data:
|
data:
|
||||||
{{- if .Values.images.local_registry.active }}
|
{{- if .Values.images.local_registry.active }}
|
||||||
image-repo-sync.sh: |
|
image-repo-sync.sh: |
|
||||||
@ -27,3 +29,8 @@ data:
|
|||||||
ovn-controller-init.sh: |
|
ovn-controller-init.sh: |
|
||||||
{{ tuple "bin/_ovn-controller-init.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
{{ tuple "bin/_ovn-controller-init.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.configmap_bin }}
|
||||||
|
{{- list "ovn-bin" . | include "ovn.configmap.bin" }}
|
||||||
|
{{- end }}
|
||||||
|
@ -21,12 +21,12 @@ exec:
|
|||||||
- ovn-controller
|
- ovn-controller
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Values.manifests.daemonset_ovn_controller }}
|
{{- define "ovn.daemonset" }}
|
||||||
{{- $envAll := . }}
|
{{- $daemonset := index . 0 }}
|
||||||
|
{{- $configMapName := index . 1 }}
|
||||||
{{- $configMapName := "ovn-etc" }}
|
{{- $serviceAccountName := index . 2 }}
|
||||||
{{- $serviceAccountName := "ovn-controller" }}
|
{{- $envAll := index . 3 }}
|
||||||
{{ tuple $envAll "ovn_controller" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
{{- with $envAll }}
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
@ -157,3 +157,45 @@ spec:
|
|||||||
- name: gw-enabled
|
- name: gw-enabled
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{- if .Values.manifests.daemonset_ovn_controller }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $daemonset := "controller" }}
|
||||||
|
{{- $configMapName := "ovn-etc" }}
|
||||||
|
{{- $serviceAccountName := "ovn-controller" }}
|
||||||
|
|
||||||
|
{{ tuple $envAll "ovn_controller" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
|
{{- $configmap_yaml := "ovn.configmap.etc" }}
|
||||||
|
|
||||||
|
{{/* Preffer using .Values.overrides rather than .Values.conf.overrides */}}
|
||||||
|
{{- list $daemonset "ovn.daemonset" $serviceAccountName $configmap_yaml $configMapName "ovn.configmap.bin" "ovn-bin" . | include "helm-toolkit.utils.daemonset_overrides_root" }}
|
||||||
|
|
||||||
|
{{- $serviceAccountNamespace := $envAll.Release.Namespace }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: ovn-controller-list-nodes-role-{{ $serviceAccountNamespace }}
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["nodes"]
|
||||||
|
verbs: ["list", "get"]
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: ovn-controller-list-nodes-rolebinding-{{ $serviceAccountNamespace }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ $serviceAccountName }}
|
||||||
|
namespace: {{ $serviceAccountNamespace }}
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: ovn-controller-list-nodes-role-{{ $serviceAccountNamespace }}
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
4
releasenotes/notes/ovn-3b9e82e5d469bc98.yaml
Normal file
4
releasenotes/notes/ovn-3b9e82e5d469bc98.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Implement daemonset overrides
|
||||||
|
...
|
Loading…
x
Reference in New Issue
Block a user