Template the annotations in all resources

This commit is contained in:
M. Mert Yildiran 2023-06-27 03:45:47 +03:00
parent 2d625eccaa
commit 16f1e116c0
No known key found for this signature in database
GPG Key ID: DA5D6DCBB758A461
14 changed files with 50 additions and 0 deletions

View File

@ -111,6 +111,7 @@ type TapConfig struct {
PacketCapture string `yaml:"packetcapture" json:"packetcapture" default:"libpcap"`
IgnoreTainted bool `yaml:"ignoretainted" json:"ignoretainted" default:"false"`
Labels map[string]string `yaml:"labels" json:"labels" default:"{}"`
Annotations map[string]string `yaml:"annotations" json:"annotations" default:"{}"`
NodeSelectorTerms []v1.NodeSelectorTerm `yaml:"nodeselectorterms" json:"nodeselectorterms" default:"[]"`
Ingress IngressConfig `yaml:"ingress" json:"ingress"`
Debug bool `yaml:"debug" json:"debug" default:"false"`

View File

@ -7,6 +7,10 @@ metadata:
{{- if .Values.tap.labels }}
{{- toYaml .Values.tap.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.tap.annotations }}
{{- toYaml .Values.tap.annotations | nindent 4 }}
{{- end }}
name: {{ .Values.tap.selfnamespace }}
spec: {}
status: {}

View File

@ -7,5 +7,9 @@ metadata:
{{- if .Values.tap.labels }}
{{- toYaml .Values.tap.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.tap.annotations }}
{{- toYaml .Values.tap.annotations | nindent 4 }}
{{- end }}
name: kubeshark-service-account
namespace: {{ .Values.tap.selfnamespace }}

View File

@ -7,6 +7,10 @@ metadata:
{{- if .Values.tap.labels }}
{{- toYaml .Values.tap.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.tap.annotations }}
{{- toYaml .Values.tap.annotations | nindent 4 }}
{{- end }}
name: kubeshark-cluster-role
namespace: {{ .Values.tap.selfnamespace }}
rules:

View File

@ -7,6 +7,10 @@ metadata:
{{- if .Values.tap.labels }}
{{- toYaml .Values.tap.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.tap.annotations }}
{{- toYaml .Values.tap.annotations | nindent 4 }}
{{- end }}
name: kubeshark-cluster-role-binding
namespace: {{ .Values.tap.selfnamespace }}
roleRef:

View File

@ -8,6 +8,10 @@ metadata:
{{- if .Values.tap.labels }}
{{- toYaml .Values.tap.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.tap.annotations }}
{{- toYaml .Values.tap.annotations | nindent 4 }}
{{- end }}
name: kubeshark-hub
namespace: {{ .Values.tap.selfnamespace }}
spec:

View File

@ -7,6 +7,10 @@ metadata:
{{- if .Values.tap.labels }}
{{- toYaml .Values.tap.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.tap.annotations }}
{{- toYaml .Values.tap.annotations | nindent 4 }}
{{- end }}
name: kubeshark-hub
namespace: {{ .Values.tap.selfnamespace }}
spec:

View File

@ -8,6 +8,10 @@ metadata:
{{- if .Values.tap.labels }}
{{- toYaml .Values.tap.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.tap.annotations }}
{{- toYaml .Values.tap.annotations | nindent 4 }}
{{- end }}
name: kubeshark-front
namespace: {{ .Values.tap.selfnamespace }}
spec:

View File

@ -7,6 +7,10 @@ metadata:
{{- if .Values.tap.labels }}
{{- toYaml .Values.tap.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.tap.annotations }}
{{- toYaml .Values.tap.annotations | nindent 4 }}
{{- end }}
name: kubeshark-front
namespace: {{ .Values.tap.selfnamespace }}
spec:

View File

@ -8,6 +8,10 @@ metadata:
{{- if .Values.tap.labels }}
{{- toYaml .Values.tap.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.tap.annotations }}
{{- toYaml .Values.tap.annotations | nindent 4 }}
{{- end }}
name: kubeshark-persistent-volume-claim
namespace: {{ .Values.tap.selfnamespace }}
spec:

View File

@ -8,6 +8,10 @@ metadata:
{{- if .Values.tap.labels }}
{{- toYaml .Values.tap.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.tap.annotations }}
{{- toYaml .Values.tap.annotations | nindent 4 }}
{{- end }}
name: kubeshark-worker-daemon-set
namespace: {{ .Values.tap.selfnamespace }}
spec:

View File

@ -8,6 +8,10 @@ metadata:
{{- if .Values.tap.labels }}
{{- toYaml .Values.tap.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.tap.annotations }}
{{- toYaml .Values.tap.annotations | nindent 4 }}
{{- end }}
name: kubeshark-ingress-class
namespace: {{ .Values.tap.selfnamespace }}
spec:

View File

@ -11,6 +11,10 @@ metadata:
{{- if .Values.tap.labels }}
{{- toYaml .Values.tap.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.tap.annotations }}
{{- toYaml .Values.tap.annotations | nindent 4 }}
{{- end }}
name: kubeshark-ingress
namespace: {{ .Values.tap.selfnamespace }}
spec:

View File

@ -42,6 +42,7 @@ tap:
packetcapture: libpcap
ignoretainted: false
labels: {}
annotations: {}
nodeselectorterms: []
ingress:
enabled: false