Skip to content

Commit 65c950c

Browse files
authored
Bugfix - bug fix for baremetal support (#127)
- add image pull secret for redis and copilot-chat - all dockerfile of alertmanager - fix the bug when remote_log_dir is null
1 parent a242cd1 commit 65c950c

File tree

6 files changed

+16
-4
lines changed

6 files changed

+16
-4
lines changed

.github/workflows/build-all.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ permissions:
55

66
on:
77
push:
8-
branches: ['release/*']
8+
branches: ["release/*"]
9+
pull_request:
10+
branches: ["release/*"]
911
release:
1012
types: [published]
1113
workflow_dispatch:
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
FROM prom/alertmanager:v0.29.0

src/alert-manager/deploy/alert-manager-deployment.yaml.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ spec:
4242
containers:
4343
- name: alertmanager
4444
image: {{ cluster_cfg['cluster']['docker-registry']['prefix'] }}alertmanager:{{ cluster_cfg['cluster']['docker-registry']['tag'] }}
45+
imagePullPolicy: Always
4546
args:
4647
- '--config.file=/etc/alertmanager/config.yml'
4748
- '--storage.path=/alertmanager'

src/alert-manager/deploy/redis-deployment.yaml.template

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ spec:
7272
periodSeconds: 10
7373
successThreshold: 1
7474
failureThreshold: 3
75+
imagePullSecrets:
76+
- name: {{ cluster_cfg["cluster"]["docker-registry"]["secret-name"] }}
7577
volumes:
7678
- name: redis-data
7779
hostPath:
7880
path: /data/redis-data
7981
type: ""
8082
- name: redis-config
8183
configMap:
82-
name: redis-config
84+
name: redis-config

src/copilot-chat/deploy/copilot-chat-deployment.yaml.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ spec:
101101
securityContext:
102102
runAsUser: 0
103103
runAsGroup: 0
104+
imagePullSecrets:
105+
- name: {{ cluster_cfg["cluster"]["docker-registry"]["secret-name"] }}
104106
volumes:
105107
- name: copilot-chat-logs
106108
emptyDir: {}

src/log-manager/src/nginx/get_log_content.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ end
7070

7171
local log_path = log_dir..log_name
7272
local use_remote_log_dir = false
73-
if path.isdir(log_path) and util.is_directory_empty(log_path) then
73+
if path.isdir(log_path) and util.is_directory_empty(log_path) and remote_log_dir then
7474
ngx.log(ngx.INFO, "falling back to remote log directory")
7575
log_path = remote_log_dir..log_name
7676
log_dir = remote_log_dir
7777
use_remote_log_dir = true
78-
elseif not path.exists(log_path) then
78+
elseif not path.exists(log_path) and remote_log_dir then
7979
ngx.log(ngx.INFO, "path not exist, falling back to remote log directory")
8080
log_path = remote_log_dir..log_name
8181
log_dir = remote_log_dir
@@ -120,3 +120,4 @@ else
120120
ngx.req.set_uri("/~/current/"..string.sub(path.abspath(log_path), string.len(file_prefix) + 1), true)
121121
end
122122

123+

0 commit comments

Comments
 (0)