Skip to content

Commit

Permalink
fix the regex when injecting v1 mirror settings (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheriL committed Jul 20, 2023
1 parent 8d9fbe2 commit f93f0bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions charts/dragonfly/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: dragonfly
description: Dragonfly is an intelligent P2P based image and file distribution system
icon: https://raw.githubusercontent.com/dragonflyoss/Dragonfly2/main/docs/images/logo/dragonfly.svg
type: application
version: 1.0.5
appVersion: 1.0.5
version: 1.0.6
appVersion: 1.0.6
keywords:
- dragonfly
- d7y
Expand All @@ -26,7 +26,7 @@ sources:

annotations:
artifacthub.io/changes: |
- Update regex when checking containerd config.toml.
- Fix the regex when injecting v1 mirror settings.
artifacthub.io/links: |
- name: Chart Source
Expand Down
4 changes: 2 additions & 2 deletions charts/dragonfly/templates/dfdaemon/dfdaemon-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ spec:
echo config_path is not enabled, just add one mirror in {{ default "config.toml" .Values.containerRuntime.containerd.configFileName }}
# parse registry domain
registry={{ .Values.dfdaemon.config.proxy.registryMirror.url}}
domain=$(echo $registry | sed -e "s,https://,," | sed "s,:.*,,")
domain=$(echo $registry | sed -e "s,http.*://,," | sed "s,:.*,,")
# inject registry
if grep "registry.mirrors.\"$domain\"" $etcContainerd/{{ default "config.toml" .Values.containerRuntime.containerd.configFileName }}; then
# TODO merge mirrors
Expand Down Expand Up @@ -432,7 +432,7 @@ spec:
echo containerd config is version 1, just only support one mirror in {{ default "config.toml" .Values.containerRuntime.containerd.configFileName }}
# parse registry domain
registry={{ .Values.dfdaemon.config.proxy.registryMirror.url}}
domain=$(echo {{ .Values.dfdaemon.config.proxy.registryMirror.url}} | sed -e "s,http.://,," | sed "s,:.*,,")
domain=$(echo {{ .Values.dfdaemon.config.proxy.registryMirror.url}} | sed -e "s,http.*://,," | sed "s,:.*,,")
# inject registry
if grep "registry.mirrors.\"$domain\"" $etcContainerd/{{ default "config.toml" .Values.containerRuntime.containerd.configFileName }}; then
# TODO merge mirrors
Expand Down

0 comments on commit f93f0bd

Please sign in to comment.