diff --git a/template/Tiltfile b/template/Tiltfile index fb84bcc0..ac47d53c 100644 --- a/template/Tiltfile +++ b/template/Tiltfile @@ -1,6 +1,7 @@ # If tilt_options.json exists read it and load the default_registry value from it settings = read_json('tilt_options.json', default={}) registry = settings.get('default_registry', 'oci.stackable.tech/sandbox') +loglevel = settings.get('loglevel', '') # Configure default registry either read from config file above, or with default value of "oci.stackable.tech/sandbox" default_registry(registry) @@ -35,6 +36,7 @@ helm_crds, helm_non_crds = filter_yaml( namespace="stackable-operators", set=[ 'image.repository=' + registry + '/' + operator_name, + 'logLevel=' + loglevel ], ), api_version = "^apiextensions\\.k8s\\.io/.*$", diff --git a/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 b/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 index f690680f..b5c95c2d 100644 --- a/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 +++ b/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 @@ -52,6 +52,10 @@ spec: - name: KUBERNETES_CLUSTER_DOMAIN value: {{ .Values.kubernetesClusterDomain | quote }} {{- end }} + {{- if .Values.logLevel }} + - name: {[ operator.product_string | upper }]_OPERATOR_LOG + value: {{ .Values.logLevel | quote }} + {{- end }} {[% if operator.product_string in ['kafka'] %}] - name: KAFKA_BROKER_CLUSTERROLE value: {{ include "operator.fullname" . }}-kafka-broker-clusterrole