From 549b2c2133570ce0a2894a91317c200138bdd889 Mon Sep 17 00:00:00 2001 From: Jiayi Hu Date: Wed, 13 Jan 2021 15:14:27 +0100 Subject: [PATCH] Allow overwriting controller.nodeSelectors (#194) * Allow overwriting controller.nodeSelectors * Add note about `sed` for MacOS contributors --- Cargo.lock | 8 ++++---- agent/Cargo.toml | 2 +- controller/Cargo.toml | 2 +- deployment/helm/Chart.yaml | 4 ++-- deployment/helm/templates/controller.yaml | 10 +++++----- docs/contributing.md | 6 ++++-- docs/user-guide.md | 6 ++++-- samples/brokers/udev-video-broker/Cargo.toml | 2 +- shared/Cargo.toml | 2 +- version.txt | 2 +- 10 files changed, 24 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 658cc977e..77aa70c7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,7 +17,7 @@ checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" [[package]] name = "agent" -version = "0.1.5" +version = "0.1.6" dependencies = [ "akri-shared", "async-stream", @@ -83,7 +83,7 @@ dependencies = [ [[package]] name = "akri-shared" -version = "0.1.5" +version = "0.1.6" dependencies = [ "async-trait", "bytes 0.5.6", @@ -434,7 +434,7 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "controller" -version = "0.1.5" +version = "0.1.6" dependencies = [ "akri-shared", "async-std", @@ -3044,7 +3044,7 @@ dependencies = [ [[package]] name = "udev-video-broker" -version = "0.1.5" +version = "0.1.6" dependencies = [ "akri-shared", "env_logger", diff --git a/agent/Cargo.toml b/agent/Cargo.toml index 599c944c0..5ae495270 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "agent" -version = "0.1.5" +version = "0.1.6" authors = ["Kate Goldenring ", ""] edition = "2018" diff --git a/controller/Cargo.toml b/controller/Cargo.toml index abfab148f..b8b3f5d34 100644 --- a/controller/Cargo.toml +++ b/controller/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "controller" -version = "0.1.5" +version = "0.1.6" authors = [""] edition = "2018" diff --git a/deployment/helm/Chart.yaml b/deployment/helm/Chart.yaml index 3e76ffc31..8f177f624 100644 --- a/deployment/helm/Chart.yaml +++ b/deployment/helm/Chart.yaml @@ -15,9 +15,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.5 +version: 0.1.6 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 0.1.5 +appVersion: 0.1.6 diff --git a/deployment/helm/templates/controller.yaml b/deployment/helm/templates/controller.yaml index 4cc2d7dbc..6ce4e0e51 100644 --- a/deployment/helm/templates/controller.yaml +++ b/deployment/helm/templates/controller.yaml @@ -44,14 +44,14 @@ spec: {{- end }} {{- if or .Values.controller.linuxOnly .Values.controller.onlyOnControlPlane .Values.controller.nodeSelectors }} nodeSelector: - {{- if .Values.controller.nodeSelectors }} - {{- toYaml .Values.controller.nodeSelectors | nindent 8 }} + {{- if .Values.controller.onlyOnControlPlane }} + node-role.kubernetes.io/master: "" {{- end }} {{- if .Values.controller.linuxOnly }} "kubernetes.io/os": linux {{- end }} - {{- if .Values.controller.onlyOnControlPlane }} - node-role.kubernetes.io/master: "" + {{- if .Values.controller.nodeSelectors }} + {{- toYaml .Values.controller.nodeSelectors | nindent 8 }} {{- end }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/docs/contributing.md b/docs/contributing.md index 2601023fc..ce2b9f142 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -21,7 +21,7 @@ Contributions can be made by forking the repository and creating a pull request. See the [Development](./development.md) documentation for more information on how to set up your environment and build Akri components locally. ## Versioning -We follow the [SymVer](https://semver.org/) versioning strategy: [MAJOR].[MINOR].[PATCH]. Our current version can be found in `./version.txt`. +We follow the [SymVer](https://semver.org/) versioning strategy: [MAJOR].[MINOR].[PATCH]. Our current version can be found in `./version.txt`. * For non-breaking bug fixes and small code changes, [PATCH] should be incremented. This can be accomplished by running `version.sh -u -p` * For non-breaking feature changes, [MINOR] should be incremented. This can be accomplished by running `version.sh -u -n` @@ -29,6 +29,8 @@ We follow the [SymVer](https://semver.org/) versioning strategy: [MAJOR].[MINOR] To ensure that all product versioning is consistent, our CI builds will execute `version.sh -c` to check all known instances of version in our YAML, TOML, and code. This will also check to make sure that version.txt has been changed. If a pull request is needed where the version should not be changed, include `[SAME VERSION]` in the pull request title. +> Note for MacOS users: `version.sh` uses the GNU `sed` command under-the-hood, but MacOS has built-in its own version. We recommend installing the GNU version via `brew install gnu-sed`. Then follow the brew instructions on how to use the installed GNU `sed` instead of the MacOS one. + ## PR title flags Akri's workflows check for three flags in the titles of PRs in order to decide whether to execute certain checks. @@ -45,4 +47,4 @@ Most contributions require you to agree to a Contributor License Agreement (CLA) When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. ## Code of Conduct -Participation in the Akri community is governed by the [Code of Conduct](../CODE_OF_CONDUCT.md). \ No newline at end of file +Participation in the Akri community is governed by the [Code of Conduct](../CODE_OF_CONDUCT.md). diff --git a/docs/user-guide.md b/docs/user-guide.md index 5822b7267..fffcfc375 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -96,9 +96,11 @@ helm install akri akri-helm-charts/akri controller.allowOnControlPlane=false` to your install command below. Conversely, if you only want the Controller to run on control plane nodes, add `--set controller.onlyOnControlPlane=true`. This will guarantee the Controller only runs on nodes with the label (key, value) of (`node-role.kubernetes.io/master`, ""), which is the default label for - the control plane node for Kubernetes. However, control plane nodes on MicroK8s and K3s do not have this label by + the control plane node for Kubernetes. + + However, control plane nodes on MicroK8s and K3s may not have this exact label by default, so you can add it by running `kubectl label node ${HOSTNAME,,} node-role.kubernetes.io/master= - --overwrite=true`. + --overwrite=true`. Or alternatively, in K3s, you can keep the default label value on the master and add `--set controller.nodeSelectors."node-role\.kubernetes\.io/master"=true` to the install command below. Run the following to fetch the Akri Helm chart, install Akri, and apply the default configuration for ``, optionally specifying the image for the broker pod that should be deployed to utilize each discovered device. diff --git a/samples/brokers/udev-video-broker/Cargo.toml b/samples/brokers/udev-video-broker/Cargo.toml index 13c6dd915..9c930b7bc 100644 --- a/samples/brokers/udev-video-broker/Cargo.toml +++ b/samples/brokers/udev-video-broker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "udev-video-broker" -version = "0.1.5" +version = "0.1.6" authors = ["Kate Goldenring ", ""] edition = "2018" diff --git a/shared/Cargo.toml b/shared/Cargo.toml index 735481420..2696ef9df 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "akri-shared" -version = "0.1.5" +version = "0.1.6" authors = [""] edition = "2018" diff --git a/version.txt b/version.txt index 9faa1b7a7..c946ee616 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.1.5 +0.1.6