Skip to content

Commit

Permalink
Merge pull request #26 from alexzhc/main
Browse files Browse the repository at this point in the history
Add helm lookup for kylin10
  • Loading branch information
alexzhc authored Oct 12, 2022
2 parents 033ed34 + 4be3fce commit 7e28d10
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL := /bin/bash
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))

CHART_VER ?= 0.3.4
CHART_VER ?= 0.3.5
DRBD_VER ?= 9.0.32-1# another tested value is: 9.1.11
DRBD_UTILS_VER ?= 9.12.1# another tested value is: 9.21.4

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ By default, master nodes are avoided. To deploy on master nodes, modify `values.

#### DaemonSet

Remove `nodeAffinity`
Set in `nodeAffinity: {}` in `values.yaml`

#### Job

Set `deployOnMasters: "yes"`, and then Remove `nodeAffinity`
Set `deployOnMasters: "yes"`

## Common Issues

Expand All @@ -208,4 +208,4 @@ Cause:
Secure Boot is not supported yet

Solution:
Future release will handle kernel module signing.
Future releases will handle kernel module signing.
2 changes: 1 addition & 1 deletion docker-shipper/Dockerfile.shipper
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ RUN set -x && \
find ./user -type f -executable -name 'drbd[a-z]*' -exec mv -v {} /utils/ \;

# Create shipper
FROM busybox
FROM alpine

ARG DRBD_VER

Expand Down
2 changes: 1 addition & 1 deletion helm/drbd-adapter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version: 0.3.4
# to the chart and its templates, including the app version: 0.3.4
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.4
version: 0.3.5

# This is the version: 0.3.4
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
4 changes: 4 additions & 0 deletions helm/drbd-adapter/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
{{ else if regexMatch "ubuntu .*22" $osImage }}
{{ $distro = "jammy" }}
{{ $tag = "v9.1.11" }}
{{ else if regexMatch "kylin .*v10" $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"))}}
{{ else }}
Expand Down Expand Up @@ -139,9 +141,11 @@ spec:
hostPath:
path: /etc/sysconfig/modules
type: DirectoryOrCreate
{{ if eq $.Values.useAffinity "yes" }}
affinity:
nodeAffinity:
{{- toYaml $.Values.affinity.nodeAffinity | nindent 10 }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
13 changes: 7 additions & 6 deletions helm/drbd-adapter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ upgrade: "no"
# by default check hostname: (yes|no)
checkHostname: "yes"

# only apply to "deployKind: job"
# by default NOT deploying on masters (yes|no)
deployOnMasters: "no"

# only apply to "deployKind: daemonset"
# by default drop binary files to the host: (yes|no),
drop: "yes"

Expand All @@ -38,4 +33,10 @@ affinity:
- key: node-role.kubernetes.io/master
operator: DoesNotExist
- key: node-role.kubernetes.io/control-plane
operator: DoesNotExist
operator: DoesNotExist

# only apply to "deployKind: job"
# by default NOT deploying on masters (yes|no)
deployOnMasters: "no"
# by default NOT using Affinity (yes|no)
useAffinity: "no"

0 comments on commit 7e28d10

Please sign in to comment.