Skip to content

Commit

Permalink
[v15] fix YAML messing session_recording type in chart (#40919)
Browse files Browse the repository at this point in the history
* fix YAML messing session_recording type in chart

* update snapshot
  • Loading branch information
hugoShaka committed Apr 25, 2024
1 parent 7cdc6b1 commit f431c3b
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
clusterName: helm-lint
sessionRecording: "off"
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ auth_service:
{{- end }}
{{- end }}
{{- if .Values.sessionRecording }}
session_recording: {{ .Values.sessionRecording }}
session_recording: {{ .Values.sessionRecording | squote }}
{{- end }}
{{- if .Values.proxyListenerMode }}
proxy_listener_mode: {{ .Values.proxyListenerMode }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,75 @@ adds a proxy token by default:
kubernetes:
allow:
- service_account: "NAMESPACE:RELEASE-NAME-proxy"
keeps the second factor type even when it's "off":
1: |
|-
auth_service:
authentication:
local_auth: true
second_factor: "off"
type: local
cluster_name: helm-lint
enabled: true
proxy_listener_mode: separate
kubernetes_service:
enabled: true
kube_cluster_name: helm-lint
listen_addr: 0.0.0.0:3026
public_addr: RELEASE-NAME-auth.NAMESPACE.svc.cluster.local:3026
proxy_service:
enabled: false
ssh_service:
enabled: false
teleport:
auth_server: 127.0.0.1:3025
log:
format:
extra_fields:
- timestamp
- level
- component
- caller
output: text
output: stderr
severity: INFO
version: v3
keeps the session_recording type even when it's "off":
1: |
|-
auth_service:
authentication:
local_auth: true
second_factor: "on"
type: local
webauthn:
rp_id: helm-lint
cluster_name: helm-lint
enabled: true
proxy_listener_mode: separate
session_recording: "off"
kubernetes_service:
enabled: true
kube_cluster_name: helm-lint
listen_addr: 0.0.0.0:3026
public_addr: RELEASE-NAME-auth.NAMESPACE.svc.cluster.local:3026
proxy_service:
enabled: false
ssh_service:
enabled: false
teleport:
auth_server: 127.0.0.1:3025
log:
format:
extra_fields:
- timestamp
- level
- component
- caller
output: text
output: stderr
severity: INFO
version: v3
matches snapshot for acme-off.yaml:
1: |
|-
Expand Down
17 changes: 17 additions & 0 deletions examples/chart/teleport-cluster/tests/auth_config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -648,3 +648,20 @@ tests:
- equal:
path: metadata.labels.baz
value: overridden

- it: keeps the session_recording type even when it's "off"
set:
clusterName: helm-lint
sessionRecording: 'off'
asserts:
- matchSnapshot:
path: data.teleport\.yaml

- it: keeps the second factor type even when it's "off"
set:
clusterName: helm-lint
authentication:
secondFactor: 'off'
asserts:
- matchSnapshot:
path: data.teleport\.yaml

0 comments on commit f431c3b

Please sign in to comment.