Skip to content

Commit dc42cf3

Browse files
authored
Add config monitor support for k8s configmap. (#217)
1 parent ba0a819 commit dc42cf3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llama-swap.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ func main() {
132132
event.Emit(proxy.ConfigFileChangedEvent{
133133
ReloadingState: proxy.ReloadingStateStart,
134134
})
135+
} else if changeEvent.Name == filepath.Join(configDir, "..data") && changeEvent.Has(fsnotify.Create) {
136+
// the change for k8s configmap
137+
event.Emit(proxy.ConfigFileChangedEvent{
138+
ReloadingState: proxy.ReloadingStateStart,
139+
})
135140
}
136141

137142
case err := <-watcher.Errors:

0 commit comments

Comments
 (0)