Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
HBD-732 update to make setting istio values easier when used as subch…
Browse files Browse the repository at this point in the history
…art (#136)
  • Loading branch information
ddl-bgreen committed Dec 9, 2022
1 parent c662316 commit 8a0b616
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 35 deletions.
15 changes: 8 additions & 7 deletions deploy/helm/distributed-compute-operator/dco-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ image:
imagePullSecrets:
- name: domino-quay-repos
installCRDs: true
istio:
cni: true
enabled: false
httpIdleTimeout:
timeout: 24h
install: false
rootConfigNamespace: istio-system
global:
istio:
cni: true
enabled: false
httpIdleTimeout:
timeout: 24h
install: false
rootConfigNamespace: istio-system
mpi:
initImage:
registry: quay.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
- --zap-stacktrace-level={{ . }}
{{- end }}
{{- end }}
{{- if .Values.istio.enabled }}
{{- if .Values.global.istio.enabled }}
- --istio-enabled
{{- end }}
{{- with .Values.mpi.initImage }}
Expand Down
4 changes: 2 additions & 2 deletions deploy/helm/distributed-compute-operator/templates/hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- crd-apply
{{- if .Values.istio.enabled }}
{{- if .Values.global.istio.enabled }}
- --istio-enabled
{{- end }}
{{- with .Values.podEnv }}
Expand Down Expand Up @@ -156,7 +156,7 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- crd-delete
{{- if .Values.istio.enabled }}
{{- if .Values.global.istio.enabled }}
- --istio-enabled
{{- end }}
{{- with .Values.podEnv }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{- if and (.Values.istio.enabled) (.Values.istio.httpIdleTimeout.timeout) }}
{{- if and (.Values.global.istio.enabled) (.Values.global.istio.httpIdleTimeout.timeout) }}
{{- $commonFullname := include "common.names.fullname" . }}
{{- $justRootConfigNamespace := list .Values.istio.rootConfigNamespace }}
{{- $justRootConfigNamespace := list .Values.global.istio.rootConfigNamespace }}
{{- $defaultNamespaces := .Values.config.watchNamespaces | default $justRootConfigNamespace }}
{{- $namespaces := .Values.istio.httpIdleTimeout.namespaces | default $defaultNamespaces }}
{{- $namespaces := .Values.global.istio.httpIdleTimeout.namespaces | default $defaultNamespaces }}
{{- range $namespace := $namespaces }}
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
Expand All @@ -27,7 +27,7 @@ spec:
typed_config:
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager"
common_http_protocol_options:
idle_timeout: {{ $.Values.istio.httpIdleTimeout.timeout }}
idle_timeout: {{ $.Values.global.istio.httpIdleTimeout.timeout }}
- applyTo: NETWORK_FILTER
match:
listener:
Expand All @@ -40,6 +40,6 @@ spec:
name: envoy.filters.network.tcp_proxy
typed_config:
'@type': type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy
idle_timeout: {{ $.Values.istio.httpIdleTimeout.timeout }}
idle_timeout: {{ $.Values.global.istio.httpIdleTimeout.timeout }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.istio.enabled }}
{{- if .Values.global.istio.enabled }}
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
Expand Down
39 changes: 20 additions & 19 deletions deploy/helm/distributed-compute-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

global:
istio:
# Enable support for environments with Istio installed
enabled: false
# Elevate pod execution permissions so that Istio's init container can modify
# network settings when CNI plugin is NOT installed
cniPluginInstalled: true
# namespace for istio mesh-level settings
rootConfigNamespace: istio-config
# set the HTTP connection idle timeout for pods managed by the distributed-compute-operator
httpIdleTimeout:
# the timeout to set. Leave empty for istio default.
timeout: ""
# If timeout and namespaces are set, sets the timeout only in given namespaces.
# If timeout is set but namespaces is empty:
# - if config.watchNamespaces is empty, then timeout is set across the whole istio mesh
# - else timeout is set for namespaces in config.watchNamespaces
# If any namespaces in the istio mesh are unaffected by this setting, they get istio default.
namespaces: []

# Number of controller instances to run
replicaCount: 1

Expand Down Expand Up @@ -32,25 +52,6 @@ config:
# Development mode enables debug logging, console output and stacktraces suitable for troubleshooting
logDevelopmentMode: false

istio:
# Enable support for environments with Istio installed
enabled: false
# Elevate pod execution permissions so that Istio's init container can modify
# network settings when CNI plugin is NOT installed
cniPluginInstalled: true
# namespace for istio mesh-level settings
rootConfigNamespace: istio-config
# set the HTTP connection idle timeout for pods managed by the distributed-compute-operator
httpIdleTimeout:
# the timeout to set. Leave empty for istio default.
timeout: ""
# If timeout and namespaces are set, sets the timeout only in given namespaces.
# If timeout is set but namespaces is empty:
# - if config.watchNamespaces is empty, then timeout is set across the whole istio mesh
# - else timeout is set for namespaces in config.watchNamespaces
# If any namespaces in the istio mesh are unaffected by this setting, they get istio default.
namespaces: []

podSecurityPolicy:
# Create custom PSP for operator
enabled: true
Expand Down

0 comments on commit 8a0b616

Please sign in to comment.