Skip to content

Commit 7e5948f

Browse files
Merge pull request #68 from signadot/cluster-config-sandbox-traffic-manager
Add trafficCapture.enabled and sandboxTrafficManager to cluster config
2 parents 885c1a4 + 80d3591 commit 7e5948f

File tree

5 files changed

+18
-5
lines changed

5 files changed

+18
-5
lines changed

signadot/operator/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,5 +184,6 @@ Note that, unlike with Istio, we don't have a native integration for Linkerd. Th
184184

185185
| Name | Description | Default |
186186
| ------------------------------------- | ----------------------------------------------------------- | ------- |
187+
| `trafficCapture.enabled` | Enable traffic capture | `true` |
187188
| `trafficCapture.requestHeadersElide` | List of request headers to be elided from traffic captures | `[]` |
188189
| `trafficCapture.responseHeadersElide` | List of response headers to be elided from traffic captures | `[]` |

signadot/operator/templates/_helpers.tpl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ cluster config template
44
{{- define "compileClusterConfig" -}}
55
routing:
66
istio:
7-
enabled: {{ with .Values }}{{ with .istio }}{{ with .enabled }}{{ toString .}}{{- else -}}false{{- end }}{{- else -}}false{{- end }}{{- else -}}false{{- end }}
8-
enableHostRouting: {{ with .Values }}{{ with .istio }}{{ with .enableDeprecatedHostRouting }}{{ toString .}}{{- else -}}false{{- end }}{{- else -}}false{{- end }}{{- else -}}false{{- end }}
7+
enabled: {{ if and (hasKey .Values "istio") (hasKey .Values.istio "enabled") -}}{{ toString .Values.istio.enabled }}{{- else -}}false{{- end }}
8+
enableHostRouting: {{ if and (hasKey .Values "istio") (hasKey .Values.istio "enableDeprecatedHostRouting") -}}{{ toString .Values.istio.enableDeprecatedHostRouting }}{{- else -}}false{{- end }}
99
linkerd:
10-
enabled: {{ with .Values }}{{ with .linkerd }}{{ with .enabled }}{{ toString .}}{{- else -}}false{{- end }}{{- else -}}false{{- end }}{{- else -}}false{{- end }}
10+
enabled: {{ if and (hasKey .Values "linkerd") (hasKey .Values.linkerd "enabled") -}}{{ toString .Values.linkerd.enabled }}{{- else -}}false{{- end }}
1111
customHeaders: {{ with .Values }}{{ with .routing }}{{ with .customHeaders }}{{ printf "\n" }}{{ toYaml . | indent 4}}{{- else -}}[]{{- end }}{{- else -}}[]{{- end }}{{- else -}}[]{{- end }}
12+
sandboxTrafficManager:
13+
enabled: {{ if and (hasKey .Values "sandboxTrafficManager") (hasKey .Values.sandboxTrafficManager "enabled") -}}{{ toString .Values.sandboxTrafficManager.enabled }}{{- else -}}true{{- end }}
1214
trafficCapture:
15+
enabled: {{ if and (hasKey .Values "trafficCapture") (hasKey .Values.trafficCapture "enabled") -}}{{ toString .Values.trafficCapture.enabled }}{{- else -}}true{{- end }}
1316
requestHeadersElide: {{ with .Values }}{{ with .trafficCapture }}{{ with .requestHeadersElide }}{{ printf "\n" }}{{ toYaml . | indent 4}}{{- else -}}[]{{- end }}{{- else -}}[]{{- end }}{{- else -}}[]{{- end }}
1417
responseHeadersElide: {{ with .Values }}{{ with .trafficCapture }}{{ with .responseHeadersElide }}{{ printf "\n" }}{{ toYaml . | indent 4}}{{- else -}}[]{{- end }}{{- else -}}[]{{- end }}{{- else -}}[]{{- end }}
1518
{{- end -}}

signadot/operator/templates/signadot-agent-clusterrole.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,14 @@ rules:
7575
- get
7676
- list
7777
- watch
78+
- apiGroups:
79+
- ""
80+
resourceNames:
81+
- signadot-cluster-config
82+
resources:
83+
- configmaps
84+
verbs:
85+
- get
86+
- list
87+
- watch
7888
{{ end }}

signadot/operator/templates/signadot-controller-manager-deployment.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ spec:
7272
value: {{ with .Values }}{{ with .jobExecutorProxy }}{{ with .imagePullPolicy }}{{ . }}{{- else -}}"IfNotPresent"{{- end }}{{- else -}}"IfNotPresent"{{- end }}{{- else -}}"IfNotPresent"{{- end }}
7373
- name: JOB_EXECUTOR_PROXY_IMAGE_PULL_SECRET
7474
value: {{ with .Values }}{{ with .jobExecutorProxy }}{{ with .imagePullSecret }}{{ . }}{{- else -}}""{{- end }}{{- else -}}""{{- end }}{{- else -}}""{{- end }}
75-
- name: SANDBOX_TRAFFICMANAGER_ENABLED
76-
value: {{ with .Values }}{{ with .sandboxTrafficManager }}{{ with .enabled }}{{ toString . | quote}}{{- else -}}"true"{{- end }}{{- else -}}"true"{{- end }}{{- else -}}"true"{{- end }}
7775
- name: SANDBOX_TRAFFICMANAGER_INIT_IMAGE_PULL_POLICY
7876
value: {{ with .Values }}{{ with .sandboxTrafficManager }}{{ with .init }}{{ with .imagePullPolicy }}{{ . }}{{- else -}}"IfNotPresent"{{- end }}{{- else -}}"IfNotPresent"{{- end }}{{- else -}}"IfNotPresent"{{- end }}{{- else -}}"IfNotPresent"{{- end }}
7977
- name: SANDBOX_TRAFFICMANAGER_INIT_IMAGE_PULL_SECRET

signadot/operator/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
# - header2
184184

185185
# trafficCapture:
186+
# enabled: true
186187
# # Request headers to be elided from traffic captures
187188
# requestHeadersElide:
188189
# - header1

0 commit comments

Comments
 (0)