Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting of an environment variable to configure master logs encoding #9296

Merged
merged 1 commit into from
Apr 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deploy/kubernetes/helm/che/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ data:
{{- else }}
CHE_INFRA_KUBERNETES_INGRESS_ANNOTATIONS__JSON: '{"kubernetes.io/ingress.class": "nginx", "{{ .Values.global.ingressAnnotationsPrefix }}ingress.kubernetes.io/rewrite-target": "/","{{ .Values.global.ingressAnnotationsPrefix }}ingress.kubernetes.io/ssl-redirect": "false","{{ .Values.global.ingressAnnotationsPrefix }}ingress.kubernetes.io/proxy-connect-timeout": "3600","{{ .Values.global.ingressAnnotationsPrefix }}ingress.kubernetes.io/proxy-read-timeout": "3600"}'
{{- end }}
CHE_LOGS_APPENDERS_IMPL: "plaintext"
5 changes: 5 additions & 0 deletions deploy/kubernetes/helm/che/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ spec:
configMapKeyRef:
key: CHE_INFRA_KUBERNETES_INGRESS_ANNOTATIONS__JSON
name: che
- name: CHE_LOGS_APPENDERS_IMPL
valueFrom:
configMapKeyRef:
key: CHE_LOGS_APPENDERS_IMPL
name: che
image: {{ .Values.cheImage }}
imagePullPolicy: {{ .Values.cheImagePullPolicy }}
livenessProbe:
Expand Down
6 changes: 6 additions & 0 deletions deploy/kubernetes/kubectl/che-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ items:
JAVA_OPTS: "-XX:MaxRAMFraction=2 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Dsun.zip.disableMemoryMapping=true -Xms20m "
CHE_WORKSPACE_AUTO_START: "false"
CHE_INFRA_KUBERNETES_INGRESS_ANNOTATIONS__JSON: '{"nginx.ingress.kubernetes.io/rewrite-target": "/","nginx.ingress.kubernetes.io/ssl-redirect": "false","nginx.ingress.kubernetes.io/proxy-connect-timeout": "3600","nginx.ingress.kubernetes.io/proxy-read-timeout": "3600"}'
CHE_LOGS_APPENDERS_IMPL: "plaintext"
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
Expand Down Expand Up @@ -248,6 +249,11 @@ items:
configMapKeyRef:
key: CHE_INFRA_KUBERNETES_INGRESS_ANNOTATIONS__JSON
name: che
- name: CHE_LOGS_APPENDERS_IMPL
valueFrom:
configMapKeyRef:
key: CHE_LOGS_APPENDERS_IMPL
name: che
image: eclipse/che-server:nightly
imagePullPolicy: Always
livenessProbe:
Expand Down
1 change: 1 addition & 0 deletions deploy/openshift/che-config
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ CHE_PREDEFINED_STACKS_RELOAD__ON__START: ${CHE_PREDEFINED_STACKS_RELOAD}
JAVA_OPTS: ${CHE_JAVA_OPTS:-"-XX:MaxRAMFraction=2 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Dsun.zip.disableMemoryMapping=true -Xms20m "}
CHE_WORKSPACE_AUTO_START: ${CHE_WORKSPACE_AUTO_START:-"false"}
CHE_WORKSPACE_AGENT_DEV_INACTIVE__STOP__TIMEOUT__MS: ${CHE_WORKSPACE_AGENT_DEV_INACTIVE__STOP__TIMEOUT__MS:-"3600000"}
CHE_LOGS_APPENDERS_IMPL: "plaintext"
7 changes: 7 additions & 0 deletions dockerfiles/init/manifests/che.env
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@
#CHE_DEBUG_SUSPEND=false
#CHE_DEBUG_PORT=8000

# Che master logs
#
# Choose variant of Che master logs encoding and storing. Default is `plaintext`.
# Another supported value is `json` which makes Che master produce JSON encoded logs
# in system output of PID 1 process of container. Useful for storing logs in systems such as Logstash.
# CHE_LOGS_APPENDERS_IMPL=plaintext
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't default value be added into che.properties?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is not read from properties

Copy link
Contributor

@riuvshin riuvshin Mar 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if that is commented, the default value will be used, do we have default value declared in a code? because I do not see it in the che.props

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the default value is declared here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@l0rd is right this value is not read by the code and default value is in xml file of logback



########################################################################################
##### #####
Expand Down