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

Modify regular expressions to correctly distinguish between large and… #88

Merged
merged 1 commit into from
Sep 19, 2024
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
10 changes: 5 additions & 5 deletions helm/drbd-adapter/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ spec:
{{- range $index, $node := (lookup "v1" "Node" "" "").items }}
{{- $osImage := lower $node.status.nodeInfo.osImage }}
{{- with . -}}
{{- if regexMatch "(red hat enterprise|centos) .*7" $osImage }}
{{- if regexMatch "(red hat enterprise|centos) .*7([\\s\\-\\.]|$)" $osImage }}
{{- $distros = append $distros "rhel7" }}
{{- else if regexMatch "(red hat enterprise|centos) .*8" $osImage }}
{{- else if regexMatch "(red hat enterprise|centos) .*8([\\s\\-\\.]|$)" $osImage }}
{{- $distros = append $distros "rhel8" }}
{{- else if regexMatch "ubuntu .*18" $osImage }}
{{- else if regexMatch "ubuntu .*18([\\s\\-\\.]|$)" $osImage }}
{{- $distros = append $distros "bionic" }}
{{- else if regexMatch "ubuntu .*20" $osImage }}
{{- else if regexMatch "ubuntu .*20([\\s\\-\\.]|$)" $osImage }}
{{- $distros = append $distros "focal" }}
{{- else if regexMatch "ubuntu .*22" $osImage }}
{{- else if regexMatch "ubuntu .*22([\\s\\-\\.]|$)" $osImage }}
{{- $distros = append $distros "jammy" }}
{{- end }}
{{- end }}
Expand Down
14 changes: 7 additions & 7 deletions helm/drbd-adapter/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
{{ $kernelVersion := lower $node.status.nodeInfo.kernelVersion }}
{{ $tag := $.Values.drbdVersion }}
{{ $distro := "unsupported" }}
{{ if regexMatch "(red hat enterprise|centos|almalinux|rocky linux) .*7" $osImage }}
{{ if regexMatch "(red hat enterprise|centos|almalinux|rocky linux) .*7([\\s\\-\\.]|$)" $osImage }}
{{ $distro = "rhel7" }}
{{ else if regexMatch "(red hat enterprise|centos|almalinux|rocky linux) .*8" $osImage }}
{{ else if regexMatch "(red hat enterprise|centos|almalinux|rocky linux) .*8([\\s\\-\\.]|$)" $osImage }}
{{ $distro = "rhel8" }}
{{ else if regexMatch "(red hat enterprise|centos|almalinux|rocky linux) .*9" $osImage }}
{{ else if regexMatch "(red hat enterprise|centos|almalinux|rocky linux) .*9([\\s\\-\\.]|$)" $osImage }}
{{ $distro = "rhel9" }}
{{ else if regexMatch "ubuntu .*18" $osImage }}
{{ else if regexMatch "ubuntu .*18([\\s\\-\\.]|$)" $osImage }}
{{ $distro = "bionic" }}
{{ else if regexMatch "ubuntu .*20" $osImage }}
{{ else if regexMatch "ubuntu .*20([\\s\\-\\.]|$)" $osImage }}
{{ $distro = "focal" }}
{{ else if regexMatch "ubuntu .*22" $osImage }}
{{ else if regexMatch "ubuntu .*22([\\s\\-\\.]|$)" $osImage }}
{{ $distro = "jammy" }}
{{ $tag = "v9.1.11" }}
{{ else if regexMatch "kylin .*v10" $osImage }}
{{ else if regexMatch "kylin .*v10([\\s\\-\\.]|$)" $osImage }}
{{ $distro = "kylin10" }}
{{ end }}
{{ if and (ne $.Values.deployOnMasters "yes") (or (hasKey $node.metadata.labels "node-role.kubernetes.io/master") (hasKey $node.metadata.labels "node-role.kubernetes.io/control-plane"))}}
Expand Down