mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 18:59:09 +00:00
Docs PR: https://github.com/netbirdio/docs/pull/457 Changes: * Split kubernetes-operator Chart to operator only chart (kubernetes-operator) and configuration chart (netbird-operator-config) * Remove delete validation webhooks for non-needed resources * Allow abandoning Groups when still linked to a resource for over a minute after deletion * Fix duplciate Network Resource retrying heavily * Fix SetupKey creation duplication * Skip deleting routing peer since deleting network automatically deletes it anyway
83 lines
2.1 KiB
YAML
83 lines
2.1 KiB
YAML
{{- if .Values.router.enabled }}
|
|
{{- if .Values.namespacedNetworks }}
|
|
{{ $defaults := .Values.router }}
|
|
{{ range $k, $v := .Values.router.namespaces }}
|
|
apiVersion: netbird.io/v1
|
|
kind: NBRoutingPeer
|
|
metadata:
|
|
finalizers:
|
|
- netbird.io/cleanup
|
|
labels:
|
|
app.kubernetes.io/component: operator
|
|
{{- include "netbird-operator-config.labels" $ | nindent 4 }}
|
|
name: router
|
|
namespace: {{ $k }}
|
|
{{ $spec := merge $defaults $v }}
|
|
{{- if or (or (or $spec.replicas $spec.resources) (or $spec.labels $spec.annotations)) (or $spec.nodeSelector $spec.tolerations) }}
|
|
spec:
|
|
{{- if $spec.replicas }}
|
|
replicas: {{ $spec.replicas }}
|
|
{{- end }}
|
|
{{- if $spec.resources }}
|
|
resources:
|
|
{{- toYaml $spec.resources | nindent 4 }}
|
|
{{- end }}
|
|
{{- if $spec.labels }}
|
|
labels:
|
|
{{- toYaml $spec.labels | nindent 4 }}
|
|
{{- end }}
|
|
{{- if $spec.annotations }}
|
|
annotations:
|
|
{{- toYaml $spec.annotations | nindent 4 }}
|
|
{{- end }}
|
|
{{- if $spec.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml $spec.nodeSelector | nindent 4 }}
|
|
{{- end }}
|
|
{{- if $spec.tolerations }}
|
|
tolerations:
|
|
{{- toYaml $spec.tolerations | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
---
|
|
{{- end }}
|
|
{{- else }}
|
|
{{- with .Values.router }}
|
|
apiVersion: netbird.io/v1
|
|
kind: NBRoutingPeer
|
|
metadata:
|
|
finalizers:
|
|
- netbird.io/cleanup
|
|
labels:
|
|
app.kubernetes.io/component: operator
|
|
{{- include "netbird-operator-config.labels" $ | nindent 4 }}
|
|
name: router
|
|
{{- if or (or (or .replicas .resources) (or .labels .annotations)) (or .nodeSelector .tolerations) }}
|
|
spec:
|
|
{{- if .replicas }}
|
|
replicas: {{ .replicas }}
|
|
{{- end }}
|
|
{{- if .resources }}
|
|
resources:
|
|
{{- toYaml .resources | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .labels }}
|
|
labels:
|
|
{{- toYaml .labels | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .annotations }}
|
|
annotations:
|
|
{{- toYaml .annotations | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml .nodeSelector | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .tolerations }}
|
|
tolerations:
|
|
{{- toYaml .tolerations | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }} |