Skip to content

Commit

Permalink
remove log-rotate
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkpc138 committed Oct 15, 2024
1 parent c1743ba commit b5589ac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
33 changes: 0 additions & 33 deletions deploy/templates/loggen/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,13 @@ spec:
imagePullPolicy: Always
args:
- --gen.size=100
- --gen.renamedFileLogPath=/renamed/loggen.log
- --serverAddr=:{{ .Values.loggen.options.metricPort }}
- --inspector.lobsterQueryEndpoint={{ .Values.loggen.options.lobsterQueryEndpoint }}
ports:
- name: http-metrics
containerPort: {{ .Values.loggen.options.metricPort }}
protocol: TCP
resources: {{ (default dict .Values.loggen.container.resources) | toYaml | nindent 12 }}
volumeMounts:
- name: renamed
mountPath: /renamed
env:
- name: POD
valueFrom:
Expand All @@ -49,34 +45,5 @@ spec:
fieldPath: metadata.namespace
- name: CONTAINER
value: loggen
- env:
- name: LOGS_DIRECTORIES
value: /renamed
- name: LOGROTATE_CRONSCHEDULE
value: 0 */1 * * * ?
- name: LOGROTATE_MODE
value: create 0600
- name: LOGROTATE_SIZE
value: 5k
- name: LOGROTATE_COPIES
value: "3"
- name: LOGROTATE_COMPRESSION
value: compress
- name: LOGROTATE_STATUSFILE
value: /status/logrotate.status
image: {{ required "this value is required" .Values.log_rotate.container.image }}
imagePullPolicy: IfNotPresent
name: logrotate
resources: {{ (default dict .Values.log_rotate.container.resources) | toYaml | nindent 12 }}
volumeMounts:
- name: status
mountPath: /status
- name: renamed
mountPath: /renamed
volumes:
- name: renamed
emptyDir: {}
- name: status
emptyDir: {}
tolerations: {{ (default list .Values.loggen.pod.tolerations) | toYaml | nindent 8 }}
{{- end }}
2 changes: 1 addition & 1 deletion pkg/loggen/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func NewConfig() Config {
LogGenerationInterval: flag.Duration("gen.interval", time.Second, "interval to generate logs"),
LogSize: flag.Int("gen.size", 1, "size of each log"),
LogLines: flag.Int("gen.lines", 1, "number of lines per interval"),
RenamedFileLogPath: flag.String("gen.renamedFileLogPath", "/renamed/loggen.log", "file path"),
RenamedFileLogPath: flag.String("gen.renamedFileLogPath", "", "file path"),
LobsterQueryEndpoint: flag.String("inspector.lobsterQueryEndpoint", "lobster-query:8080", "lobster to query"),
Interval: flag.Duration("inspector.interval", 10*time.Second, "interval to generate logs"),
WarmUpWait: flag.Duration("inspector.warmupWait", 20*time.Second, "wait before running inspector"),
Expand Down

0 comments on commit b5589ac

Please sign in to comment.