mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-08-07 22:48:14 +00:00
Compare commits
2 Commits
master
...
fix-1954-w
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bad778d478 | ||
|
|
c8a9ba1196 |
@@ -146,7 +146,7 @@ spec:
|
||||
value: '{{ (include "sentry.enabled" .) }}'
|
||||
- name: SENTRY_ENVIRONMENT
|
||||
value: '{{ .Values.tap.sentry.environment }}'
|
||||
{{- if (((.Values.tap).auth).enabled) }}
|
||||
{{- if eq (include "kubeshark.authEnabled" .) "true" }}
|
||||
- name: HUB_INTERNAL_TOKEN_PATH
|
||||
value: /var/run/secrets/kubeshark/hub-token/token
|
||||
{{- end }}
|
||||
@@ -239,7 +239,7 @@ spec:
|
||||
{{- if .Values.tap.persistentStorage }}
|
||||
subPathExpr: $(NODE_NAME)
|
||||
{{- end }}
|
||||
{{- if (((.Values.tap).auth).enabled) }}
|
||||
{{- if eq (include "kubeshark.authEnabled" .) "true" }}
|
||||
- mountPath: /var/run/secrets/kubeshark/hub-token
|
||||
name: hub-internal-token
|
||||
readOnly: true
|
||||
@@ -284,6 +284,10 @@ spec:
|
||||
value: '{{ (include "sentry.enabled" .) }}'
|
||||
- name: SENTRY_ENVIRONMENT
|
||||
value: '{{ .Values.tap.sentry.environment }}'
|
||||
{{- if eq (include "kubeshark.authEnabled" .) "true" }}
|
||||
- name: HUB_INTERNAL_TOKEN_PATH
|
||||
value: /var/run/secrets/kubeshark/hub-token/token
|
||||
{{- end }}
|
||||
resources:
|
||||
limits:
|
||||
{{ if ne (toString .Values.tap.resources.tracer.limits.cpu) "0" }}
|
||||
@@ -359,6 +363,11 @@ spec:
|
||||
mountPropagation: HostToContainer
|
||||
name: root
|
||||
readOnly: true
|
||||
{{- if eq (include "kubeshark.authEnabled" .) "true" }}
|
||||
- mountPath: /var/run/secrets/kubeshark/hub-token
|
||||
name: hub-internal-token
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
hostNetwork: {{ .Values.tap.hostNetwork }}
|
||||
@@ -439,7 +448,7 @@ spec:
|
||||
emptyDir:
|
||||
sizeLimit: {{ .Values.tap.storageLimit }}
|
||||
{{- end }}
|
||||
{{- if (((.Values.tap).auth).enabled) }}
|
||||
{{- if eq (include "kubeshark.authEnabled" .) "true" }}
|
||||
- name: hub-internal-token
|
||||
projected:
|
||||
sources:
|
||||
|
||||
@@ -18,11 +18,7 @@ data:
|
||||
INGRESS_ENABLED: '{{ .Values.tap.ingress.enabled }}'
|
||||
INGRESS_HOST: '{{ .Values.tap.ingress.host }}'
|
||||
PROXY_FRONT_PORT: '{{ .Values.tap.proxy.front.port }}'
|
||||
AUTH_ENABLED: '{{- if and .Values.cloudLicenseEnabled (not (empty .Values.license)) -}}
|
||||
{{ (default false .Values.demoModeEnabled) | ternary true ((and .Values.tap.auth.enabled (or (eq .Values.tap.auth.type "oidc") (eq .Values.tap.auth.type "dex"))) | ternary true false) }}
|
||||
{{- else -}}
|
||||
{{ .Values.cloudLicenseEnabled | ternary "true" ((default false .Values.demoModeEnabled) | ternary "true" .Values.tap.auth.enabled) }}
|
||||
{{- end }}'
|
||||
AUTH_ENABLED: '{{ include "kubeshark.authEnabled" . }}'
|
||||
AUTH_TYPE: '{{- if and .Values.cloudLicenseEnabled (not (or (eq .Values.tap.auth.type "oidc") (eq .Values.tap.auth.type "dex"))) -}}
|
||||
default
|
||||
{{- else -}}
|
||||
|
||||
@@ -110,3 +110,17 @@ Dex IdP: retrieve a secret for static client with a specific ID
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Single source of truth for whether the hub enforces authentication.
|
||||
Consumed by the hub ConfigMap (AUTH_ENABLED) and by the worker DaemonSet, which
|
||||
must mount an internal hub token whenever the hub requires one. Keeping the two
|
||||
in sync prevents workers from being issued no token while the hub demands one.
|
||||
*/}}
|
||||
{{- define "kubeshark.authEnabled" -}}
|
||||
{{- if and .Values.cloudLicenseEnabled (not (empty .Values.license)) -}}
|
||||
{{ (default false .Values.demoModeEnabled) | ternary true ((and .Values.tap.auth.enabled (or (eq .Values.tap.auth.type "oidc") (eq .Values.tap.auth.type "dex"))) | ternary true false) }}
|
||||
{{- else -}}
|
||||
{{ .Values.cloudLicenseEnabled | ternary "true" ((default false .Values.demoModeEnabled) | ternary "true" .Values.tap.auth.enabled) }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user